Skip to main content
Visitor II
March 25, 2025
Question

STM32MP257f-dk OpenAMP No such file or directory

  • March 25, 2025
  • 2 replies
  • 567 views

Hello,

I am encountering an issue when enabling the OpenAMP middleware in CubeMX for a new project targeting the STM32MP257F‑DK board. After creating the project and activating only the OpenAMP middleware (see attached screenshot), the build fails because several required files are missing. Below is the full error message generated during compilation.

Thank you in advance for your help.

Nicolas_D_0-1742898217765.png

Nicolas_D_0-1742898354428.png

 

11:12:24 **** Build of configuration Debug for project openAMP_mp257_CM33 ****

make -j12 all

arm-none-eabi-gcc "../OPENAMP/mbox_ipcc.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DCORE_CM33 -DUSE_HAL_DRIVER -DSTM32MP257Fxx -DNO_ATOMIC_64_SUPPORT -DMETAL_INTERNAL -DMETAL_MAX_DEVICE_REGIONS=2 -DVIRTIO_SLAVE_ONLY -c -I../Core/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc/Legacy -I../../Drivers/CMSIS/Device/ST/STM32MP2xx/Include -I../../Drivers/CMSIS/Include -I../OPENAMP -I../../Middlewares/Third_Party/OpenAMP/virtual_driver -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"OPENAMP/mbox_ipcc.d" -MT"OPENAMP/mbox_ipcc.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "OPENAMP/mbox_ipcc.o"

arm-none-eabi-gcc "../OPENAMP/open_amp.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DCORE_CM33 -DUSE_HAL_DRIVER -DSTM32MP257Fxx -DNO_ATOMIC_64_SUPPORT -DMETAL_INTERNAL -DMETAL_MAX_DEVICE_REGIONS=2 -DVIRTIO_SLAVE_ONLY -c -I../Core/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc/Legacy -I../../Drivers/CMSIS/Device/ST/STM32MP2xx/Include -I../../Drivers/CMSIS/Include -I../OPENAMP -I../../Middlewares/Third_Party/OpenAMP/virtual_driver -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"OPENAMP/open_amp.d" -MT"OPENAMP/open_amp.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "OPENAMP/open_amp.o"

arm-none-eabi-gcc "../OPENAMP/openamp_log.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DCORE_CM33 -DUSE_HAL_DRIVER -DSTM32MP257Fxx -DNO_ATOMIC_64_SUPPORT -DMETAL_INTERNAL -DMETAL_MAX_DEVICE_REGIONS=2 -DVIRTIO_SLAVE_ONLY -c -I../Core/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc/Legacy -I../../Drivers/CMSIS/Device/ST/STM32MP2xx/Include -I../../Drivers/CMSIS/Include -I../OPENAMP -I../../Middlewares/Third_Party/OpenAMP/virtual_driver -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"OPENAMP/openamp_log.d" -MT"OPENAMP/openamp_log.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "OPENAMP/openamp_log.o"

arm-none-eabi-gcc "../OPENAMP/rsc_table.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DCORE_CM33 -DUSE_HAL_DRIVER -DSTM32MP257Fxx -DNO_ATOMIC_64_SUPPORT -DMETAL_INTERNAL -DMETAL_MAX_DEVICE_REGIONS=2 -DVIRTIO_SLAVE_ONLY -c -I../Core/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc/Legacy -I../../Drivers/CMSIS/Device/ST/STM32MP2xx/Include -I../../Drivers/CMSIS/Include -I../OPENAMP -I../../Middlewares/Third_Party/OpenAMP/virtual_driver -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"OPENAMP/rsc_table.d" -MT"OPENAMP/rsc_table.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "OPENAMP/rsc_table.o"

../OPENAMP/mbox_ipcc.c:36:1: warning: "/*" within comment [-Wcomment]

arm-none-eabi-gcc "C:/Users/dn/STM32CubeIDE/workspace_1.18.0/openAMP_mp257/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/condition.c" -mcpu=cortex-m33 -std=gnu11 -g3 -DDEBUG -DUSE_FULL_LL_DRIVER -DCORE_CM33 -DUSE_HAL_DRIVER -DSTM32MP257Fxx -DNO_ATOMIC_64_SUPPORT -DMETAL_INTERNAL -DMETAL_MAX_DEVICE_REGIONS=2 -DVIRTIO_SLAVE_ONLY -c -I../Core/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc -I../../Drivers/STM32MP2xx_HAL_Driver/Inc/Legacy -I../../Drivers/CMSIS/Device/ST/STM32MP2xx/Include -I../../Drivers/CMSIS/Include -I../OPENAMP -I../../Middlewares/Third_Party/OpenAMP/virtual_driver -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Middlewares/Third_Party/OpenAMP/condition.d" -MT"Middlewares/Third_Party/OpenAMP/condition.o" --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Middlewares/Third_Party/OpenAMP/condition.o"

36 | /* Includes ------------------------------------------------------------------*/

|

In file included from ../OPENAMP/mbox_ipcc.c:37:

../OPENAMP/openamp.h:25:10: fatal error: openamp/open_amp.h: No such file or directory

25 | #include "openamp/open_amp.h"

| ^~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [OPENAMP/subdir.mk:28: OPENAMP/mbox_ipcc.o] Error 1

make: *** Waiting for unfinished jobs....

In file included from ../OPENAMP/open_amp.c:21:

../OPENAMP/openamp.h:25:10: fatal error: openamp/open_amp.h: No such file or directory

25 | #include "openamp/open_amp.h"

| ^~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [OPENAMP/subdir.mk:28: OPENAMP/open_amp.o] Error 1

In file included from ../OPENAMP/rsc_table.h:23,

from ../OPENAMP/rsc_table.c:40:

../OPENAMP/openamp.h:25:10: fatal error: openamp/open_amp.h: No such file or directory

25 | #include "openamp/open_amp.h"

| ^~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [OPENAMP/subdir.mk:28: OPENAMP/rsc_table.o] Error 1

C:/Users/dnrfag/STM32CubeIDE/workspace_1.18.0/openAMP_mp257/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/condition.c:12:10: fatal error: metal/condition.h: No such file or directory

12 | #include <metal/condition.h>

| ^~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [Middlewares/Third_Party/OpenAMP/subdir.mk:88: Middlewares/Third_Party/OpenAMP/condition.o] Error 1

"make -j12 all" terminated with exit code 2. Build might be incomplete.

 

11:12:26 Build Failed. 9 errors, 1 warnings. (took 2s.312ms)





2 replies

Olivier GALLIEN
Technical Moderator
March 25, 2025

Hi @Nicolas_D ,

Thanks for your post. This is a known problem we are working on. BZ197530

We hope to provide fix in coming CubeMX release.

In the meantime you might take exemple on OpenAMP application exemple provided in CubeFirmware package and bring it in your project

Olivier 

 

Olivier GALLIEN In order 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.
stThanhln
Visitor II
April 10, 2025

stThanhln_0-1744285020083.png

Hi @Olivier GALLIEN ,

Thanks for your suggestion, I tried and fixed the same errors with STM32MP257F-DK, but a new problem appeared, the compiler did not find some macro as shown above.

Can you give me some ideas to fix them. Thank you very much.