Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] STM32F3 Discovery + GNU ARM plugin + OpenOCD - cannot load the binary onto the board

Status
Not open for further replies.

Alexium

Full Member level 2
Joined
Jan 6, 2011
Messages
148
Helped
39
Reputation
78
Reaction score
39
Trophy points
1,308
Location
Ukraine
Activity points
2,163
Hello,

I'm using the GNU ARM plugin for Eclipse with Open OCD as a debugger. This is on Windows 10 x64. The problem I'm facing is the following error when trying to debug or run the sample program:

Error in final launch sequence
Failed to execute MI command:
load C:\\Development\\stm32-test\\Debug\\stm32-test.elf
Error message from debugger back end:
Load failed
Failed to execute MI command:
load C:\\Development\\stm32-test\\Debug\\stm32-test.elf
Error message from debugger back end:
Load failed
Load failed


There are several kinds of STM32 project templates that the ARM plugin offers. Most notably, there's the "STM32Fxxx C/C++ project", and it works out of the box no problem. But it's bundled with the old version of STM32 library. I wanted to use the latest STM32F3Cube, so I used the other template - "Hello World ARM Cortex-M C/C++ project", as per the recommendation of this article. It's designed for use with the STM32F3Cube, and it's the one I can't load onto the board.

Please tell me what further information is needed for dealing with this issue, or how I can collect more detailed logs etc. I'm in urgent need of a working project skeleton.
Thanks in advance.

P. S. I have compared the debug configuration settings between the working and non-working projects, and found no difference. Same .cfg file, along with everything else. Is my .elf being rejected because there's something wrong with it?
 

Found the problem: I didn't notice that I also need to edit the flash origin address in the mem.ld script. It's mentioned in the article I referred to, but I missed it. Doing that solved the issue.

Another thing of note is that I also mistakenly specified that my STM has 48k RAM, so when I dealt with the flash problem and my binary was loaded onto the board, nothing still worked - breakpoints were never hit and the GPIO LED wasn't blinking as it's supposed to. Setting the RAM size to the correct value of 40k in the same mem.ld script solved that problem, and now everything works.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top