-
• #2
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.
-
• #3
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.
1 Attachment
-
• #4
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/
-
• #5
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:
- new chinese gadgets come with ESP32-S3
- Two cores is very important for WIFI management without disturbing Espruino Input/Ouputs timings.
- ESP-IDF is on version 5.x. Me at the moment in 4.4
I think it's time to start migrating before the current ESP32 system becomes obsolete.
- new chinese gadgets come with ESP32-S3
-
• #6
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.
-
• #7
Do you have a fork available where we can contribute to your efforts to make Espruino work for ESP32-s3?
-
• #8
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:
- Share the code I have as it is, and each one sets up their own system.
- Create a repository, upload everything, and start working independently of Espruino at the begining..
- Try to unify with the current Espruino repository, but I don't have the knowledge and time for it.
Or any other option that is preferred, I can adapt.
- Share the code I have as it is, and each one sets up their own system.
-
• #9
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.
-
• #10
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...
-
• #11
Nice, hope you find time to share your work!
-
• #12
Yes, sure.
I hope this work is the beginning to add the new ESP32-S devices into Espruino.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.
-
• #13
Can you share the ESP32.make file and details about ESP32 SDK setting?
-
• #14
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.
2 Attachments
-
• #15
Thanks for sharing
-
• #16
Hello, I've created a repository with the specific version of Espruino for ESP32-S3 and ESP-IDF 4.x.
Let's see if from here we can work to integrate it into the official Espruino repository. -
• #17
👍🏻
-
• #19
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.
-
• #20
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 :)
-
• #21
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...
-
• #22
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:
- reliability
- lots of memory
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.
If I would need to create a freezer temperature monitor for pharmacy, I would like the most reliable board and if Espruino board would be one, I would pay.
ESP32 and ESP8266 have limited memory for code + memory operations. I tried to make AES work but got "out of memory" error and that was confusing. I guess that at some point I would buy Espruino board with wifi if there was enough memory to set up api with ui without using storage :) That would be a game changer in fun.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 :)
- reliability
-
• #23
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.
-
• #24
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.
-
• #25
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:
- MP is threading capabilities with common data store (variables can be declared in a global scope and accessed across multiple threads). MP on the ESP32-S3, which is a dual-core processor, does support real threading using the _thread module. This allows you to run threads on separate cores, enabling true parallel execution of threads.
Would it be possible to have it in Espruino? - Creating a JavaScript bytecode compiler
MP can be compiled to bytecode:
https://github.com/micropython/micropython/tree/master/mpy-cross
Since '.mpy' files are precompiled, MP runtime can execute them directly without the overhead of parsing and compiling the code at runtime. Have you thought of making Espruino able to execute precompiled bytecode? I guess compiling Espruino directly to machine code involves substantial complexity due to the dynamic nature of JS, but maybe creating a JS bytecode compiler would be easier? Modifying the Espruino interpreter to execute this bytecode could offer a balance between improved execution performance and manageable complexity, making it a practical enhancement for the Espruino platform.
1 Attachment
- MP is threading capabilities with common data store (variables can be declared in a global scope and accessed across multiple threads). MP on the ESP32-S3, which is a dual-core processor, does support real threading using the _thread module. This allows you to run threads on separate cores, enabling true parallel execution of threads.
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.