Skip to content

Relative paths fail consistently #363

@hy6lJuJa

Description

@hy6lJuJa

Describe the bug
If your Cube directories are not in the default paths and you use relative paths for STM32_CUBE_<FAMILY>_PATH it will fail to find CMSIS.

Sources to reproduce
Please provide link to repository showing the problem.

  • In main branch

Steps to reproduce

  1. Download of fetch Cube code from examples/fetch-cube
  2. Place it somewhere other than the default location of /opt/STM32Cube<FAMILY>
  3. Go to root/examples/blinky
  4. Create a build folder and cd build
  5. Run cmake .. -DSTM32_CUBE_F4_PATH=<absolute-path>/stm32-cmake/thirdParty/STM32CubeF4
  6. This builds successfully.
  7. rm -rf ./* in build
  8. Run cmake .. -DSTM32_CUBE_F4_PATH=<relative-path>/stm32-cmake/thirdParty/STM32CubeF4 leads to
    CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:290 (message): Could NOT find CMSIS (missing: CMSIS_INCLUDE_DIRS CMSIS_SOURCES STM32F4)

Expected behavior
Expected behavior is that this project should be able to handle relative paths or at least mention it in big bold letters in the documentation.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: Linux x86_64
  • Compiler: arm-none-eabi-gcc 15.2.Rel1
  • stm32-cmake: ecc5acc
  • cmake: 4.2.2

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions