ESP32-S3-DevKit support #7500
Replies: 1 comment
-
Posted at 2023-01-02 by rgomezwap Maybe now that we are testing the IDF v4.x and v5.x versions we could do the build for ESP32-S3. It seems to be the successor of ESP32. Has anyone made any progress to start with? For me I need to buy the hardware first. Posted at 2023-03-20 by rgomezwap I recently received the ESP32-S3 board. I have done quick tests with the ESP32 IDF 4.4 toolchain. I've removed a lot of code that doesn't work with ESP32-S3 hardware. Finally I was able to start Espruino prompt. Now there is a lot of work left to review the hardware differences and create a dual version for ESP32 and ESP32-S3. Attachments: Posted at 2023-03-21 by @fanoush Oh very nice. There is also the S2 and (risc-v) C3 so even more confusion to the ESP32 mix. At least the S2 could work with your changes too? However when googling it is not actualy so easy and GPIO access is different https://blog.adafruit.com/2022/05/31/esp32uesday-the-esp32-s3-is-more-than-a-fancy-s2/ Posted at 2023-03-21 by rgomezwap Thanks for the link, I'll read. The truth is that I work with ESP32 (WIFI) and Espruino (Javascript) , and I'm very happy. The reasons to start migrating are:
I think it's time to start migrating before the current ESP32 system becomes obsolete. Posted at 2023-04-02 by rgomezwap Hi, this weekend I'been working on three updates. I've upgraded the BUILD system to ESP-IDF 4.4.4 and it seems to be working fine on ESP32 and ESP32S3. I've also added all the WIFI code and it's working on ESP32S3. I'm now able to access it via Telnet with EspruinoWeb IDE. Finally, I've ordered an ESP32 S2 to be able to do some testing and add it to the build system. I've been doing some research and it's a candidate to replace the ESP8266, so it's good to have all three systems well done. Posted at 2023-04-11 by user155129 Do you have a fork available where we can contribute to your efforts to make Espruino work for ESP32-s3? Posted at 2023-04-12 by rgomezwap Hello, it's great. But for now, I'm working locally with a virtual machine. I tried to follow the current Espruino organization and build system, but I couldn't do it. I have created a new folder structure and build system that fits with ESP-IDF 4.x. So we can follow different paths:
Or any other option that is preferred, I can adapt. Posted at 2023-04-13 by rgomezwap Hello, today I received the ESP32-S2. Let's see how it works with the port I made for ESP32-S3, or if there are many things that need to be changed. I'll let you know once I get it. Posted at 2023-04-14 by rgomezwap Hello again. One more issue. The ESP32 S2 and S3 boards don't have a UART USB port. Instead, they use USB CDC, which means that the serial device is virtual. Therefore, the Espruino console doesn't work over the UART channel unless we connect cables and a USB-serial TTL converter. I have seen that Espruino already includes USB in the console, so I need to investigate how to use it. Let's continue... Posted at 2023-04-14 by @MaBecker Nice, hope you find time to share your work! Posted at 2023-04-15 by rgomezwap Yes, sure. Currently, I have focused on addressing all the initial issues. The main goal is to achieve a firmware that successfully boots. From here on, everyone will be able to contribute. Posted at 2023-04-19 by @MaBecker Can you share the ESP32.make file and details about ESP32 SDK setting? Posted at 2023-04-19 by rgomezwap Hello, these days i'm setting up a Github repository with the complete ESP32-S3 system. If you can wait a few days for me to have it ready. Hopefully, by this weekend I can have it ready and published. The Make file and the sdkconfig are the first two significant changes compared to the current build system of Espruino. Here are for you to see how different they are. Attachments: Posted at 2023-04-20 by @MaBecker Thanks for sharing Posted at 2023-04-22 by rgomezwap Hello, I've created a repository with the specific version of Espruino for ESP32-S3 and ESP-IDF 4.x. https://github.com/rgomezwap/EspruinoS3 Posted at 2023-04-23 by @MaBecker 👍🏻 Posted at 2023-10-19 by user130700 This is fantastic! Support for the -s3 will give long future for Espruino with WIFI requirements. @gfwilliams Would you support this? Is there a route you can monetise on the s3 platform? Posted at 2023-11-10 by @gfwilliams Sorry for the delay replying here - it's great to have got a build going, however I guess it might be a bit of effort to try and merge this into the current Espruino build system - we'll have to see. If someone were to come up with a PR that added S3 support using the existing build system (so it didn't cause big maintenance headaches when files need to be added to the build) and didn't completely screw up the existing codebase then I'd absolutely support this and merge it in. However getting to the point where I could support my work on ESP32 stuff is probably quite a stretch. I'd really love to support it (especially on stuff like the ESP32-C2), and I'm open to suggestions, but unfortunately so far there hasn't really been anything that I feel would work. One of the big attractions of the Espressif stuff has been the insanely low price of dev boards, so I can't really make money on hardware which is what I currently do for other boards. I originally started Espruino with the idea of providing it for existing dev boards with a freemium model (it worked for free, but there was a $1.50 fee to enable saving to flash) - but I spent a year working on it and only made $30, which is what prompted the very first KickStarter. So I don't know - I think even if people would pay $1.50 to unlock their boards, developers often have a lot of questions and it's not like I can afford to provide much in the way of answers for $1.50 of my time, so even then it may not be viable. Posted at 2024-07-07 by Jurand I understand the point, but I think it's also important for Espruino to continue supporting new Espressif chips to maintain its popularity. These chips offer remarkable power and lots of fun for people to play with. The risk of losing support for these chips will not push people to buy Espruino boards. It will just lead users to opt for alternatives like MicroPython, which already supports these new models, or just stick with old boards that Espruino support. Keeping Espruino working on the new hardware will increase its popularity and ensure its ongoing success and engagement with the developer community. Without it, it will start loosing all that bit by bit. I like JS, and I like the idea of writing code for ESPs in JS. But because there is no support for the new ESPs here, I just took ChatGPT and started writing code in MicroPython. And before AI, maybe that would be a problem. And maybe I would think of buying Espruino board, but today it is just too easy to do it. But I do look forward to Espruino supporting those chips someday :) Either way, I understand the business need of focusing on the get money part. And hope you will find a way to get what you want :) Posted at 2024-07-08 by @gfwilliams I notice you actually started https://forum.espruino.com/conversations/395499 about ESP32-C3 support, and at that point I spent a load of time getting a working ESP32-C3 build, with build info posted on that thread. ESP32-S3 support is pretty much there too but someone said they would contribute the relevant tweaks and never did. However, did you say thanks in any way? did you even go so far as to post a reply on that thread after your initial request? So put yourself in my position for a moment. What is the motivation here? All that work obviously didn't help to keep you engaged as you suggest, even when it was all posted on the very thread you started... Posted at 2024-07-10 by Jurand Hi Gordon, First, I want to clarify that my intention was never to offend or demotivate anyone. I greatly appreciate the effort you put into developing Espruino and supporting the community. My comments were solely a reflection of my personal feelings and experiences. From reading various threads in the forum, I understood that your primary focus is on generating revenue and selling Espruino boards. This makes sense from a business perspective, but it was somewhat disheartening to read that supporting ESP chips, which you seemed to view as competition, wasn't a priority for you. It felt like you were saying you would only focus on your own boards and if others wanted ESP support, they would have to implement it themselves. This perception was demotivating for me as it felt like there was no future support for these popular chips, leading me to seek alternatives. I want to emphasize that having support for widely-used chips like the ESP32 is crucial for attracting a large and active community to Espruino. A broad user base could potentially lead to more support and even donations from larger corporations in the future. JavaScript is very popular, and many developers, including myself, would love to use it for IoT projects on the latest hardware, not older models. People often choose the most cost-effective chips for their projects to maximize their profits, and Espruino could play a significant role by making it easier for JS developers to enter the IoT space. Your work is incredibly valuable, and I genuinely hope that Espruino continues to grow and support more hardware in the future. I look forward to seeing Espruino evolve and hopefully include support for new ESP chips someday. All I have for you is gratitude - thank you immensely for all your hard work and dedication. This project gave me lots of fun, and got me in iot which would never happen if it wasn't for you :) You let kids that know only JS to play with iot. I am just sad that you abandoned that part where Espruino is a cheap and affordable for everyone. Ending this answer, I would also like to share why I would buy Espruino board, and what I think would make your business part thrive:
Espressif chips on boards from china are faulty. They are not perfect. They are cool to play with but lack reliability. Sometimes 3 out of 5 are ok, and the rest is connecting and disconnecting, reset itself, etc. Yeah, ...so, there it is. I am still on board with all of you, just don't have skills to make Espruino work on ESP32-s3 or c6, so the easiest way for me is to find something else that works. And I just wanted to let you know about it, as a feedback. I believe that giving feedback is always in a good faith because it gives someone perspective of what people want, and why they do what they do. That's it. But I will definitely rush back, all in, asap, when Espruino will work on those new chips :) Posted at 2024-07-10 by @gfwilliams Thanks, I appreciate it! Yes, feedback is good and I wasn't meaning to have a go at you. I am experimenting with ESP32C3 in products at the moment, so maybe the support will get a bit more 'first party' soon, and the way Espressif's SDK works that should translate to other Espressif boards. I really love the ESP32 chips - I think they're fantastic (especially the RISC-V ones), and I do want to find a way to support them properly. However I've found the hard way that more users is not always better... It can be hard to stay motivated to work on an Open Source project like Espruino - every day I have a bunch of requests/bug reports, none of which I get directly paid for, and a good proportion of those never even receive a response when they're fixed. I have to find a way to support ESP32 boards properly in a way that doesn't massively increase that burden. While seeing users pouring in would be nice, if more users just means more bug reports, that's not going to be much fun for me, and then I'm left wondering why I'm not just working in industry for double my current salary, with actual holidays. Posted at 2024-07-10 by @gfwilliams On the business side... Espruino is used in I think around 4 million commercial ESP32 devices now - I don't get paid for any of those, so unfortunately popularity doesn't always pay. On the reliability/memory front I guess there's an option there, but realistically businesses just buy in the ESP32 modules, which will be the same ones I use so I think that's going to be a hard sell. Posted at 2024-07-10 by Jurand Have you considered adopting a dual licensing model? You could offer a full-functionality open-source community edition that's free for everyone, alongside a commercial license for businesses. This approach has been successfully used by others, such as LightGallery: https://www.lightgalleryjs.com/license/ By doing this, you can continue supporting the open-source community while also creating a revenue stream from commercial users who need additional features or support. 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. If the Espruino project evolves into a highly reliable piece of software that stands out in competition with others like MicroPython, particularly by proving to run faster or offering other significant advantages, it could certainly become worth paying for. Feature requests (ideas) to stand in that race:
Attachments: Posted at 2024-07-12 by @gfwilliams
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!
Posted at 2024-07-12 by Jurand But this is JS in IoT!
Posted at 2024-07-12 by AkosLukacs
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.
Or would it be worth your time to do the porting? 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... Posted at 2024-07-12 by @gfwilliams 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. Posted at 2024-07-14 by AkosLukacs Ugh, that's a lot :/ Posted at 2024-07-16 by yngv126399
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. Posted at 2024-08-17 by rgomezwap Now, I've started making some changes:
As soon as I have something useful for the community, I'll make a pull request. Posted at 2024-08-17 by rgomezwap 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 Attachments: Posted at 2024-08-17 by rgomezwap And now I've tried connecting via Telnet, and so far, it's working fine. Attachments: Posted at 2024-08-17 by @SimonGAndrews @rgomezwap, good to have you back. Posted at 2024-08-17 by @SimonGAndrews @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 ?? Posted at 2024-08-17 by @SimonGAndrews 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 Posted at 2024-08-17 by @SimonGAndrews Sorry @rgomezwap I see your pr now and understand your approach in jshardware.c with the ifdefs for the different devices. Posted at 2024-08-18 by rgomezwap 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. Posted at 2024-08-18 by rgomezwap I've been looking into it, and you're referring to using Currently, Is this what's causing the problems? Posted at 2024-08-18 by @SimonGAndrews Hi @rgomezwap (and @gfwilliams) 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. 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. Posted at 2024-12-11 by martin_hamilton 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...
Posted at 2024-12-11 by @MaBecker Look's like the usbc points to the serial device, check this Posted at 2024-12-11 by rgomezwap 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. Posted at 2024-12-12 by martin_hamilton 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 :-) Posted at 2024-12-12 by rgomezwap Hello, it seems like this might be a configuration issue. I'm not sure if it could be specific to your board. 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. Posted at 2024-12-12 by @gfwilliams It could well be your board is missing the It hit me when building for another device as well - after @MaBecker's change went in I wasn't expecting it to default to Serial rather than USB Posted at 2024-12-12 by @SimonGAndrews Hello @martin_hamilton its good to see another set of eyes on the ESp32 IDF V4/5 builds. Good luck , I will follow also. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-01-19 by user139530
Hello there!
I tried to flash espruino on my S3 dev board, which seems to work:
However, it does not boot:
I didn't find any documentation related to ESP32-S3, so here I am asking if it's supported.
Beta Was this translation helpful? Give feedback.
All reactions