ESP32-C3 mini #7493
Replies: 2 comments
-
Posted at 2024-04-13 by @MaBecker Hi, nice tiny ESP32 board. There is no build for board other than the Posted at 2024-04-15 by @yerpj I would love to see a firmware for this platform as well, however it seems that it is a bit different than the other ESP32. Native USB (instead of a USB to serial chip on the board) and RISC-V processor... Posted at 2024-04-15 by @gfwilliams Yes - I'd love to support ESP32-C2/C3 at some point, but they are not supported at the moment. I believe Espruino will run on RISC-V (there was at least one port that didn't require any real changes to the interpreter) so it's mainly a matter of getting it built with Espressif's newer SDKs I think. Posted at 2024-04-15 by @MaBecker
Yes 3.3.6 ist not supporting this type, ESP-IDF 5.x would work. Did someone tried to build Espruino with help of Platformio, or is this impossible? Posted at 2024-04-15 by @MaBecker https://github.com/rgomezwap/EspruinoS3 I guess this could be used as a starting point for a build environment for the ESP32-Cx. Posted at 2024-04-16 by @gfwilliams Thanks - I guess I'll have to try and find some time to look into it. There must be a way to use the IDF without rewriting the build system just for it - even if it's only to create a CMakeList and then call Posted at 2024-04-16 by @MaBecker That would be great! Posted at 2024-04-17 by Jurand ESP32 Series Comparison (As of 2024)
Key Takeaways
Posted at 2024-04-17 by @yerpj I am quite sure ESP32-C3 has USB built-in, where did you get this comparison chart from? Posted at 2024-04-17 by Jurand Did it myself, just my mistake :) Doing in in a hurry. Posted at 2024-04-17 by @MaBecker check this page for idf-release-and-soc-compatibility and this one for -C3 details Posted at 2024-04-17 by @fanoush
Actually you was probably right before. C3 does not have USB OTG. It only has fixed function USB CDC Serial + JTAG. So no generic purpose USB that could do HID or mass storage or anything. So USB is there just for flashing and console so you don't need to have usb to serial chip on devboard. S3 has same fixed serial/jtag interface + USB OTG on same pins so you need to select at runtime one or another (you can't have both) but C3 only has that fixed function one. Posted at 2024-04-25 by rgomezwap Hello, some time ago, I worked on bringing Espruino to ESP-IDF 4.x and 5.x. Following this thread, and the interest in the C3, I wanted to give it a try. With ESP-IDF 4.4.7 and minimal Espruino (removing extra modules and disabling incompatible or pending hardware configuration), I successfully built it. I don't have any ESP32-C3 board available, so I can't test it. I'm going to order one from China to see if it really boots. We can work collectively to add those chips into the current Espruino. My current interest lies in ESP32-C5 and ESP32-P4, but to support these new chips, ESP-IDF 5.x is required, which is a bigger challenge that I haven't yet overcome. Posted at 2024-04-25 by @gfwilliams That sounds great! I know IDF 5 will be different, but hopefully some of what you did for 4.4.7 will still apply. I think if we're going to all this effort we should really try and target IDF 5 as it provides the widest support. Did you manage to get it building within the existing Makefile framework? I know someone put a lot of work into https://github.com/rgomezwap/EspruinoS3, but because it throws out the whole old build system it's not something I could pull back in to the main project - and I'm not willing to completely re-architect Espruino for it as it's got to support a bunch of different hardware alongside ESP32. I know at the moment we have this system where we precompile the IDF which we then download and include in the build. Computers have got a bit more powerful since that went in, and I imagine if that's making it difficult we could ignore that and just build it each time without it being a total nightmare. Posted at 2024-04-25 by @gfwilliams Just looking again at https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/linux-macos-setup.html#configure-your-project they really seem to want you to use the I'd be interested to know how you got 4.4.7 working but it feels a lot like we can modify the ESP32 makefile for Espruino to auto-generate a So you still call Posted at 2024-04-25 by @MaBecker I got my ESP32-C3 and will try a build with 4.4.7 on a Ubuntu.
that definitely will help Posted at 2024-04-26 by @gfwilliams I just did a very quick hack at https://github.com/espruino/Espruino/compare/master...gfwilliams:Espruino:esp32_idf_5?expand=1 shamelessly based off of https://github.com/rgomezwap/EspruinoS3/tree/main for now (eventually we can make the Espruino makefile create the CMakeList) It doesn't fully build, but it doesn't look completely impossible as most things appear to be minor renamings or changing defines for functions. As you noted @MaBecker the mbedtls version is different and we could look at updating Espruino, but just to get the build working for now we can disable TLS I think. I guess we should probably look at that repo and try and figure out what changes were made to the other source files (we'll have to try and figure out which commit it was based on and then manually diff it). It may be quite a bit of the work has already been done there. Posted at 2024-04-26 by rgomezwap Hello, I'm the same person as the one from rgomezwap's GitHub. I signed up on the forum using my GitHub login, but it seems to have assigned me a random username. I've updated the GitHub version to ESP-IDF 4.4.7, and everything is still working fine. Then, I installed the build system for ESP32-C3. When I tried to build, I encountered a bunch of errors which I've been fixing: either by commenting out the problematic parts to fix them later, or by making changes based on the suggestions provided by the compiler. As for the Espruino core source files, it compiles without any issues or fixes. I've tagged these changes (all related to hardware) so that I can revisit them later and analyze each one to ensure ESP-C3 compatibility. Posted at 2024-04-26 by rgomezwap The idea of transforming the current makefile system to the IDF system on the fly, is a good one. On the other hand, performing a full build with IDF is easy and fast. I don't see any drawbacks; you just need to have the entire SDK downloaded, but IDF takes care of everything. The source files that need to be changed from the current Espruino, I've identified them very well, and there are very few things to modify. The main issue lies with the BUILD system; regarding the source files. I also find it easy to maintain dual compatibility with 3.3.6 and 4.4.7 through defines in the source files. Although I've noticed a significant improvement in stability with the 4.x series compared to the 3.x series. Posted at 2024-04-26 by @MaBecker Great that you are back Posted at 2024-04-26 by @MaBecker
Nice Posted at 2024-04-26 by @MaBecker @user110663 Posted at 2024-04-26 by rgomezwap Hello Mark, I don't mean being able to build both versions on the same computer. What I mean is that version 3.3.6 is very stable, with all the hardware adaptation and testing completed. As for versions 4.x and 5.x, the functionality of the hardware SDK is different (SPI, LEDC, DMA, FreeRTOS, ADC...) and it will take us some time to get it ready. If, while we prepare versions 4.x and 5.x, version 3.3.6 remains valid through conditional defines, we can generate binaries for all three versions at any time with the latest versions of the source files. Posted at 2024-04-26 by @MaBecker instead of esp I try to use something like this Edit: cloned @gfwilliams branch and working on this. Posted at 2024-04-26 by @gfwilliams Ok, great! Thanks for your work on the repo! I believe you can change your username just by clicking 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 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. Attachments: Posted at 2024-04-26 by rgomezwap 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. Posted at 2024-04-26 by @gfwilliams 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. Posted at 2024-04-26 by @MaBecker Thanks! Posted at 2024-04-26 by @gfwilliams Ok, so I've just pushed my changes to ... 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 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 Posted at 2024-04-27 by rgomezwap 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. Posted at 2024-04-29 by @gfwilliams 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. Posted at 2024-05-03 by @gfwilliams There is now the start of an IDF4 build documented at https://github.com/espruino/Espruino/blob/master/targets/esp32/IDF4/README.md
Currently gets to:
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... Posted at 2024-05-03 by @MaBecker Nice, I will check this, because in the ESP32 build with esp-idf 4.4.4 I faced the same issue. Posted at 2024-05-03 by @MaBecker A fresh installation of Espruino complains about
gen folder contains
Posted at 2024-05-06 by @MaBecker @gfwilliams Any hint how to get this missing file? Posted at 2024-05-07 by @gfwilliams You can just do But I just pushed a change which should fix it if you pull now Posted at 2024-05-07 by @gfwilliams Just a note to say if you pull now it should actually build for ESP32. I haven't had a chance to try it yet though as I don't have one on me. Not tried the C3 yet but there will likely be more changes required for that Posted at 2024-05-07 by @MaBecker Yes it does - thanks now this pop's up
Posted at 2024-05-07 by @gfwilliams That's odd - not sure what to suggest. It works for me. Posted at 2024-05-08 by @MaBecker Oh no.... reset environment and have the same result are you running Posted at 2024-05-08 by @gfwilliams I just looked at that code, and it looks like for some reason the NO_ASSERT define is set in your case - I think maybe I was building without RELEASE=1 I just pushed a change - but honestly if this sort of thing happens it should be pretty easy for you to look at the code and get an idea what the issue is. Posted at 2024-05-08 by @MaBecker Yes, now it compiles - thanks. Posted at 2024-05-08 by @MaBecker Hmm, next thing, look's like excluding bluetooth is not happening, what is missing?
complains about ble stuff
Posted at 2024-05-08 by @MaBecker I realy like the style how you decided to handel the integration of the esp-idf, looks much simpler. Posted at 2024-05-09 by @gfwilliams
Sorry, not sure I understand... You had it building? What did you change to break it? edit: I made some minor tweaks to the partition table and whether the task chooses to yield, and the build for standard ESP32 now appears to work. Wifi even works! Posted at 2024-05-09 by @gfwilliams Just so you know, there's still something a bit odd. AFAIK you should be able to do It seems that for some reason IDF4 isn't preempting the Posted at 2024-05-09 by @MaBecker Ok, lets start from scratch
It works and I can see you already added more stuff - many thanks! Posted at 2024-05-09 by @MaBecker
Posted at 2024-05-09 by @gfwilliams You sure you tried the latest? That's what I got before but then I made a few more tweaks There's now an ESP32C3_IDF4.py board file - it actually builds and gets to:
but no further than that currently. But I'm not going to be able to get any more done on this for a while Posted at 2024-05-10 by @MaBecker
No, more stuff to pull, great! Posted at 2024-05-10 by @MaBecker I will create a new issue for ESP32_IDF4 to collect stuff that need to be fixed and try to fix them. edit: espruino/Espruino#2499 Posted at 2024-05-15 by @gfwilliams Just FYI, For some reason it only outputs to the console when it prints a newline (I think it's a USB CDC thing) but otherwise it appears to be able to toggle IO file (D8 is the LED, D9 is the button) edit: watches, wifi and BLE all work. I guess some of PWM/ADC/etc will be broken, but hopefully now those will be pretty easy to fix if there are problems found Posted at 2024-05-15 by @MaBecker first point to try is neopixel Posted at 2024-05-16 by @gfwilliams Do a pull now - that should now work Posted at 2024-05-16 by @yerpj OK I really tried to figure it out on my own but I am really stuck. I made the following
Any idea what I am missing? Posted at 2024-05-16 by @MaBecker looks like some env are missing, run Posted at 2024-05-17 by @yerpj Thank you for your suggestion. It seems however that it does not solve the problem:
Posted at 2024-05-17 by @MaBecker Hmm, AFSIK sudo is not passing your environment vars, can you run the make statment without sudo, or include the source statement into the sudo call. Posted at 2024-05-17 by @yerpj I tried without sudo, same results. Posted at 2024-05-17 by Tengfei First of all, thank you to everyone here for doing such a great job. Posted at 2024-05-17 by @MaBecker Yes, this is an open issue, but you can connect via BLE that works for me. Feel free to add further findings you detect during your tests to this issue. Edit: via Espruino WebIDE Posted at 2024-05-17 by Tengfei OK, thank you! Posted at 2024-05-17 by @gfwilliams @yerpj You need to do the same thing you'd do for other Espruino boards. No @tengfei I think you should find the the terminal works ok - it just doesn't show you what you're typing until you hit Posted at 2024-05-18 by @yerpj I tried same procedure on another laptop, also using WSL, and it works. Thank you for your help! Posted at 2024-05-18 by @yerpj Warning! Before buying an ESP32-C3 board, ensure the chip has internal flash memory OR the board is equiped with flash memory. The cheap ones on Aliexpress are assembled with an ESP32-C3 without any flash. More info on that here Attachments: Posted at 2024-05-19 by @SimonGAndrews Great news to see these developments to catch up the esp32 builds to newer IDF versions and to move away from the existing build to cmake method. I’m following closely and will try to help with testing. @rgomezwap glad to see your work getting closer to Main stream and thanks to @gfwilliams particularly and @MaBecker for running with this. Posted at 2024-05-20 by @gfwilliams Thanks! @yerpj thanks for the heads-up. Did you have one? That's rubbish - I'm not sure the board even has the SPI pins brought out, so the board itself is basically useless. I assume that was probably just a bad batch that got sent out :( Posted at 2024-05-20 by @yerpj Not sure it was a bad batch, anyway I ordered new ESP32-C3 ICs and will try to solder them on my PCBs. It will be a good exercise. In the meantime I will also try with external SPI memory, just for the fun . What I have learned, like many, is that Ali Express will only provide you with what you pay for. Conclusion : never select the cheapest product ;-) Posted at 2024-05-20 by @gfwilliams The C3 lack of output until newline issue is now fixed edit: and SSL - small pages seem to fetch ok, but it might crash on bigger stuff Posted at 2024-05-21 by rgomezwap I also follow the development. It's fantastic that there's finally a new line for the new boards and the new IDF. Honestly, I haven't had time yet, but my plan is to try the new system and focus on ESP32. I want to help with what I would have done for the ESP32-S3, which is still not implemented. I hope to take a day off work soon and push the project forward. Posted at 2024-05-21 by @gfwilliams That's be great, thanks! I've tried to do it in such a way that the code changes for the S3 are still there, so it should be possible to add an S3 build pretty easily Posted at 2024-05-21 by @MaBecker @rgomezwap have you fixed the socket issue? WiFi & MQTT is not working stable on any IDF. Edit: It's an issue that can happen when using Edit: both version work, mqtt reconnect can only work when connection to access point is still valid. Posted at 2024-05-23 by @yerpj OK now with a ESP32-C3F it works as expected
Some debug information is still printed out on the terminal, seems to be linked to watchdog timer. I am not sure what to do with it, however it seems not to prevent ESP32 to work, at least as a basic webserver.
Posted at 2024-05-23 by @MaBecker @yerpj: use https://maximeborges.github.io/esp-stacktrace-decoder/ upload .elf file and enter the Stack trace CPU wise to get detail about the function Posted at 2024-05-23 by @gfwilliams
I don't think that's a real problem. I have a feeling on the standard ESP32 build the task watchdog is disabled in menuconfig so you could look at doing that. It's just complaining that the Posted at 2024-05-23 by @yerpj Seems interesting, however I don't really understand how I could retrieve the stack trace Posted at 2024-05-23 by @yerpj
I have currently no experience to investigate this ESP behaviour, but at the same time it seems legit to point at the heap being full. Posted at 2024-05-23 by @MaBecker Like @gfwilliams said it might be fixed with disable or increase settings in the sdkconfig
and try to find the relevant secion and setting. Attachments: Posted at 2024-05-23 by @MaBecker use jump to find settings Attachments: Posted at 2024-05-31 by @SimonGAndrews Hi, im slowly getting to a position to build Espruino for the C3. Ive put Ubuntu v24.4 on an old dell 3050 for this. Im not experienced with Ubuntu just to say. I think I have the same issue as @yerpj when running '>sudo BOARD=ESP32C3_IDF4 RELEASE=1' with the error 'idf.py not found'. This was after running the provision script and checking that idf.py did run in Espruino and Espruino/bin from the terminal prompt. I found putting the directory names in front of idf.py in the file /Espruino/make/targets/ESP32_IDF4.make fixed this. When running the Espruino build line, Im getting past theis idf.py not found error now and hitting another error 'packaging cannot be imported' . So something missing in my ubuntu, I suppose. But idf.py will build a bin on its own in the idf/examples?? Posted at 2024-05-31 by @fanoush
what guide tells you to run sudo? see https://forum.espruino.com/conversations/395499/?offset=50#17389052 Posted at 2024-05-31 by @SimonGAndrews Thanks @fanoush , i get your point, Ill blast the Espruino clone and try again without the sudo. Posted at 2024-05-31 by @fanoush the point was also that maybe you or Jean-Philippe_Rey were following some outdated/broken guide/README so would be good to fix that Posted at 2024-05-31 by @yerpj No doc told me to run sudo. I was unable to execute some script for whatever reason and with sudo it didn't complain. I am very bad at Linux and permission mechanisms, but I learned that giving rights in a proper way was better than using sudo everytime ;-) Posted at 2024-05-31 by @SimonGAndrews Me also, I cant find a guide that uses sudo, but was in my notes, an error on my part. And now without Sudo, in a clean git clone of Espruino, without any changes to the make files:
Is building to completion (i will sort flashing). :) Thanks again @fanoush. I appreciate your help. Posted at 2024-05-31 by @MaBecker use this export
Posted at 2024-05-31 by @SimonGAndrews Thanks @MaBecker and others got both the mini and OLIMEX c3-Devkit (link above) flashed today. Both working in the WebIDE , ESP32.reboot() and .getstate() working, program upload from IDE is good. Connected to WIFI ok. Looking very good. Im off for a couple of weeks but will test properly on return. Will look the i2C and IO first. Great job folks. Posted at 2024-07-10 by @SimonGAndrews Hi, ive been working with the ESP32-C3 build for a few weeks now and have to say the new cmake build method seems very robust. Ive had success using it on my Linux box inside VS code terminal, using some of the ESP-IDF extension functions as well **. (I could make notes on that if useful to anyone). So as others advised above, the build steps in Linux terminal, high level are:
(check which usb port board is plugged into with > ls /dev )
I am also using BINDIR=. on the make command because it creates a build structure seemingly more typical for cmake and enables debugging as provided by VS code with the idf extensions. The debug single step and break points seems to be working (not used in earnest) with some code not liking to be paused (as expected). The JTAG usb connection is pretty neat in that OpenOCD can run on the com port AND the espruino WebIDE can connect simultaneously over the one USB connection. Ive been able to set break points in the VScode UI while using the webIDE to drive Espruino in the webIDE. Note Ive not been able to run OpenOCD on the waveshare ESP-C3-Zero but it runs on the Olimex ESP33-c3DevkitLipo . Im conscious the goal is to move to ESP-IDF v5 , im trying to build a set of wifi tests, refactoring @tve s esp8266 tests that I hope will help. Hopefully along the lines of @gfwilliams s previous generic test approach. Ive just ordered an Original Espruino wifi board to baseline the tests. Anyway learning allot :). Any suggestions always welcome. ** the main tricks to get working in Vs code was to add the required project config files to the espruino folder after cloning, added by running the extension command >ESP-IDF: Add .vscode Configuration Folder command.
Posted at 2024-07-10 by @MaBecker
please also check this tests from @wilberforce https://github.com/espruino/Espruino/tree/master/targets/esp32/tests Posted at 2024-07-10 by @SimonGAndrews @MaBecker Got it thanks , I missed those. :) Posted at 2024-07-10 by @gfwilliams Thanks! Really interesting to know you're having luck with OpenOCD - I never even considered trying that, but it'll make debugging miles less painful. Just FYI I'm aware the builds are a bit tricky for most users to get started with, so I'm now building C3 as a part of the GitHub actions (cutting edge) and they're available at https://www.espruino.com/binaries/travis/master/ Posted at 2024-07-10 by @MaBecker Many thanks, hope we get more tester on board for those devices. Posted at 2024-07-10 by @SimonGAndrews Great, I understand the OpenOCD is an espressif tweaked version that handles the C3 USB/JTAG setup, and gets pulled in from the ESP-IDF folders after the ESP-IDF install and export scripts are run. I used the instructions here. Posted at 2024-07-10 by @gfwilliams Has anyone had any luck with the ESP32C3 ADC? I could really do with it for a customer's board, and I've been trying here but can't get it to work. First call returns full range (4095) and all other calls seem to return 0. As far as I can tell it's calling adc1_config_width, adc1_config_channel_atten, adc1_get_raw as expected but it's just not getting anything out. Posted at 2024-07-10 by @SimonGAndrews Hi @gfwilliams , I had a quick go this eve and analogRead(0) behaves for me the same as you describe on my two different devices. I tried single stepping with Vscode debug as mentioned above, but didn’t work well. Posted at 2024-07-11 by @gfwilliams Thanks! I did give it a go and as far as I can see we do basically all the same stuff other than the calibration (but that happens after adc1_get_raw anyway)? I wondered whether it was related to having to set the pin state to 'analog' as in some microcontrollers, but I don't see that as an option here. The odd thing is I really thought that it would be pretty google-able to see other people with the same issue, but I can't turn up anything obvious at all! Posted at 2024-07-12 by @SimonGAndrews Hi @gfwilliams , Ive had another go at the analogRead(), But without success. I have been able to build the ESP-IDF example sited above and single step in VScode as basline. It does work. So board is capable !? Ive tried:
The example does use a different call to the IDF for the raw read.: esp_adc_cal_raw_to_voltage() and relies on a calibration function. Im happy to have a go at refactoring the espruino version to use this , at least as proof of concept. (my C coding is at the cut and past level ) but downing tools for today. Did you have any other ideas ? Attachments: Posted at 2024-07-12 by @gfwilliams Thanks for giving it a try! That example does this, right?
So we are still using Hard to know really - I'm off next week so I won't get a chance to give this a try, but I wonder if it's related to pin state? Like if you could check the contents of the various registers for GPIO0 in the example and Espruino I wonder if they are the same? Posted at 2024-07-22 by @SimonGAndrews Yes of course @gfwilliams ... we are still using adc1_get_raw in both cases, my mistake. The observed value in the example in the IO_MUX_GPIO2_REG of x001802 seems consistant with the Esp32-c3 reference manual section
Attachments: Posted at 2024-07-22 by @SimonGAndrews Also not shown above but I'm confident I managed to set IO_MUX_GPIO2_REG to x001802 inside my modified Espruino build readADC() before any IDF calls , using api calls in the EspIdf GPIO library. Including gpio_reset_pin() Edit .. I did not try to modify the Espruino ESP32 pin setting code in jshardware.c, which as you say earlier does not currently have an analog option. And I further note that the esp32-c3 IDF ADC library for IDF v5 is very different to the current and current Espruino ADC handling will need a rewrite anyway. Also current GPIO calls in jshardware.c are using HAL level calls and not the IDF GPIO library API so it looks like quite a bit of change and testing to get to v5 in this area. Posted at 2024-07-23 by user158605 link: https://www.espruino.com/binaries/travis/master/ Posted at 2024-07-23 by @gfwilliams Thanks for the update and for checking with the registers changed! It's interesting that the function changed so much in SDK5 though... I wonder whether maybe there's something about the fact we're using HAL calls for GPIO? Maybe the IDF is expecting something to be in one state but because we set it at a lower level it's different? Posted at 2024-07-24 by user158616 The esp32 c3 mini is my new favorite board of the esp family. Yes it could be flash easily the same way as any other and the fact I have found it is way easier than all the other i had done esp8266, esp01, esp 32, esp s2. One notable of the the c3 is even without visible antenna the range is great. The esp32 is the one i had most trouble to the point that i returned them all (bought 3 times) even with external antenna hook up. I kept getting flash failure with wifi not connected from the same distance I had no problem with any other board. The cost of the esp32 c3 mini is about the same as the esp8266 so it does not make sense with the latter. It is tiny small that makes it even better. 99% of the time people use these esp with most of the pins and feature NOT use. My choice is good enough for my application no more no less. My favorite one is the esp32 c3 mini and the esp01. Posted at 2024-07-31 by user158605 May I ask if the AnalogRead of Espruino ESP32 C3 mini can be used normally now? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-07-31 by @gfwilliams Not yet, no. If you were able to help with the debugging effort to find out why it isn't working it would be hugely appreciated. Posted at 2024-07-31 by user158605 Do you have a solution for the Analog Read of your ESP32-C3-MINI Posted at 2024-07-31 by @MaBecker @SimonGAndrews did you check this Arduino thread? Posted at 2024-08-01 by @SimonGAndrews Thanks @MaBecker I saw this but ill check the detail again. Posted at 2024-08-08 by user158605 May I ask if the AnalogRead of Espruino ESP32 C3 mini can be used normally now? Posted at 2024-08-08 by @gfwilliams No, it's still not working. I don't have time to work on this at the moment, but hopefully in a month or so I'll have a bit more time. About the only thing I can think for now is to comment out all the pin state setting code in Espruino's jshardware.c and see if that fixes it, and if it does we can at least work back from there. Posted at 2024-08-08 by @SimonGAndrews @gfwilliams and folks , Im confident ive stumbled into a workaround for the analog read issue. It seems using adc1_get_raw(channel) a second time inside readADC will always return a value. Unlike the first time it is used which will retun zero accept the first time it used after a reboot. My environment currently has too many changes in it (and my GIT knowhow wanting) to offer aPR with the change and ive not tested the simple version of a change. But I suggest repeating line 147 in jshardwareanalog.c , as in the attached , "int value = adc1_get_raw(channel) " ; so that readADC always returns the second assignment of value. This should provide a work around. (Probs dont want the 'int' on the second assignment. ill leave details to a C pro ) In my highly modified version this seems to work . Background .. To get to this point I was trying to determine if it was just the multiple calls to adc1_get_raw that caused the issue or it was making a call and going back into Espruino, before the next call , causing the issue. So know knowing a second call always returns a value , I suspect the latter and that espruino is somehow upsetting the adc peripherial , however a raw read sorts it out for an immediate subsequent call. What a mess lol ... ive spent hours on this. I hope someone can try this simple change for us. Attachments: Posted at 2024-08-09 by @MaBecker Nice and many thanks for your effort. I will give it a try over the weekend. you can call git on command line: Posted at 2024-08-09 by @gfwilliams @SimonGAndrews this is awesome, thank you so much for spending so much time looking into this! I just tested and it seems to work great - I've now put the change in, so any cutting edge builds (or 2v25 when released) should have a working ADC! Posted at 2024-08-09 by @MaBecker @gfwilliams Many thanks! Posted at 2024-08-10 by @SimonGAndrews Great news, thanks. Posted at 2024-08-13 by user158605
WIFI-ERRER assert failed: jsvUnLockInline jsvar.c:865 (jsvGetLocks(var)>0) Posted at 2024-08-13 by user158605 @MaBecker Posted at 2024-08-13 by @yerpj
Did you try creating a dedicated topic, with a relevant title, starting with a nice message like "hello guys, how are you doing", and explaining a bit your problem, and what you expect? Posted at 2024-08-13 by user158605 Thank you for your answer. My English is not very good, so it's difficult for me to describe it. I need to create a new blog theme now Posted at 2024-08-13 by user158605 I have published a new blog with the following link: Posted at 2024-08-15 by user158605 Hi, after our detailed testing; Confirm that WiFi is indeed unable to connect properly; Unable to output information after using WiFi connection code; There is no connection record even when checking the router device
Posted at 2024-08-15 by @MaBecker please stop posing same issue in this conversation too. Posted at 2024-08-15 by rgomezwap Hello everyone. I've been disconnected for the past three months. I wanted to make progress and help out, but I couldn't focus until the holidays. Posted at 2024-08-15 by rgomezwap I've just started getting back into the project. I already have the environment downloaded from GitHub and the ESP-IDF 4. Furthermore, I've tested both ESP32C3 and ESP32, and both generate the firmware without errors. I haven't tried uploading the firmware to the boards yet. Posted at 2024-08-15 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-15 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-15 by rgomezwap And now I've tried connecting via Telnet, and so far, it's working fine. Attachments: Posted at 2024-08-17 by user158605 Hi, can you share the firmware that your ESP32-C3 WIFI can use Posted at 2024-08-17 by rgomezwap Hi, I think there is a small misunderstanding. I've been preparing the firmware for ESP32 S3, and you asked me for the one for ESP32 C3. They are different CPUs from Espressif. Anyway, I'll prepare the firmware for C3 later with my build system to see if it works well. And I'll share it on the forum. Posted at 2024-08-17 by rgomezwap I've posted in this forum, but it's not the right one. Posted at 2024-08-18 by rgomezwap Hello @user158605 , I'm uploading the two firmware of the latest version of Espruino, both with Bluetooth, Wi-Fi, and Telnet. Let's see if you can test them and if they work correctly for you. Best regards, Attachments: Posted at 2024-08-28 by @gfwilliams @rgomezwap does the C3 firmware you compiled connect to WiFi ok? I guess it's possible the 4.4.8 upgrade fixed it? Posted at 2024-08-28 by @MaBecker Wifi is not broken on 4.4.7, we need to understand that if the board is already connected a another connect will break things. The folowing code will check for that situation:
You can upload this code as ofen as you like and the ESP32 board will not reboot! Edit: Posted at 2024-08-29 by rgomezwap Hello @gfwilliams, I’ve only tested the S3 myself, and it seems to work fine at first glance. Let's see if another user can give us feedback on the C3 firmware, and if not, I'll test it myself when I have the chance. Posted at 2024-08-29 by @gfwilliams I've just been looking into this more with the WiFi logging enabled, and I see (even with
With BLE enabled (the default) I see: But the interesting bits are:
I tried to google the connection errors for C3 and I actually see this which seems interesting, and implies it's actually broken hardware which might explain why it worked for me initially: esphome/issues#4893 The suggestion is to set the transmit power, but that didn't work for me :( Posted at 2024-08-29 by @gfwilliams And these two as well, also blaming faulty supermini boards which I was using:
Just tried a board @MaBecker supplied with no USB on it, and it works great. You just need to stop the Ap first with stopAP:
Or once you've done ... but I've now pushed a change which automatically stops the AP if assuming you don't have a broken ESP32C3 supermini board Posted at 2024-08-29 by @MaBecker i think it has to do with wifi power setting mentioned here espressif/arduino-esp32#6767 (comment) Posted at 2024-08-30 by rgomezwap It seems like this might be a hardware issue with certain boards. Could you please indicate which boards work well or which ones don't, so that new users can avoid encountering this problem? Thanks Posted at 2024-08-30 by @fanoush In the info @MaBecker linked it looks like the C3 mini with black ceramic antenna is bad and the red one may be OK? And also the older "Lolin C3 mini" with PCB antenna is bad (some HW fix here) while newer one (V2.1.0) with ceramic antenna is better? EDIT: by the first C3 mini with red/black antenna I meant something that looks like this board https://www.waveshare.com/esp32-c3-zero.htm but maybe I am wrong? Posted at 2024-09-02 by @gfwilliams
Just FYI I have two superminis with red antenna and they're also bad, so it's not specifically the antenna (I haven't tried C3 mini). Recent builds now do set the wifi tx power, but that doesn't appear to be enough for my boards. They did at one point connect to wifi ok, so part of me wonders whether without the power setting they were using high power to the mismatched aerial and they've actually now damaged themselves. Posted at 2024-09-02 by @MaBecker The highest power setting is "none" which is onl available when BLE is switched off. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-12 by Jurand
Has anyone successfully flashed Espruino on this chip?
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions