-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Failed to access data for an ELF segment??? #77
Comments
Can you flash with |
I can't use minichlink,because I'm not using the winusb driver. |
Okay, then Can you upload the exact project files? It seems to be https://github.com/wagiminator/Development-Boards/blob/main/CH32X033F8P6_DevBoard/software/debug_serial but with some modifications. |
With wch-link, it uploads the code, but the LED is not blinking anymore! blink.zip |
Look in the debugger. You're hanging up in the DEBUG_write() function which waits for the character to be written (Transmit Empty), but that can never happen because your A main function of int main(void) {
// Setup
PIN_output(PIN_LED); // set LED pin to output
DEBUG_init();
// Loop
while(1) {
PIN_toggle(PIN_LED); // toggle LED
DLY_ms(1000); // wait a bit
DEBUG_newline();
DEBUG_printD(count++); // send string
}
} gets the LED blinking again. |
Thanks to your project, I can reproduce the error
and will look into it. Maybe we need a |
This error is reproducable in the latest version of wlink and now tracked in ch32-rs/wlink#77. Please use You can also debug with it. Just open the debug sidepanel and click on the green Play button next to "PIO Debug". You can even view all perpiheral registers. |
Will update the PlatformIO binaries for |
The updated binaries have been submitted to registry as
|
All binaries were actually updated in https://github.com/Community-PIO-CH32V/tool-wlink/ (PIO registry unused for that package), so it should all work right now. |
Hello
I have an issue with the following code:
The code does compile, but I get the error: Failed to access data for an ELF segment.
When I remove the last 2 lines, the code uploads without any issue.
Does someone have an idea why I'm getting this error?
TIA
The text was updated successfully, but these errors were encountered: