First time user: Compile error "Target is not recognized"

I selected my DISCO-H747I platform, and imported (via the blue button) this sample project ,
https://os.mbed.com/users/sam_grove/notebook/canopen/

However, after clicking ‘update’ on the the mbed file, and pressing compile, it shows the error:

I was thinking of exporting the program and compiling using Keil Trial, but it says ‘Failed to export’.

There’s no specific error, so not sure what is wrong.

Hi there,

This example use old MbedOs2 library and STM32H7 is relatively new so that will be the reason. The Mbedos2 no contain the source for STM32H7.
You need import MbedOS library from github to current project but there is a risk that 8 years old program will not be compatible with newest Mbed library.

BR, Jan

I changed the platform to an NXP LPC1768 and it builds/exports… but why? In either case I don’t see any mbed.h file… so what changed under the hood that it knew how to build?

For example, the “mbed official\mbed-dev” seems to support the H745 but not the “mbed official\mbed”… what’s the difference, and couldn’t the online compiler be set for “mbed-dev”?

You can delete the mbed library from your program and replace it with another one via Importing code. I usually use right click on project folder and then Import library... > from URL....

  • The mbed library (MbedOS2) what was used in this project contain only Nucleo-H743ZI.
  • The mbed-dev (MbedOS2) also contain only the Nucleo-H743ZI. And it is not possible to download it or import it to a project, an issue on server side.
  • In this post (Mbed OS 2 download) is a link to a version of the mbed-dev what can be imported but it is probably different one because not contain the folder with ST’s H7.
  • Recomanded for your target are MbedOS5 or newest MbedOS6

How you can see the mbed-dev will not help you solve that.

It works on the NXP LPC1768 because the source for that target is included in Mbed library, but source for DISCO-H747I not. Also it looks like it was created directly for LPC. Because when you select another target what is present in that old Mbed library, it is still unable to compile because a macro is set for a LPC register.

So from my point of view, it is not possible to use it with the DISCO-H747I without newest MbedOS5+ and without a work on the code, because it is not ready for STM32.

BR, Jan