Mbed.h not found, unknown type name uint8_t

Good morning

Found another USB device example for the Nucleo-F042K6 board…however…

It complains about “mbed.h” not being found…which are included in the USB device library files…
removing the include statement then causes many types to be unknown, like Null, uint8_t and so on…

Is this platform not supported anymore in current mbed os?
At least I could choose this platform when selecting a board…

thanks in advance
richard

Hello Richard,

The NUCLEO-F042K6 seems to be supported in current Mbed OS 5 and also in the coming Mbed OS 6. You can check it in the mbed-os/targets/targets.json file. However, there is no:

        "device_has_add": [
            ...
            "USBDEVICE",
            ...
        ],

entry for the NUCLEO_F042K6 target. That means there in no USB driver available for it yet in the Mbed OS.

Best regards,

Zoltan

Well I added a USB device library manually…seems this lib is not mbed os 5 compatible though the author claims it:

Hi there,

the autor made that in august 2018 so you would need an older version of the MbedOS, probably 5.8 or stay on the Mbed2. If it still possible to compile it and if it ever worked.

BTW I not see the F042 target in the master branch of MbedOS project on github.

BR, Jan

Hi

Yes some targets have been deprecated in the master branch (next MBED-OS6 release).
So you have to:

  • stay in the mbed-os-5 branch
  • import F042 needed files back in master…