I am not sure if this question really belongs in this forum, but I am facing a somewhat weird issue when using the Arduino IDE. My goal is to use Serial Monitor so that I can see everything I am printing using Serial.print().
I am programming a CH32X035 board and have installed appropriate board managers to support the board. The code compiles successfully and when I do the blink test by uploading, the blink test also seems to be passing. On each code update, when I upload, the blinking LED changes just the way I want it to.
However, when I upload, I always get Upload Error even though the uploaded code is reflected on the board. This is the exact log:
Info : WCH-LinkE mode:RV version 2.11
Info : wlink_init ok
Info : clock speed 6000 kHz
Info : [wch_riscv.cpu.0] datacount=2 progbufsize=8
Info : [wch_riscv.cpu.0] Examined RISC-V core; found 1 harts
Info : [wch_riscv.cpu.0] XLEN=32, misa=0x40901105
[wch_riscv.cpu.0] Target successfully examined.
Info : starting gdb server for wch_riscv.cpu.0 on 3333
Info : Listening on port 3333 for gdb connections
** Programming Started **
Info : device id = {someID}
Info : flash size = 62kbytes
** Programming Finished **
** Verify Started **
** Verified OK **
Failed uploading: uploading error: exit status 1
Can anyone shed some light into what might be the issue?
Hi @smaharj1. I don't have any experience with the CH32 microcontroller so I'm not sure I can be of any assistance. However, I will suggest that you post the full verbose output from an upload attempt. It is possible it will provide information that will allow us to understand why the upload process is returning an exit status of 1.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Uncheck the box next to Show verbose output during: ☑ compilation in the "Preferences" dialog.
Check the box next to Show verbose output during: ☐ upload.
Click the "OK" button.
Attempt an upload, as you did before.
Wait for the upload to fail.
You will see a "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
Open a forum reply here by clicking the "Reply" button.
Click the <CODE/> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the error output from the upload into the code block.
Move the cursor outside of the code block markup before you add any additional text to your reply.