I'm new on this forum, so i hope I've opened this topic in the correct location... if I'm wrong, I'm sorry... i Hope i'll will learn soon how to use this tool
I'm a Computer Science Engineering student, I've learned the "mythical" world of microcontrollers and ChibiOs/RT during a project at my university, and now I hope to use this awsome RTOS also for fun and "Industrial projects"
Ok, now I'll stop make you loosing time and start with my question
I've already set-up a basic chibiOs envirorment in eclipse, with CodeSourceryLite toolchain, and openocd to comunicate with the on-board stlink-v2, following some tutorials on this website and on the web...
All works fine... well... I should say only "works".
I've noticed some strange behaviours: firs of all, i must push the board reset button in order to let openocd connect with the board. I've tried already some version of openocd and this behaviour hasn't change yet.
the console output is the following:
Code: Select all
adapter speed: 1000 kHz
srst_only separate srst_nogate srst_open_drain
Info : clock speed 1000 kHz
Error: init mode failed
in procedure 'transport'
in procedure 'init'
The second point is that also the gdb connection seems to behave like openocd: i must push the reset button while connecting, connection fails and then i'll be able to launch again the gdb connection, this time succesfully. in this case, the console shows an error with the command target-extended.
this if I didn't push the reset button:
Code: Select all
Failed to execute MI command:
-target-select remote localhost:3333
Error message from debugger back end:
Remote connection closed
Remote connection closedfirst time I start gdb:
Code: Select all
Failed to execute MI command:
load /path-to-executable/ch.elf
Error message from debugger back end:
Error erasing flash with vFlashErase packet
Error erasing flash with vFlashErase packetand then, the second time works...
aside from that, the debugger didn't work very well... it almost didn't work at all. that's not a huge problem, because as a java developer I'm used to debug via System.out/chprintf
anyone has suggestions? there is anyone that managed to get the stm32f4-discovery toolchain working perfectly on Linux?
I can post my configuration settings etc if needed...
Thanks for reading all this huge post, and sorry for my bad english
Boris