ESP32-S3-DevKit support

Posted on
Page
of 2
Prev
/ 2
  • Have you thought of making Espruino able to execute precompiled bytecode?

    There are a few different options in Espruino. The easiest is 'pretokenised code' which works right now on ESP32 - it speeds up the parsing a lot.

    There's also the ability to write JS or C and have it compiled with an optimising compiler https://www.espruino.com/InlineC or https://www.espruino.com/Compilation - but that's only for boards I sell

    There's also a proper JIT compiler which is only used in ARM-based board that I sell

    Those could all be extended to RISC-V - but the JIT is a lot of work, and the Inline C / Compilation use up a bunch of server time. I provide that for free for boards that I sell, but I can't do that for people that are using it for free.

    The dual licensing is an option, yes... But that would require hundreds of companies to be willing to pay a license fee, and I think it's a while before we'd get there.

    But the thing is, whenever anyone has ideas for ways to make money on ESP32, they're almost always talking about finding ways to make money off someone else.

    And I feel like that's a big problem - maybe I'm wrong but I think the reality is that you and most other ESP32 users probably would never really consider paying any money for use of the software. And even if you did (lets say you'd stretch to $5 which is probably unlikely) you'd expect that to include a certain level of support - and $5 doesn't pay for much of anyone's time!

    • just to add to this there are ESP32 users that are happy to contribute, and I know some of you via donations or Patreon, which I do hugely appreciate. It's more about trying to make this a bit more sustainable
  • But this is JS in IoT!
    Completely crazy ass thing :) no competition there.
    Just:

    1. make affordable pricing options for business use, costs will be passed onto the clients, so it's important that this pricing remains accessible for small businesses and startups, ensuring that the cost doesn't become a barrier to entry, there could also be an option to contact you for a custom license to negotiate for like 1000+ devices or something, and if you think $5 will not work, make it $1 and name it "support for the project" and see what happens, result may surprise you,
    2. turn your boards to license-free by default for business use,
    3. make statement, that any solution sold with an invoice or receipt dated before the launch of the dual licensing model is considered to have a valid license
  • the Inline C / Compilation use up a bunch of server time.

    Haven't tried hosting the compiler, so no idea if it's reasonable at all - but maybe you could "exploit" the free tier of serverless offering from AWS / Azure / GCP Cloud run or Cloud Run / whatnot.
    And / or Oracle cloud's free tier - they give away a nice amount of ARM cpus for free:

    Arm-based Ampere A1 cores and 24 GB of memory usable as 1 VM or up to
    4 VMs 3,000 OCPU hours and 18,000 GB hours per month

    Or would it be worth your time to do the porting?
    And betting on these will stay really free is a danger...

    Or "just" expand like crazy, more boards, sensors and other peripherals like Adafruit or Sparkfun does. And I guess income from sold HW supports development on software. But that would most certainly require expanding to more employees...

  • Yes, I'd be a bit concerned about the free tiers having been bitten by Travis once. But I think there's a real possibility of for instance only making these server-related ESP32 offerings available to Patreon supporters.

    I really like the idea of more products, but as you say it's more work - also more stock and risk. I think if I felt there was really a gap in what I was offering (for example Wifi boards) I'd definitely go there though. With a few carefully made boards I can go a long way towards doing a lot of what people want.

    Although for example I'd love to make a new Pixl board with the really nice 400x300 4 color st7301 displays we found and a case, but I have at least 500 Pixls in stock at the moment, which is £15,000 - and I'm less likely to sell those if there's a new, better board out there.

  • Ugh, that's a lot :/
    For a new Pixl - if you don't have enough ideas already: I really like the Wio terminal, because it has a color lcd with fast refresh rate.
    On the flipside, the color LCD is of course a power hog. Any chance of a product with a replaceable display option? Low power sunlight visible and a regular-ish LCD? Something that fits in the case, so won't accidentally fall apart, but reasonably protected?
    Another annoyance: It's interface options is kind of lacking, only one I2C is available on groove connectors. The other I2C is only accessible in the 40 pin Raspberry Pi compatible connector. That connector feels like they had no idea what pinout to use... Even with the battery chassis that adds 6 more groove connectors, the other I2C is not accessible :O

  • One crucial recommendation is to avoid setting payment terms on a monthly or yearly basis, as this scares people away. Instead, consider offering lifetime or per-project licenses, which are generally more acceptable.

    For individuals, I agree. For commercial, this is an accepted way of maintaining an active and useful tool. So if he does go with a commercial license of some kind, this seems viable to me.

  • Now, I've started making some changes:

    1. First, I modified it to download ESP-IDF 4.4.8, which will be the last in the 4.x branch.
    2. I've added the parameters to enable the build for ESP32S3.
    3. The first basic ESP32S3 test compiles without errors. Now, I'm moving on to Wi-Fi.

    As soon as I have something useful for the community, I'll make a pull request.

  • I've now activated Wi-Fi and generated the firmware.

    I've uploaded it to the board, and so far, it seems to be working fine. I've scanned the networks and successfully connected.

    I'm using the following S3 board,ESP32-S3 N8R2, for testing, which has two USB connections: one that functions as a serial port like in the ESP32, and the other as USB-CDC.

    https://es.aliexpress.com/item/1005004617322170.html


    1 Attachment

    • Screenshot_867.png
  • And now I've tried connecting via Telnet, and so far, it's working fine.


    1 Attachment

    • Screenshot_868.png
  • @rgomezwap, good to have you back.

  • @rgomezwap … looking forward to seeing your code in an Espruino branch or whatever. The current code for c3 GPIO calls in jshardware.c are using HAL level calls and not the IDF GPIO library API. I would like to try and fix that. Will your s3 code use ifdefs for c2 and s3 in the same jshardware and are you using the gpio api ??

  • Using esp sdk gpio lib should work in v4.x and be on the road for v5. Seeing your code will help me understand the approach to contribute on the journey. Regards Simon

  • Sorry @rgomezwap I see your pr now and understand your approach in jshardware.c with the ifdefs for the different devices.

  • Hi @SimonGAndrews , to be honest, I haven't touched this part for the S3. It compiled directly for me. I'll take a look at what you're mentioning to see if I can find anything.

  • I've been looking into it, and you're referring to using gpio_config to configure the PIN correctly according to ESP-IDF, right?

    Currently, gpio_set_level() is being used, but without prior configuration.

    Is this what's causing the problems?

  • Hi @rgomezwap (and @Gordon) im embarrased because i cannot find an issue where the IDF GPIO Driver is not being used in the current version of jshardware.c . I had stated above that an older approach to access the HAL drivers was currently being used instead. But I must have been in another version or something. The current jshardware.c in the targets/esp32 folder is using functions such as gpio_set_direction and gpio_set_pull_mode, which are in the esp-idf component GPIO driver.
    So apologies.

    As for the specific case you mention above with gpio_set_level() , i cant find that in the existing code base but it may be an issue if it does not look correct to you.

  • Hi folks, I bought a Bangle.js 2 to support the project but was finding the screen a bit too small for my ancient eyeballs, so thought I would try some ESP dev kits to see if I could find something more amenable.

    I've been playing initially with the ESP32-S3-Touch-LCD-1.69 (https://www.waveshare.com/esp32-s3-touch-lcd-1.69.htm). I'm able to build and flash the @rgomezwap ESP32-S3 Espruino variant (per https://github.com/rgomezwap/EspruinoS3), using IDF v4.4.8.

    However whilst the device boots up with only a couple of warnings and the Web IDE claims to have connected via Web Serial, it's non-responsive. Web IDE says it has connected but "No response from board", and pasting in JavaScript commands in the REPL has no effect.

    Before I go rummaging around in the codebase, boards definitions etc I just wondered if anyone else had observed this behaviour? I'm not getting as far as seeing the JavaScript ">" prompt in the REPL, but in case it's useful, here's the output of idf.py monitor...

    % idf.py monitor
    Executing action: monitor
    Serial port /dev/cu.usbmodem101
    Connecting...
    Detecting chip type... ESP32-S3
    Running idf_monitor in directory /Users/martin/src/EspruinoS3/make/esp32s3idf4
    Executing "/Users/martin/.espressif/python_env/idf4.4_py3.9_env/bin/python /Users/martin/esp/esp-idf-v4.4.8/tools/idf_monitor.py -p /dev/cu.usbmodem101 -b 115200 --toolchain-prefi
    --- idf_monitor on /dev/cu.usbmodem101 115200 ---
    --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
    ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x15 (USB_UART_CHIP_RESET),boot:0x9 (SPI_FAST_FLASH_BOOT)
    Saved PC:0x400490d9
    SPIWP:0xee
    mode:DIO, clock div:2
    load:0x3fce3808,len:0x16c8
    load:0x403c9700,len:0xbd4
    load:0x403cc700,len:0x2fb0
    SHA-256 comparison failed:
    Calculated: 0caed1e14b7b9ab0f9a70c458d30cb0bf5612929d1033aa929712ba5a4e30653
    Expected: 7f99267b344749bc4b5d539557883e611bdcc1e0fec8a9a55c62854e83cdc898
    Attempting to boot anyway...
    entry 0x403c9954
    I (45) boot: ESP-IDF v4.4.8 2nd stage bootloader
    I (45) boot: compile time 12:53:11
    I (45) boot: Multicore bootloader
    I (47) boot: chip revision: v0.2
    I (51) boot.esp32s3: Boot SPI Speed : 40MHz
    I (56) boot.esp32s3: SPI Mode       : DIO
    I (61) boot.esp32s3: SPI Flash Size : 16MB
    I (65) boot: Enabling RNG early entropy source...
    I (71) boot: Partition Table:
    I (74) boot: ## Label            Usage          Type ST Offset   Length
    I (82) boot:  0 nvs              WiFi data        01 02 00009000 00006000
    I (89) boot:  1 phy_init         RF data          01 01 0000f000 00001000
    I (97) boot:  2 factory          factory app      00 00 00010000 00180000
    I (104) boot:  3 flash            Unknown data     01 40 00310000 00010000
    I (112) boot:  4 js_code          Unknown data     01 06 00320000 000e0000
    I (119) boot: End of partition table
    I (123) esp_image: segment 0: paddr=00010020 vaddr=3c0e0020 size=2760ch (161292) map
    I (172) esp_image: segment 1: paddr=00037634 vaddr=3fc9b4c0 size=03eech ( 16108) load
    I (177) esp_image: segment 2: paddr=0003b528 vaddr=40374000 size=04af0h ( 19184) load
    I (183) esp_image: segment 3: paddr=00040020 vaddr=42000020 size=de20ch (909836) map
    I (412) esp_image: segment 4: paddr=0011e234 vaddr=40378af0 size=129d0h ( 76240) load
    I (435) esp_image: segment 5: paddr=00130c0c vaddr=600fe000 size=0002ch (    44) load
    I (444) boot: Loaded app from partition at offset 0x10000
    I (444) boot: Disabling RNG early entropy source...
    I (456) cpu_start: Multicore app
    I (456) cpu_start: Pro cpu up.
    I (456) cpu_start: Starting app cpu, entry point is 0x403755f4
    0x403755f4: call_start_cpu1 at /Users/martin/esp/esp-idf-v4.4.8/components/esp_system/port/cpu_start.c:151
    
    I (0) cpu_start: App cpu up.
    I (474) cpu_start: Pro cpu start user code
    I (474) cpu_start: cpu freq: 240000000
    I (474) cpu_start: Application information:
    I (477) cpu_start: Project name:     espruino
    I (482) cpu_start: App version:      865c93d-dirty
    I (487) cpu_start: Compile time:     Dec 11 2024 12:53:03
    I (493) cpu_start: ELF file SHA256:  4c7b8412c0085abc...
    I (499) cpu_start: ESP-IDF:          v4.4.8
    I (504) cpu_start: Min chip rev:     v0.0
    I (509) cpu_start: Max chip rev:     v0.99 
    I (514) cpu_start: Chip rev:         v0.2
    I (518) heap_init: Initializing. RAM available for dynamic allocation:
    I (526) heap_init: At 3FCA5160 len 000445B0 (273 KiB): D/IRAM
    I (532) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DIRAM
    I (539) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
    I (545) heap_init: At 600FE02C len 00001FD4 (7 KiB): RTCRAM
    I (552) spi_flash: detected chip: winbond
    I (556) spi_flash: flash io: dio
    I (561) sleep: Configure to isolate all GPIO pins in sleep state
    I (567) sleep: Enable automatic switching of GPIO sleep configuration
    I (574) cpu_start: Starting scheduler on PRO CPU.
    I (0) cpu_start: Starting scheduler on APP CPU.
    E (626) gpio: gpio_set_direction(275): GPIO number error
    E (627) gpio: gpio_set_pull_mode(239): GPIO number error
    E (628) gpio: gpio_set_direction(275): GPIO number error
    E (634) gpio: gpio_set_pull_mode(239): GPIO number error
    
     ____                 _ 
    |  __|___ ___ ___ _ _|_|___ ___ 
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v16 (c) 2021 G.Williams
    
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    
  • Hello, the version you used is the initial one from about a year ago. Now, the latest version of Espruino for the ESP32-S3 is already integrated into the original repository.

    Please check the README file to see how to generate the firmware and use this version instead of the one you used. Everything should work fine.

  • Ahh - thanks for the clarification! I managed to build the latest mainstream Espruino codebase and it boots up happily, but still non-responsive via Web IDE. Will have a poke around with serial console options next :-)

  • Hello, it seems like this might be a configuration issue. I'm not sure if it could be specific to your board.
    I checked the board you are using, and I noticed that it has connectors for the RX0 and TX0 pins. You could connect a USB-to-serial chip directly there in case you don’t find another solution.

    Also, try using a different version of the IDE, for example, an offline version, as it might be an initialization issue with the IDE protocol that is causing miscommunication. You can also test with any other serial terminal program.

  • It could well be your board is missing the 'DEFINES+=-DUSB_CDC', line? It's not in ESP32S3_IDF4.py as far as I can see.

    It hit me when building for another device as well - after @MaBe's change went in I wasn't expecting it to default to Serial rather than USB

  • Hello @martin_hamilton its good to see another set of eyes on the ESp32 IDF V4/5 builds. Good luck , I will follow also.

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

ESP32-S3-DevKit support

Posted by Avatar for user139530 @user139530

Actions