cancel
Showing results for 
Search instead for 
Did you mean: 

selected processor does not support `cpsid i' in Thumb mode for STM32H757

Lokesh1
Associate II

I tried to create a cmake list to create a static library for HAL folder(containing the STM drivers generated using STM32CubeIDE) and then link the library to the main Cmake list.

Microcontroller used:STM32H757XI

Please find the below error log. Any suggestions would be appreciated.

[main] Building folder: Test-meas-fea
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/build --config Debug --target all --
[build] [1/2   0% :: 0.077] Re-checking globbed directories...
[build] [9/196   0% :: 0.868] Building ASM object contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/Startup/startup_stm32h757xihx.s.obj
[build] [10/196   1% :: 1.577] Building ASM object contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/Src/tx_initialize_low_level.S.obj
[build] FAILED: contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/Src/tx_initialize_low_level.S.obj
[build] C:\PROGRA~2\GNUARM~1\102021~1.10\bin\AR19DD~1.EXE  -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Inc -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/Drivers/STM32H7xx_HAL_Driver/Inc -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/Drivers/CMSIS/Device/ST/STM32H7xx/Include -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/Drivers/CMSIS/Include -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/Common/Inc -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/APP/App -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/APP -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/Middlewares/ST/threadx/common/inc -IC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/Middlewares/ST/threadx/ports/cortex_m7/gnu/inc -g -MD -MT contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/Src/tx_initialize_low_level.S.obj -MF contrib\hal\hal_stm32h757\CMakeFiles\hal_stm32h757.dir\CM7\Core\Src\tx_initialize_low_level.S.obj.d -o contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/Src/tx_initialize_low_level.S.obj -c C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S: Assembler messages:
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:532: Error: selected processor does not support `cpsid i' in Thumb mode
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:545: Error: cannot honor width suffix -- `mov r0,#0xE000E000'
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:560: Error: cannot honor width suffix -- `orr r1,r1,#1'
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:565: Error: cannot honor width suffix -- `mov r0,#0xE000E000'
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:568: Error: cannot honor width suffix -- `mov r1,#0x7'
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:628: Error: cannot honor width suffix -- `pop {r0,lr}'
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:650: Error: cannot honor width suffix -- `pop {r0,lr}'
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:547: Error: invalid offset, value too big (0x00000D08)
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:574: Error: invalid offset, value too big (0x00000D18)
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:577: Error: invalid offset, value too big (0x00000D1C)
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Src/tx_initialize_low_level.S:581: Error: invalid offset, value too big (0x00000D20)
[build] [10/196   1% :: 1.799] Building C object contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/Src/system_stm32h7xx.c.obj
[build] [10/196   2% :: 1.894] Linking ASM executable SerMux.elf
[build] FAILED: SerMux.elf
[build] cmd.exe /C "cd . && C:\PROGRA~2\GNUARM~1\102021~1.10\bin\AR19DD~1.EXE -g -TC:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/STM32H757XIHX_FLASH.ld -mcpu=cortex-m7 -mthumb -march=armv7e-m -mfpu=fpv5-d16 -mfloat-abi=hard -DCORE_CM7 -DUSE_HAL_DRIVER -Wl,-Map=SerMux.map -Wl,--start-group -lc -lm -lstdc++ -Wl,--end-group -Wl,--print-memory-usage CMakeFiles/SerMux.dir/contrib/hal/hal_stm32h757/CM7/Core/Startup/startup_stm32h757xihx.s.obj -o SerMux.elf   && cmd.exe /C "cd /D C:\Data\Workspace\Ashiq\Cmake_tester\SubModuleTask\Test-meas-fea\build && arm-none-eabi-size C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/build/SerMux.elf && arm-none-eabi-objcopy -O ihex C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/build/SerMux.elf SerMux.hex && arm-none-eabi-objcopy -O binary C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/build/SerMux.elf SerMux.bin""
[build] c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: CMakeFiles/SerMux.dir/contrib/hal/hal_stm32h757/CM7/Core/Startup/startup_stm32h757xihx.s.obj: in function `Reset_Handler':
[build] C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Startup/startup_stm32h757xihx.s:64: undefined reference to `SystemInit'
[build] c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/contrib/hal/hal_stm32h757/CM7/Core/Startup/startup_stm32h757xihx.s:99: undefined reference to `main'
[build] c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard/crt0.o: in function `_mainCRTStartup':
[build] (.text+0x52): undefined reference to `main'
[build] c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard\libc.a(lib_a-exit.o): in function `exit':
[build] exit.c:(.text.exit+0x16): undefined reference to `_exit'
[build] Memory region         Used Size  Region Size  %age Used
[build]           RAM_D1:        2680 B       512 KB      0.51%
[build]            FLASH:        2884 B         1 MB      0.28%
[build]          DTCMRAM:          0 GB       128 KB      0.00%
[build]           RAM_D2:          0 GB       288 KB      0.00%
[build]           RAM_D3:          0 GB        64 KB      0.00%
[build]          ITCMRAM:          0 GB        64 KB      0.00%
[build] collect2.exe: error: ld returned 1 exit status
[build] [10/196   2% :: 2.013] Building C object contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/Common/Src/system_stm32h7xx_dualcore_boot_cm4_cm7.c.obj
[build] [10/196   3% :: 2.409] Building C object contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/Src/usart_uart_dma_config.c.obj
[build] [10/196   3% :: 2.577] Building C object contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/example/led_blink_test.c.obj
[build] [10/196   4% :: 2.580] Building C object contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/example/uart_testing.c.obj
[build] [10/196   4% :: 2.583] Building C object contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/Src/usart_uart_config.c.obj
[build] [10/196   5% :: 2.842] Building C object contrib/hal/hal_stm32h757/CMakeFiles/hal_stm32h757.dir/CM7/Core/example/uart_dma_testing.c.obj
[build] ninja: build stopped: subcommand failed.
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/Data/Workspace/Ashiq/Cmake_tester/SubModuleTask/Test-meas-fea/build --config Debug --target all -- exited with code: 1
[driver] Build completed: 00:00:03.192
[build] Build finished with exit code 1
1 REPLY 1
Christian N
ST Employee

Hello Lokesh1,

Thank you for contacting STMicroelectronics. Your inquiry is being escalated for specialized support.

Kind Regards,

Christian

ST Support