2025-05-24 10:01 AM
I am trying to flash BSP example from https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects esp. the ones for STM32U5A9J-DK.
While trying to compile BSP : https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U5x9J-DK/Examples/BSP, I am not able to get a compiled binary to flash.
Tried following ways to import the checkout code in STMCubeIDE -
1) "Open project from file system" or "Import -> Projects from Folder or Archive" -
Build not enabled
2) "Existing project in workspace" -> "Copy project in workspace"
Error
make -j8 all
make: *** No rule to make target '/Utilities/lcd/stm32_lcd.c', needed by 'Utilities/stm32_lcd.o'. Stop.
3) "Import" -> "File System"
Cannot import into a workspace with no open projects. Please create a project before importing.
what is the first way to get these examples build and flashed.
2025-05-24 10:46 AM
Hello @giteshk and welcome to the ST Community.
Have you cloned the repository from GitHub or download it from the ST site. If it is cloned, have you followed the recommandation on this FAQ. I’d not please recline the repository base on the FAQ. If you import it from the ST website or throw CubeMX, please give me the version of the STM32CubeMX, STM32CubeIDE and the STM32CubeU5 that you are using.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-05-25 1:06 AM
Thank you @STTwo-32 for your response, it helps. I had used a zipped one from github!
Further as advised, I now tried with the Downloaded version from ST site. I copied it from Repository folder ( /home/gits/STM32Cube/Repository/STM32Cube_FW_U5_V1.7.0/Projects/STM32U5x9J-DK) to
(/home/gits/STM32CubeIDE/workspace_1.18_DKprojs_from_release/STM32U5x9J-DK).
Used "Import" -> "Projects from Folder or Archive". It gives these 3 errors for all project examples -
fatal error: stm32u5xx_hal.h: No such file or directory OSPI_NOR_MemoryMapped line 24 C/C++ Problem
make: *** [Example/User/subdir.mk:31: Example/User/main.o] Error 1 OSPI_NOR_MemoryMapped C/C++ Problem
make: *** No rule to make target '/home/gits/STM32CubeIDE/Drivers/STM32U5xx_HAL_Driver/Src/stm32u5xx_hal.c', needed by 'Drivers/STM32U5xx_HAL_Driver/stm32u5xx_hal.o'. Stop. DMA_FLASHToRAM C/C++ Problem
This is with STM32CubeIDE Version: 1.18.0, STM32Cube_FW_U5_V1.7.0
Then I cloned the github version. Created the workspace in the same directory where cloning was done. To compile this, I used a older STM32CubeIDE Version: 1.12.1 (just to rule out any issues with latest cubeIDE 1.18.0).
But getting error - non constant or forward reference address expression for section .ARM.extab. Must be some problem with the older toolchain.
Went back to CubeIDE 1.18.0, created a separate folder for cloning, did the cloning. Gave a separate workspace folder while launching IDE. Used Import -> Project from Folder or Archive. Compiled fine! So finally came to a sane state :)
One warning seen - No explicit project encoding, solved by Project-> Properties-> Resource-> Text File encoding -> Other UTF-8.
Thank you for your support.