Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 3 months ago.
mbed lpc1768 and lpcxpresso - program not loaded after reset + size question
I'm using the LPCxpresso IDE (under ubuntu) to program my mbed lpc1768. I was plesantly surprised by the existance of the "export to lpcxpresso" feature on the website and CMSIS-DAP support (after upgrading to the latest firmware)!
While I am able to debug and flash my programs I am running into some issues which I hope someone will be able to help me with:
1. I can flash a program to the device and it runs.. but once I press the reset button on top of the mbed device the uC does not come up again. I suspect this is because it is looking for something on the "disk" storage of the mbed and since there is nothing there, the device is held in reset. How can I bypass this?
2. Even the "hello world" blinky example is HUGE and takes a while to program due do the SDK size. Aside from changing compiler optimizations is there a means to drop this size?
3. I find I can program the device reliably only once. To program the device again requires me to unplug the usb cable and plug it back in again. Has anyone come across this?
1 Answer
11 years, 3 months ago.
There are probably other options, especially since I don't use offline compilers often, but:
1. A workaround is at least if you want to program it, to simply drag bin file on the mbed file system. Bin file should be somewhere in the build folder of your project.
2. Changing the used C lib, no idea if ti is possible with LPCxpresso and how to do it. But for example the online compiler uses two different C libs, one for large targets and one for smaller ones (And all Nucleo boards use that one too). Also some compiles will always include stdio, even if it isn't used. (Probably somewhere in settings somehow). But for a HelloWorld program it is probably huge, however it shouldn't take that much of your entire device. And this will be mainly one-time cost: If you make a larger program your binary size won't grow that fast. Same for RAM usage: Mbed lib reserved RAM for both NVIC interrupt vectors and interruptin pins for example, but also this is just a one-time cost, and the vast majority of your SRAM should still be available.
I have learned that if I kill redlinkserv that I can program the flash again without having to plug/unplug stuff. Now I'm trying to figure out what's going on here.. hmm
posted by John Seech 13 Jul 2014