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.
5 years, 5 months ago.
Application program simply doesn't start
Hello, I kindly ask for help:
Components: NUCLEO-L053R8 (Version: 0200 Build: Aug 27 2014 13:29:28 out of its mbed.htm), Win8.1, an FTDI-USB/serial converter using 3V3 and a simple LSA (Embedded Artists' LabTool).
I compiled and let run few mbed programs on this hardware, all of them were module test frames. Some test data were sent to the NUCLEO via PA10 and few debug infomation was sent back via PA9. A simple LSA is connected to PA9 and PA10 to watch the serial traffic and to other output pins (PC7, PB6, PA7, PA6, PA5) as debugging aid. The program is about 17.6kB long and uses 2.2kB RAM (plus stack of course). Very simple. All this usually works fine. Normally the program starts immediately after download and "does something" when I run the test data generator on the PC.
Now the program simply doesn't start: It is compiled, downloaded onto my PC and then downloaded to the NUCLEO, but nothing happens - neither immediately when download has finished (I should see it in the LSA output as I set PA7 to 1 at the beginning of main()) nor when I send the test data. It also doesn't start when I hit the reset button. Nothing. All tree LEDs are on: LD1, LD2 and LD3.
Then I accidentially deleted the .bin file from my downloads directory (on the PC!) and was able to start the program, it not only worked, it even worked correctly. So I became accustomed to this ritual: Compile, download to the PC, download to the NUCLEO, delete from the PC, start the test data generator on the PC to feed PA9 and log PA10. Download is performed by dragging and dropping the .bin file from the download directory to the device which is listed as "NUCLEO (J:)" in the left column of the explorer.
Now even this doesn't work any more. The program doesn't start whatever I do. It does not help to recompile and try again, this ugly state is stable. I do not think that I have broken the device: When I compile, download and download another program (just another module's testframe) it starts and works correctly. Reverting to the "ill" program does not help, it remains "ill".
Is this a known behaviour? Is there any problem in the loader? Is there any workaraound? Is there an update which I don't know of? Is there any other solution?
Thank you very much in advance. Sincerely, Helmut
P.S.: I wanted to start a discussion instead of posing a question, but this didn't work.
Question relating to:
5 years, 5 months ago.
This is probably a software bug in your code since other programs are still working. Possible cause could be that you use a pin for an illegal function. For example assign a wrong pin to the TX or RX of a serial port, or swap a TX and RX pin. Do some tests by incrementally disabling declarations/instantiations until things start working again. Note that all global instantiations and constructors are executed BEFORE the first line of code in your main is executed. A crash in an instantiation will explain why PA7 is never set.