Bin file generated by keil

Imported from mbed online compiler to keil studio.
When importing, an mbed-os version error occurred, so I updated to version 5.15.9 and the error disappeared.
The error went away, so I built and ported the bin file to the device(HEXIWEAR).
When I run it, nothing appears on the screen.
Just in case, after compiling with the online compiler as it is, porting the bin file and running it works fine.
What should I do?

Hi there

First, you can update the Mbed Os version to 5.15.9 already in old Online compiler and you will see the impact. That will tell you if this behavior is connected to change of tool or change of Mbed Os version.

Next you need checkpoints in the code what will tell you the program really running, or where stops

  • check output of default console
  • place printf across the code or set some led blinking

For example

#include "mbed.h"
// Blinking rate in milliseconds
#define BLINKING_RATE     500ms

DigitalOut led(LED1);

int main()
   printf("Main starts here\n");
   // some code
   printf("Init is done entering the while loop\n");
    while (true) {
        led = !led;

excepted out output in PC serial terminal

Main starts here
Init is done entering the while loop

BR, Jan

When importing mbed-os in the online compiler, the version is not listed separately.

I’ll have to try the way to check it in keil studio output.

That is not correct way how to do that.
You have to right click on mbed-os and chose Revisions..., then chose a MbdOS version (tag with 5.15.9), again right click and select Switch working...

BR, Jan

Oh! Thanks to you, I changed the version and compiled and ported it.
It’s the same phenomenon that the device screen doesn’t open at all.
After changing the version to 5.1.4 in keil studio and porting the bin file, it works properly.
thank you!

1 Like