ESP32-C3 mini

Posted on
Page
of 2
Prev
/ 2
  • Ok, great! Thanks for your work on the repo! I believe you can change your username just by clicking Edit Profile in top right?

    Before I saw this post, I just did a diff between your code and Espruino 2v16 and got the diff attached, which seems pretty nice - as you say if you can use ifdefs like that to handle the different boards it'll be great.

    It would be really handy for us if you could try and apply your work on top of the existing Espruino Github repo though - and then it's very easy for us to pull changes upstream. When you start by just copying some of the files in it gets a lot more difficult to both see and transfer any changes -as well as for you to pull in any changes from new versions of Espruino.

    If you can get the original repo built with your CMakeLists.txt then I'm very happy to try and modify the espruino Makefile such that it will auto-generate a CMakeLists.txt that basically matches, and we could have a working solution quite quick.

    If we're going to change everything around, I'd really like to move to IDF 5.2.1 and not just 4.4.7 though. I'm interested in the C2 (ESP8684), and that wouldn't be supported by IDF 4.


    1 Attachment

  • Yes, understood.

    So what I'm going to do is clone the latest repository of Espruino 2v21. And upon this, I'll make the current changes with three conditional definitions, ESP32-IDF3, ESP32-IDF4, and ESP32-C3-IDF4

    and I'll upload the changes to my branch... and this way it can be integrated into the original repository.

  • Thanks! I've actually done a bunch of this myself already - so please hold off until I say I've pushed my changes as we might end up duplicating work.

    I vaguely remember this coming up, but IDF 5 has changed a lot of the network handling stuff, so even though I seem to have got a lot of stuff building, there's going to be a big chunk of work there getting that through.

  • Ok, so I've just pushed my changes to master. You may have to add target_compile_options(${COMPONENT_TARGE­T} PUBLIC -DESP_IDF_VERSION_MAJOR=4) but it's possible it is set by default.

    ... but if you:

    I think you should be almost there. Because you're not building in BLE stuff yet (I daren't check that!) you'll get errors about enableBLE/etc in jswrapper.c - but I just edited jswrapper.c and changed the relevant function names with any old function in the list nearby, and it builds!

    Not had a chance to try yet - but if you include the relevant BLE stuff and can get that building then we should be almost there - it's just a matter of porting Espruino to use the new mbedtls I think

  • Hello, sounds perfect, thank you very much for the work. I see that we can give it a boost.

    Right now I am tied up with other projects, but I will make time to contribute.

    We are betting on version 5.x directly, which I think is excellent. I worked on 4.x because it wasn't difficult. I will retrieve all the notes from 5.x to remember.

    We'll keep notifying about the tests and progress.

  • Ok, great!

    Having looked at it, I think going with 4.x was definitely the right choice - having to change the TCPIP library over looks like a reasonable chunk of work, but it looks like all the changes for 4.x are things that would have to change for 5.x anyway.

    I reckon if we can get something building and working with 4.x then moving up to 5.x from there should be a little easier.

  • There is now the start of an IDF4 build documented at https://github.com/espruino/Espruino/blo­b/master/targets/esp32/IDF4/README.md

    BOARD=ESP32_IDF4 RELEASE=1 make
    

    Currently gets to:

    [100%] Linking CXX executable espruino.elf
    xtensa-esp32-elf/bin/ld: espruino.elf section `.iram0.text' will not fit in region `iram0_0_seg'
    xtensa-esp32-elf/bin/ld: IRAM0 segment data does not fit.
    xtensa-esp32-elf/bin/ld: region `iram0_0_seg' overflowed by 9780 bytes
    

    So I think it's a compiler flag about putting consts and stuff in RAM that's probably enabled by default. But at least it gets that far...

  • Nice, I will check this, because in the ESP32 build with esp-idf 4.4.4 I faced the same issue.

  • A fresh installation of Espruino complains about

    BOARD=ESP32_IDF4 RELEASE=1 make clean
    BOARD=ESP32_IDF4 RELEASE=1 make 
    
    CMake Error at /home/markbecker/Espruino/esp-idf/tools/­cmake/component.cmake:478 (add_library):
      Cannot find source file:
    
        /home/markbecker/ESPRUINO/gen/jswrapper.­c
    
    

    gen folder contains

    markbecker@vmux091:~/ESPRUINO$ ls -lrt gen
    total 20
    -rw-rw-r-- 1 markbecker markbecker   45 May  3 21:33 README
    -rw-rw-r-- 1 markbecker markbecker  459 May  3 21:42 CURRENT_BOARD.make
    -rw-rw-r-- 1 markbecker markbecker 3485 May  3 21:42 platform_config.h
    -rw-rw-r-- 1 markbecker markbecker 1024 May  3 21:42 jspininfo.h
    -rw-rw-r-- 1 markbecker markbecker 2974 May  3 21:42 jspininfo.c
    
  • @Gordon Any hint how to get this missing file?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

ESP32-C3 mini

Posted by Avatar for Jurand @Jurand

Actions