Running mbed on a Nucleo F411RE

So I figured I’d take a stab at using Yotta and mbed 3 on my nucleo board. It looks as if there are packages already for the stm32fxx parts - there’s cmsis-core-st, cmsis-core-stm32f4, and mbed-hal-st-stm32f4.

I’m using the target for the discovery board as a basis: GitHub - ARMmbed/target-st-stm32f429i-disco: DEPRECATED Target for STM32F429I Discovery board

It’s not going well and I’m a little bit lost. Is there some kind of porting guide for bringing the new stuff over to different boards? Right now, this is what happens when I do yotta build:

In file included from /Users/heathkit/src/embedded/yotta-blinky/yotta_modules/cmsis-core/cmsis-core/cmsis_nvic.h:35:0,
             from /Users/heathkit/src/embedded/yotta-blinky/yotta_modules/uvisor-lib/uvisor-lib/uvisor-lib.h:23,
             from /Users/heathkit/src/embedded/yotta-blinky/yotta_modules/uvisor-lib/source/unsupported.cpp:17:
 /Users/heathkit/src/embedded/yotta-blinky/yotta_modules/cmsis-core-stm32f4/cmsis-core-stm32f4/cmsis.h:35:23: fatal error: stm32f4xx.h: No such file or directory

In mbed 2, isn’t this header in mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/stm32f4xx.h? Am I missing some module? I don’t get why it wouldn’t be included in mbed-hal-st-stm32f4, but I also don’t know all the details of how mbed got split into yotta modules.

I’m in the same situation with the “st-nucleo-f401re-gcc” target,
I belive the “stm32f4xx.h” file needs to be defined per target, as it contains a board specific definition, see this from mbed classic: https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/stm32f4xx.h#L91

I’m not sure yet how to add per target includes, probably somewhere in the toolchain setup.

So I think the issue is there’s not a HAL package for the stm32f11re (and stm32f401re). Here’s a module that adds it: https://github.com/rosterloh/mbed-hal-st-stm32f411re

Though if you look through his other repos, it looks like there’s a few little changes that needed to be added in a few other places to add support. I played around with these, but still wasn’t able to get something building for my board.

@heathkit I’ve submitted pull requests to get the required changes to support this board but the team have said they’re in a freeze before stable release. I’ll follow up again.

Thanks! One of the things I like about yotta is the way you can link in modules under development. I was able to link your versions of everything into my build, but unfortunately now I’m stuck on building minar-platform. I might dig into it, or I might just wait for official support.