What does it take to build and flash AXO fw from Eclipse IDE


#1

Hi

I've built a tool chain based on gcc, openOCD and Eclipse as IDE.
After a few adjustments (:slight_smile:) I was able to connect to the STM32 through ST-link/V2 and to flash a simple "blink program" into it.

As a next step, I wanted to flash (and therefore be able to debug) what is normally loaded as Axoloti's firmware.
That is, the content of the 'Axoloti/app/firmware' folder.
I also copied the chibios and CMSIS folders to be part of the Eclipse project.

The code analyzer gives me quite a bit of unresolved references, but I decided to build (after changing some references in the makefile) and the process went through with no errors.

However, when I launch the debugger, I get a

undefined debug reason 7 - target needs reset
target state: halted
target halted due to debug-request, current mode: Thread target state: halted
xPSR: 0x01000000 pc: 0x080699a0 msp; 0x20000200
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080699a0 msp: 0x20000200
Error: Memory write failure!

type of error, and the application (again, a simple blinking program) does not start.

I set ./bin/obj/main.o as the application to debug...is this correct?

I have no experience with this but I noticed that the simple blinking example makefile has a main.out as output, and this is what is targeted by the debugger in that case.

I can imagine that this can easily go wrong with changes of base addresses and what not...all stuff I still have to dig into and understand...So I'd be grateful if anybody would give me few hints about how to proceed.

Thank you in advance,

Michele


#2

No, specify ./build/axoloti.elf as application to debug, image and symbols. No need to specify a base address for debugging with a .elf.


#3

Indeed @johannes :smile:
I came to the same conclusion yesterday night finally :blush:

Thx!

Mike