Fail Build Nucleo F042K6 with MBED OS 5 / Keil Studio

Hello,

I tried to compile code for Nucleo F042K6 with Keil Studio and MBED OS 5.10, 5.14 and 5.15 and the output console indicates that “Target does not support mbed OS 5” while it seems compatible on the Nucleo F042K6 overview (NUCLEO-F042K6 | Mbed).

Does someone have a solution to compile on Nucleo F042K6 ?

Hello,

is can be but because it is very low memory target (32 KB Flash, 6 KB SRAM) then it is not able to run full profile so you should set baremetal profile.

You have to create a file called mbed_app.json in your project folder and place inside settings from this page under section 1. point 4. Then reactivate your project in Keil Studio and should be fine.

BR, Jan

I had similar problems, got around it by downgrading from v5.15 to 5.14, both in bare-metal model. This can be alternative to Jan’s solution.

Thanks for your help.
I used mbed OS 5.15 and added mbed_app.json file with the following code and it’s working properly:
{
“requires”: [“bare-metal”]
}