How to run the sample OpenAMP_TTY_echo program in STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-08 12:30 PM
I'm following a tutorial for setting up the STM32MP157C-DK2. I'm on the step for running the OpenAMP_TTY sample program. However, when I try to build the program, I get a whole bunch or errors as follows:
make -j8 all
arm-none-eabi-gcc -o "OpenAMP_TTY_echo_CM4.elf" @"objects.list" -mcpu=cortex-m4 -T"/home/ben/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/STM32Cube_FW_MP1_V1.5.0/Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo/STM32CubeIDE/CM4/STM32MP157CAAX_RAM.ld" --specs=nosys.specs -Wl,-Map="OpenAMP_TTY_echo_CM4.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: ./Application/Startup/startup_stm32mp157caax.o: in function `LoopFillZerobss':
/home/ben/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/STM32Cube_FW_MP1_V1.5.0/Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo/STM32CubeIDE/CM4/Application/Startup/startup_stm32mp157caax.s:90: undefined reference to `SystemInit'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: ./Application/User/main.o: in function `main':
/home/ben/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/STM32Cube_FW_MP1_V1.5.0/Projects/STM32MP157C-DK2/Applications/OpenAMP
collect2: error: ld returned 1 exit status
make: *** [makefile:63: OpenAMP_TTY_echo_CM4.elf] Error 1
"make -j8 all" terminated with exit code 2. Build might be incomplete.
I abbreviated the error, but there are 82 of them that say "undefined reference to." I'm thinking that the issue might have something to do with setting the source of the SDK or perhaps with setting up the environment, but I'm not sure. Any help or guidance is greatly appreciated.
- Labels:
-
STM32CubeIDE
-
STM32MP15 Lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-08 12:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-09 05:46 AM
Hi @FHyat.1​ ,
Strange this is usually straigthforward.
Can you check and provide CubeIDE and Cube Package version you are using ?
Else, your log show an error on final step of the build. Could you rather provide very first error after a clean or complete log ?
Olivier
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-09 07:06 AM
CubeIDE information:
- Version: 1.9.0
- Build: 12015_20220302_0855 (UTC)
I also have the 1.8.0 version installed, as I was unsure if I wanted to use environment 3.0.0 or 3.1.0.
Here's the beginning section of the error that I'm getting:
make -j8 all
arm-none-eabi-gcc -o "OpenAMP_TTY_echo_CM4.elf" @"objects.list" -mcpu=cortex-m4 -T"/home/ben/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/STM32Cube_FW_MP1_V1.5.0/Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo/STM32CubeIDE/CM4/STM32MP157CAAX_RAM.ld" --specs=nosys.specs -Wl,-Map="OpenAMP_TTY_echo_CM4.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: ./Application/Startup/startup_stm32mp157caax.o: in function `LoopFillZerobss':
/home/ben/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/STM32Cube_FW_MP1_V1.5.0/Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo/STM32CubeIDE/CM4/Application/Startup/startup_stm32mp157caax.s:90: undefined reference to `SystemInit'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: ./Application/User/main.o: in function `main':
/home/ben/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/STM32Cube_FW_MP1_V1.5.0/Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo/Src/main.c:88: undefined reference to `HAL_Init'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /home/ben/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/STM32Cube_FW_MP1_V1.5.0/Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo/Src/main.c:97: undefined reference to `HAL_GetTick'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-09 09:22 AM
Hi @FHyat.1​,
The official version of CubeIde for ecosystem v3.1 is: 1.8.0
as explained in the ecosystem release note: https://wiki.st.com/stm32mpu/wiki/STM32MP15_ecosystem_release_note_-_v3.1.0#STM32CubeIDE
But, it should works with version 1.9.0 too. So for a test purpose, I made a try with the 1.9.0 and the project OpenAMP_TTY_echo, the build is functional.
By reading your traces, it looks like a problem during the importation of the project. Please can you send me a screenshot of your complete CubeIde window? I would like to especially see the project tree (on the left side).
One more thing, I can see in my build traces that by default, I am building with:
make -j3 all
and in your traces, we can see:
make -j8 all
Which operating system are you using?
Regards,
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-09 09:30 AM
Here's the screenshot. I'm using Linux Debian 5.13.0-44-generic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-09 10:12 AM
Here's the screenshot. I'm using Linux Debian 5.13.0-44-generic. I'm pretty sure the -j8 and -j3 distinction are references to the number of computing cores used in the make process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-28 06:40 AM
Hello @FHyat.1​ ,
Yes the -j8 is related to the number of cores used, you are right.
For information the ST solution is tested on Ubuntu 20.04 and 18.04, not on the other distribution.
The recommended setup is Ubuntu 20.04 LTS:
https://wiki.st.com/stm32mpu-ecosystem-v3/wiki/PC_prerequisites#Linux-C2-AE_PC
So this is maybe a problem due to Debian, but I do not think this is the case.
Your problem looks like the project is not able to find the drivers code of your STM32Cube_FW_MP1_V1.5.0.
For example in your traces:
undefined reference to `HAL_GetTick'
This function is normally defined in STM32Cube_FW_MP1_V1.5.0/Drivers/STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal.c at line 359.
So if your linker is not able to find it, this is because the file was not built during the build.
Please can you make a right click then properties on your project "OpenAMP_TTY_echo_CM4", like this:
I would like to see the location of the tty_echo project that you included into cubeIde.
Then please
- right click again of the project "OpenAMP_TTY_echo_CM4" and "clean Project".
- build again the project
- send here the complete build log. (not only the linker).
In your two previous message you only sent the linker traces, but not the one from the build.
Normally they must start we the file.c to build, looks like below:
make -j3 all
arm-none-eabi-gcc "/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/STM32Cube_FW_MP1_V1.5.0/Middlewares/Third_Party/OpenAMP/virtual_driver/virt_uart.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DMETAL_MAX_DEVICE_REGIONS=2 -DUSE_HAL_DRIVER -DSTM32MP157Cxx -D__LOG_TRACE_IO_ -DCORE_CM4 -DDEBUG -DNO_ATOMIC_64_SUPPORT -DMETAL_INTERNAL -DVIRTIO_SLAVE_ONLY -c -I../../../../../../../../Drivers/STM32MP1xx_HAL_Driver/Inc -I../../../../../../../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include -I../../../../../../../../Drivers/CMSIS/Device/ST/STM32MP1xx/Include -I../../../../../../../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include -I../../../../../../../../Drivers/STM32MP1xx_HAL_Driver/Inc/Legacy -I../../../../../../../../Drivers/BSP/STM32MP15xx_DISCO -I../../../Inc -I../../../../../../../../Drivers/CMSIS/Include -I../../../../../../../../Middlewares/Third_Party/OpenAMP/virtual_driver -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Middlewares/OpenAMP/virtual_driver/virt_uart.d" -MT"Middlewares/OpenAMP/virtual_driver/virt_uart.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Middlewares/OpenAMP/virtual_driver/virt_uart.o"
arm-none-eabi-gcc "/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/STM32Cube_FW_MP1_V1.5.0/Middlewares/Third_Party/OpenAMP/open-amp/lib/virtio/virtio.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DMETAL_MAX_DEVICE_REGIONS=2 -DUSE_HAL_DRIVER -DSTM32MP157Cxx -D__LOG_TRACE_IO_ -DCORE_CM4 -DDEBUG -DNO_ATOMIC_64_SUPPORT -DMETAL_INTERNAL -DVIRTIO_SLAVE_ONLY -c -I../../../../../../../../Drivers/STM32MP1xx_HAL_Driver/Inc -I../../../../../../../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include -I../../../../../../../../Drivers/CMSIS/Device/ST/STM32MP1xx/Include -I../../../../../../../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include -I../../../../../../../../Drivers/STM32MP1xx_HAL_Driver/Inc/Legacy -I../../../../../../../../Drivers/BSP/STM32MP15xx_DISCO -I../../../Inc -I../../../../../../../../Drivers/CMSIS/Include -I../../../../../../../../Middlewares/Third_Party/OpenAMP/virtual_driver -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Middlewares/OpenAMP/open-amp/virtio/virtio.d" -MT"Middlewares/OpenAMP/open-amp/virtio/virtio.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Middlewares/OpenAMP/open-amp/virtio/virtio.o"
It will help me to understand the error that you encounter.
Regards,
Kevin