logo elektroda
logo elektroda
X
logo elektroda

LUATOS ESP32C3 Board - Issues Flashing D4 LED with Arduino 2.0

Michal_212 3378 17
Best answers

How can I make a LUATOS ESP32-C3 board flash the D4 LED from an Arduino sketch when upload succeeds but the LED does not blink and the serial output shows an error?

Set Flash Mode to DIO instead of QIO for this LUATOS ESP32-C3 board; after changing that, the sketch uploaded correctly and the LED on GPIO12 started blinking [#20361623] If the board still behaves oddly, try erasing all flash before uploading because these boards may come with preloaded firmware and custom flash partitions [#20358671] The serial message seen after reset was identified as a core dump/error, not normal output [#20358689] The partition scheme setting only controls how flash is divided between the application, SPIFFS, OTA, etc. [#20361632] For larger flash chips, the largest standard app partition mentioned was about 4 MB, and a custom partition scheme would be needed to change that [#20363432]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 20358412
    Michal_212
    Level 3  
    Posts: 128
    Rate: 13
    Hi

    I have a module bought on Allegro which has an ESP32-C3 chip, 4MB (32Mb) flash memory, USB C socket with USB - UART converter, two LEDs and two RST and BOOT buttons built in. Here is the Chinese website for this module with information about it: https://wiki.luatos.com/chips/esp32c3/board.html

    I have Arduino 2.0 installed, in the board manager I installed the ESP32 package. I selected "ESP32C3 Dev Module" from the list of available boards. I wanted to upload a simple program that flashes the D4 diode (GPIO12). I have the settings in Arduino as follows:

    LUATOS ESP32C3 Board - Issues Flashing D4 LED with Arduino 2.0

    I compile and upload the code, I have no errors. It's just that I don't flash the D4 diode, and in the terminal I get something like this:

    LUATOS ESP32C3 Board - Issues Flashing D4 LED with Arduino 2.0

    As if something else was uploaded? What is it about? Apparently my program uploaded via UART.
  • ADVERTISEMENT
  • #2 20358530
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 784
    Arduino settings correct.
    The only thing to question is the JTAG Adapter.
    Show what program you uploaded (or where you downloaded it from).
  • #3 20358577
    Michal_212
    Level 3  
    Posts: 128
    Rate: 13
    The programme is not fancy. The whole thing looks like this:

    Code: Arduino
    Log in, to see the code



    Not even UART support here so nothing I should rather receive in the terminal.
  • ADVERTISEMENT
  • #4 20358606
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 784
    What does this ESP look like. There are different models of the processor.
    Attachments:
    • esp32-c3_datasheet_en.pdf (53.26 KB) You must be logged in to download this attachment.
  • #5 20358671
    Anonymous
    Level 1  
  • #6 20358685
    urkotrebor
    Level 21  
    Posts: 334
    Help: 37
    Rate: 80
    What is displayed in the terminal is a kind of ESP32 business card , this is how I have at least on the boards I have , this happens after every reset .
    The LED does not flash because if I remember correctly it is connected to GPIO2 (pin 2).
  • #7 20358689
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #8 20358697
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 784
    urkotrebor wrote:
    The diode does not flash because if I remember correctly it is connected to GPIO2 (pin 2).
    It is not clear if the author has this one in mind. In addition, the processor detects the error: "flash config is corrupted".
  • #9 20358819
    Brendy8606
    Level 3  
    Posts: 260
    Rate: 58
    I programmed exactly this ESP.
    It also did not want to talk to me, but it is already working. Before connecting to the port, do you press boot to enter flash mode? Then release and load. Disconnect from power and reconnect to exit flash mode. And most importantly, what version of board?
  • ADVERTISEMENT
  • #10 20358881
    Michal_212
    Level 3  
    Posts: 128
    Rate: 13
    inot wrote:
    What this ESP looks like. There are different processor models.


    This is the ESP32-C3 chip.

    khoam wrote:
    I suggest to start by activating the option "Erase All Flash Before Sketch Upload" (at the moment you have Disabled) and load the test program again.



    Selecting this option does not change anything.

    inot wrote:
    It is not clear if the author has this one in mind. In addition to this, the processor detects the error: "flash config is corrupted".


    Yes, the program should flash the LED on GPIO12 pin i.e. D4.

    Brendy8606 wrote:
    Before connecting to the port do you press boot to enter flash mode? Then you let go and upload. Then unplug it and plug it back in to get out of flash mode. And most importantly what version of boardow?


    I am programming in this way. Up until about 2 weeks ago I was programming the ESP8266 similarly, without any problems.
    In the Arduino at the bottom of the window appears the charging progress which reaches 100% and after reset, the LED does not flash and in the console I have the above. If you mean the version in Arduino then I have installed ESP32 from Espressif version 2.0.6.

    khoam wrote:
    Probably there is a Lua interpreter "preloaded" in this board and specific flash partitions are created.


    Maybe this is where the problem lies? Maybe some other bootloader needs to be uploaded?
  • #11 20359090
    Brendy8606
    Level 3  
    Posts: 260
    Rate: 58
    I mean Board Manager,also take into account that Arduino above 2 still contains a lot of bugs.
    Try it on Arduino 1.8.16 and board version 2.0.5
    I've programmed 10 pcs recently and they all work and I didn't change any botloaders or other miracles bought from two different places.
  • #12 20359199
    Anonymous
    Level 1  
  • #13 20361623
    Michal_212
    Level 3  
    Posts: 128
    Rate: 13
    I managed to upload the program correctly. I found on some Chinese forum that for a similar board in Arduino settings Flash Mode -> DIO must be selected. I had QIO changed to DIO and after uploading the program the LED flashes :)

    By the way. Someone is able to explain to me what this setting is all about? With this Partition Scheme
    LUATOS ESP32C3 Board - Issues Flashing D4 LED with Arduino 2.0

    What is being set here?
  • #14 20361632
    Anonymous
    Level 1  
  • #15 20363245
    Michal_212
    Level 3  
    Posts: 128
    Rate: 13
    Ok, only from what I understand, it comes out that I can't use the whole 4MB for program code? At least I don't see a setting that would allow this, they all have APP and SPIFFS shared.
  • #16 20363289
    lopr_pol
    Level 32  
    Posts: 1691
    Help: 161
    Rate: 476
    The entire 4MB will not be given to you because there is still software such as wifi, tcp, etc. sitting around.
  • #17 20363313
    Michal_212
    Level 3  
    Posts: 128
    Rate: 13
    Well ok, but if I were to swap the Flash memory for a larger one e.g. 16MB (128Mb) then as far as I can see I only have a choice of two settings for that memory and the largest one only gives me 3MB for APP memory (i.e. I understand my code?) and 9.9MB for FATFS. And seriously more can't be allocated for program memory?
  • Helpful post
    #18 20363432
    Anonymous
    Level 1  

