Using eclipse to flash/debug
Posted: Sat Oct 08, 2016 10:40 pm
Hey -- I was hoping someone could help me get setup with Eclipse configuration for openocd flashing/debugging. I'm on a windows PC and unfortunately at the moment I don't have a PC that's capable of running the bitcraze VM so I can't use that (nor can I go look at the eclipse config in the VM).
I have open-ocd all set up and working properly: I can 'make flash' over SWD and I can connect up and step through the code in eclipse, but the steps I need to take to get there are pretty cumbersome. My workflow goes like this:
1) make a code change
2) <terminal> make CLOAD=1 DEBUG=1
3) make flash (successfully flashes over openOCD)
4) for some reason, this step blows away the STM32 bootloader, so
5) cd ..\crazyflie2-stm-bootloader
6) make flash
7) crazyflie boots up
8) jump over to eclipse, start debugging (currently configured to reset, break on main, and NOT load an image)
9) hit the reset button on the debug board
10) hit my breakpoint at main
I'd really like to just build and then use eclipse to load the firmware. I haven't been able to get the "load image" option to work right, though -- is there an image offset required? I've tried 0x4000 and 0x80004000 (from the makefile) but those don't work either. I've done this plenty of times for other chips so I don't know why I'm having so much trouble with it.
Also, I think I've asked this before but never chased it down -- any ideas why 'make flash' destroys the STM bootloader?
Thanks
Sean
I have open-ocd all set up and working properly: I can 'make flash' over SWD and I can connect up and step through the code in eclipse, but the steps I need to take to get there are pretty cumbersome. My workflow goes like this:
1) make a code change
2) <terminal> make CLOAD=1 DEBUG=1
3) make flash (successfully flashes over openOCD)
4) for some reason, this step blows away the STM32 bootloader, so
5) cd ..\crazyflie2-stm-bootloader
6) make flash
7) crazyflie boots up
8) jump over to eclipse, start debugging (currently configured to reset, break on main, and NOT load an image)
9) hit the reset button on the debug board
10) hit my breakpoint at main
I'd really like to just build and then use eclipse to load the firmware. I haven't been able to get the "load image" option to work right, though -- is there an image offset required? I've tried 0x4000 and 0x80004000 (from the makefile) but those don't work either. I've done this plenty of times for other chips so I don't know why I'm having so much trouble with it.
Also, I think I've asked this before but never chased it down -- any ideas why 'make flash' destroys the STM bootloader?
Thanks
Sean