Can you use GDB for your app code if soft device was merged in the final hex?
Can you use GDB for your app code if soft device was merged in the final hex?
It appears GDB could interfere with the programmed softdevice.
If by GDB you mean compiling on GCC, it does not interfere with softdevice. You just separately flash app compiled in GCC and funcions calling to softdevice communicate with it by SVCALLs. Just keep memory layout as specified in softdevice specification.
GDB doesn't read the hex file, it's only used for uploading the code to the chip, so if you have GDB issues, it has nothing to do with merged hex files.
Sorry, I wasn't clear.
I'm using GCC+GDB+OpenOCD to step through code, and it appears if GDB steps through a SVCALL the microcontroller resets but if I run the example code without using GDB the code works fine.
Were you successful in using GDB with softdevice ? If so how did you mange that?
To program the micro I would use nrfjprog.
thanks!
Hi, Because of how the SoftDevice works you are not able to debug it by stepping the code. This is because it will report a fault upon failing timing checks. These timing checks are critical in order to be able to operate a BLE connection. Best regards, Øyvind Øyvind Karlsen (5 hours ago)
GDB seems to reset the chip on a SVCALL. I step through code, but resets up calling a SVCALL.