Closed azeemshatp closed 3 years ago
Hi @azeemshatp ! Should be fixed in the latest zephyr
package. Please run pio platform update ststm32
Thanks @valeros. I tested it and can confirm that the issue described by @azeemshatp is solved.
Thanks for the confirmation!
What kind of issue is this?
Configuration
Operating system: Windows 10
PlatformIO Version (
platformio --version
): PlatformIO, version 4.3.4Description of problem
CMake errors while using different ststm32 platforms and framework-zephyr. PIO gives errors whereas west build works fine.
Steps to Reproduce
I have an STM32 based project running on Zephyr that compiles fine with the latest PIO (having Zephyr 2.3.0). I have selected the below in the platformio.ini file. platform = ststm32@~7.1.1
Now if I try to compile an older project in PIO that uses the below settings in the platformio.ini file, platform = ststm32@~6.1.0 ( I think )
PIO throws the below errors
-- The C compiler identification is GNU 8.2.1 -- The CXX compiler identification is GNU 8.2.1 -- The ASM compiler identification is GNU -- Found assembler: C:/Users/xxx/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc.exe -- Cache files will be written to: C:/Users/xxx/.platformio/packages/framework-zephyr/.cache -- Could NOT find Git (missing: GIT_EXECUTABLE) -- Configuring incomplete, errors occurred! See also "C:/Users/xxx/yyy/node-firmware-stm32/.pio/build/sb-0v3/CMakeFiles/CMakeOutput.log". See also "C:/Users/xxx/yyy/node-firmware-stm32/.pio/build/sb-0v3/CMakeFiles/CMakeError.log".
Including boilerplate (Zephyr base): C:/Users/xxx/.platformio/packages/framework-zephyr/cmake/app/boilerplate.cmake Python path: C:/Users/xxx/.platformio/penv/Scripts/python.exe CMake Error at C:/Users/xxx/.platformio/packages/framework-zephyr/cmake/extensions.cmake:372 (add_library): The target name "..framework-zephyr-hal-stm32@0.0.0-alpha+sha.d1bc80d021stm32cube" is reserved or not valid for certain CMake features, such as generator expressions, and may result in undefined behavior. Call Stack (most recent call first): C:/Users/xxx/.platformio/packages/framework-zephyr/cmake/extensions.cmake:349 (zephyr_library_named) C:/Users/xxx/.platformio/packages/framework-zephyr-hal-stm32@0.0.0-alpha+sha.d1bc80d021/stm32cube/CMakeLists.txt:9 (zephyr_library)
CMake Error at C:/Users/xxx/.platformio/packages/framework-zephyr/cmake/extensions.cmake:416 (target_sources): Cannot specify sources for target "..framework-zephyr-hal-stm32@0.0.0-alpha+sha.d1bc80d021stm32cube" which is not built by this project. Call Stack (most recent call first): C:/Users/xxx/.platformio/packages/framework-zephyr-hal-stm32@0.0.0-alpha+sha.d1bc80d021/stm32cube/stm32l0xx/CMakeLists.txt:5 (zephyr_library_sources)
Now if I go back and if try to compile the previously compiling code, it gets the same error too.
In order to make this work this, you have to manually delete some folders such as
If problems with PlatformIO Build System:
The content of
platformio.ini
: