Device OS 2.0.0-rc.4 - "fatal error: stm32f2xx.h: No such file or directory" but compiles fine in 1.5.4 RC2

Not sure if I’m misunderstanding something with working with libraries and different major versions or some catch with LTS firmware releases. I’ve been using the RF9X-RK radio library successfully in 1.5.1 RC1 for the last 6+ months and and briefly tested it in 1.5.4 RC2 without issue. I figured I’d give the 2.0.0 RC4 a go at it. Without making any other changes besides downloading the toolchain and selecting deviceOS@2.0.0-rc.4 the project no longer compiles due to a missing library within the RF9x-RK library.

I receive this error:
“/lib/RF9X-RK/src/RadioHead.h:1276:11: fatal error: stm32f2xx.h: No such file or directory
1276 | #include <stm32f2xx.h>”

@rickkas7 - Is there something I need to do to update the library to work properly with Device OS 2.0.0 RC4? Or am I just misunderstanding something?

This is the specific line within the RadioHead.h library that is throwing the error:

My IDE is VS Code, I confirmed the target device is selected to be the Boron. I recieve the same error in deviceOS@2.0.0-rc.1 as well.

Any thoughts on how to resolve this?

Your thread tag states you are targeting a Boron but that isn’t based on an STM32F controller but an nRF52840, hence I’d suspect you have not targeted the correct platform.

You can check whether the RH_PLATFORM macro is defined wrong by compiling a simple test project which only prints out their current values.

I released a new version with a change to fix that issue.

0.0.5 (2020-11-15)

  • Fixed compile error on Gen3 devices with 2.0.0-rc due to HAL_PLATFORM_MESH no longer being defined.
2 Likes

As always @rickkas7 to the rescue! :slight_smile: I installed the new library 0.0.5 via “particle: install library” from VS Code and it then my full project compiled and downloaded successfully! Thanks! that was crazy quick too! As always, very much appreciated. Issue resolved.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.