9 years, 9 months ago.

How can I work in off-line mode.

Good day,

We are interested in your board (u-blox C027 with GSM and GPS modules). Moreover, we already ordered and got such board for evaluation purposes.

I am programmer and I am going to work with this device, but I have questions: (1) I saw your on-line compiler (briefly) but I can not find debug options. Is it possible to set up break points inside my code and then doing step-by-step execution on the real board? Is it possible to see register values along with statuses of periphery on the real board with your on-line service? (2) What happens if I upload into device my binary with errors (for example, the program stucks inside hi-priority ISR)? Can I reload new binary using your bootloader? (3) (Main question) How can I work with the board in off-line mode like with Keil or IAR IDEs? I.e. how to connect and setup IDE to erase, program and debug my firmware on your board?

Looking forward to hearing from you.

Regards, Vladimir.

2 Answers

9 years, 9 months ago.

1. The online compiler cannot do this. Printf style debugging if obviously possible, and really can get you very far, but it does not support step-by-step instructions, breakpoints, etc.

2. I don't have a u-blox myself, but I do have several others with (almost) same bootloader. I have never been able to get it to stop being able to load new binaries. The important reason here is that the bootloader runs on a seperate IC and functions as debugger. So the only normal way in which it should be possible to brick your target is by bricking it in such a way no programmer can make it function again. I have had some times which the regular bootloader couldn't unbrick it, however that brings us to point 3:

3. The interface IC not only runs the MSD bootloader and Serial <> USB bridge, it also implements a CMSIS-DAP debugger. You can export your mbed project from the online compiler to for example Keil, and then work in it. This is the easiest way to have a comlpete mbed enabled setup in Keil, but of course of you prefer you can also just start a blank LPC1768 project in Keil. The u-blox should be recognized as CMSIS-DAP debugger by Keil which can be used for step-by-step debugging, breakpoints, etc.

Edit: Forgot to press send, so Martin was before me.

Accepted Answer

First !!! Beat you by 25 minutes :P

posted by Martin Kojtal 15 Jan 2015

Thanks a lot for answers!

As I understand from your words, when I connect the device to my PC it shows 3 endpoints, one of them is mass storage (disk), another - cmsis-dap point, which is recognized by gdb (like in the first answer) OR in Keil, like this: http://www.keil.com/support/man/docs/dapdebug/dapdebug_introduction.htm

Right?

Regards, Vladimir.

posted by XVlad XVlad 15 Jan 2015

I have never used a gdb myself, but yes in Keil it gets recognized as debugger which will do everything a debugger should do. It shows up like this: http://www.keil.com/support/man/docs/dapdebug/dapdebug_debug_cfg.htm. IIRC it automatically recognises thats the debugger you have plugged in, I believe it is called mbed CMSIS-DAP, but in the end it just works like any other debugger such as for example ST-link.

As shown in that link there you can also set the debugger to use software reset instead of hardware reset, handy to unbrick after you switched your reset pin to GPIO and wonder why it can't program new binaries anymore ;).

posted by Erik - 15 Jan 2015

It works! I installed driver from this site for EndPoints (MassStorage, VirtualCom, CMSIS-DAP) and then Keil works. Great thanks!!! :)

Vladimir.

posted by XVlad XVlad 15 Jan 2015
9 years, 9 months ago.

Hello,

the online IDE builds the application, no debugging on site, all have to do offline - download a binary, copy to the mbed drive (=flash). Yes, can reflash it again. It has 3 endpoints, one fo them is cmsis-dap , so you can use gdb like pyOCD or openOCD to debug your software (apart from IDES like uVision). The exporting should work out of the box , the project is set up to just build and flash the program, open a debug session.

It's possible to export a project to offline tools, their support depends on availability.

Regards,
0xc0170