Topic summary

✨ The discussion revolves around issues faced while flashing a D4 LED (GPIO12) on a LUATOS ESP32-C3 board using Arduino 2.0. The user successfully installed the ESP32 package and selected the correct board but encountered problems with the LED not flashing after uploading a simple program. Responses suggest checking the JTAG adapter, ensuring the correct flash settings, and possibly the presence of a preloaded Lua interpreter affecting the board's operation. A key solution involved changing the Flash Mode setting from QIO to DIO, which resolved the issue. The conversation also touched on partition schemes for flash memory, indicating limitations on program memory allocation due to reserved space for other software components.
Generated by the language model.

FAQ

TL;DR: If your LUATOS ESP32‑C3 won’t blink D4, use Arduino IDE 1.8.16 with ESP32 boards 2.0.5; one user flashed 10 units successfully—“Arduino above 2 still contains a lot of bugs.” [Elektroda, Brendy8606, post #20359090]

Why it matters: This FAQ helps Arduino users fix upload and LED issues on LUATOS ESP32‑C3 boards fast, without guesswork.

Quick Facts

How do I fix the LUATOS ESP32‑C3 D4 LED not blinking after upload?

Set Flash Mode to DIO in Arduino IDE. The author fixed blinking by switching from QIO to DIO. Open Tools > Flash Mode, choose DIO, then re‑upload. This change resolved the upload and the LED started blinking. [Elektroda, Michal_212, post #20361623]

What is the correct Arduino board selection for this module?

Select ESP32C3 Dev Module in the Arduino IDE after installing the ESP32 boards package. A responder confirmed the author’s Arduino settings were correct. This matches typical LUATOS ESP32‑C3 usage. [Elektroda, inot, post #20358530]

Which GPIO pins drive the onboard LEDs on the LUATOS ESP32‑C3?

This board has two onboard LEDs. They are wired to GPIO12 and GPIO13. Map your blink sketch to those pins as needed. [Elektroda, khoam, post #20358689]

Why does the Serial Monitor show a core dump after reset?

That output is a core dump from a crash. It does not occur on normal resets. Fix configuration or flash settings to stop crashes. As one expert noted, it appears “as a result of an error.” [Elektroda, khoam, post #20358689]

What does the message “flash config is corrupted” indicate?

It means the processor detected a corrupted flash configuration. Resolve this before relying on your sketch. Investigate flash mode settings and re‑flash cleanly. [Elektroda, inot, post #20358697]

Should I enable “Erase All Flash Before Sketch Upload”?

Enable it when switching from factory firmware. Some boards arrive with a “preloaded” Lua stack and custom partitions. Wiping flash removes conflicts before uploading. Use Tools > Erase All Flash Before Sketch Upload, then try again. [Elektroda, khoam, post #20358671]

How do I enter bootloader/flash mode on this board?

Follow these steps to program reliably:
  1. Hold BOOT before connecting to the port.
  2. Release BOOT and start the upload.
  3. Disconnect power and reconnect to exit flash mode. [Elektroda, Brendy8606, post #20358819]

Do I need a JTAG adapter to program the LUATOS ESP32‑C3?

No. A JTAG adapter is not required for this model. It is not the cause of the upload issue discussed. Use standard Arduino flashing. [Elektroda, khoam, post #20358671]

Which Arduino IDE and ESP32 boards version is most stable here?

Use Arduino IDE 1.8.16 with ESP32 boards 2.0.5. One user programmed 10 units successfully. “Arduino above 2 still contains a lot of bugs.” Switch if Arduino 2.x blocks uploads. [Elektroda, Brendy8606, post #20359090]

What does the Partition Scheme setting actually do?

It defines how flash is divided. You choose how much space goes to the app, SPIFFS/FATFS, and OTA slots. Pick a layout that fits your flash size and needs. [Elektroda, khoam, post #20361632]

Can I use the full 4MB flash for my application code?

No. You cannot allocate the entire 4MB only to your app. System components like Wi‑Fi and TCP occupy space. Expect a smaller effective app size. [Elektroda, lopr_pol, post #20363289]

If I upgrade to 16MB flash, can my app partition be larger?

Yes, but the largest single app partition is about 4MB. Create a custom partition scheme to change allocations. “From what I gather the largest partition size for a program is 4MB.” [Elektroda, khoam, post #20363432]

What minimal blink code should work for GPIO12 (D4)?

Use this simple sketch: void setup(){ pinMode(12, OUTPUT); } void loop(){ digitalWrite(12, HIGH); delay(1000); digitalWrite(12, LOW); delay(1000); } Upload after setting the correct Flash Mode and board. [Elektroda, Michal_212, post #20358577]
Generated by the language model.
ADVERTISEMENT