MBED Compiles in Keil uVision but won't run on device

I am looking for some help on how to debug an issue on my MBED NXP LPC1768 board. It is programmed via USB and appears as a drive when I plug it in on my windows machine.

I recently exported my project from the online compiler into Keil uVision, (so that I can use proper version control features in GIT), and after a lot of modifying paths, it now successfully builds into a binary file in Keil. However, when I put that Bin file on the USB drive, it fails to start up. However, I can remove it from the USB drive and then the last project boots up fine. If I build this same project in the online compiler, it boots up fine.

I have another project built in Keil uVision that DOES build and run on this MBED, so I know it is possible to do with this version of mbed-os and Keil uVision.

So my question is what tools/techniques are there to help debug/diagnose why it isn’t booting up? Its not bricking the unit, there is no serial output, and it compiles to a bin file without errors, so I’m not sure what the next step is on how to debug the issue!

Any help or advice would be hugely appreciated.

Hello,

maybe some clarification would be handy.

  • Just for sure. With Keil uVision do you mean real Keil uVision or Keil Studio Cloud?
  • What versions of MbedOs were used? Before > after and so on.

When the binary file still remain in disk drive then DAP-Link refused the file. So there is nothing for the debugger.

What about your DAP-link firmware?

BR, Jan

Sorry, I’ll provide more info:

Its the ‘Real’ Keil uVision (v5.24), we have a full license for it. I move the project out of Keil Studio Cloud into Keil uVision.

I am using MBED OS2 for both projects, the one that builds and runs, and the project that builds but doesn’t run. I know there are later versions of MBED OS which I use for other projects but the changes would require a full re-write so I have left this project on MBED OS2.

I believe The DAP firmware version is rev 16457?

In the HTM file, it says:

  • loader=11972
  • firmware=16457
  • configuration=4

As I said, I have a project which will build and run from the same version of Keil uVision onto the same exact MBED LPC1768, so I need to work out why the binary file is being rejected. I tried putting an infinite loop at the beginning of main that just prints a character, hoping the compiler would optimise everything else out and then I could work out at which point it was crashing by moving the infinite loop further into the program, but it never prints anything out.

I am not sure, but DAP-link maybe generate a txt file where is an error why the binary was refused.

BR, Jan

No Text file unfortunately