2026-02-19 4:54 AM
Dear all,
I have extracted the XSPI_PSRAM_MemoryMapped for STM32N6570-DK from CubeMX without modification and created cmake code to integrate it into VSCode.
Compiling it works, but the linker fails:
simon@europa:~/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/build$ cube ninja
[1/1] Linking C executable XSPI_PSRAM_MemoryMapped_FSBL.elf
FAILED: [code=1] XSPI_PSRAM_MemoryMapped_FSBL.elf
: && /home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/arm-none-eabi-gcc -mcpu=cortex-m55 -mfpu=fpv5-d16 -mfloat-abi=hard -mcmse -Wall -fdata-sections -ffunction-sections -O0 -g3 -mcpu=cortex-m55 -mfpu=fpv5-d16 -mfloat-abi=hard -mcmse -T "/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/STM32N657XX_AXISRAM2_fsbl.ld" --specs=nano.specs -Wl,-Map=XSPI_PSRAM_MemoryMapped_FSBL.map -Wl,--gc-sections -Wl,--print-memory-usage CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj CMakeFiles/STM32_Drivers.dir/Src/system_stm32n6xx_fsbl.c.obj CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/stm32n6xx_it.c.obj CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/stm32n6xx_hal_msp.c.obj CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/sysmem.c.obj CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/syscalls.c.obj CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Startup/startup_stm32n657xx_fsbl.s.obj -o XSPI_PSRAM_MemoryMapped_FSBL.elf -lm && :
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj: in function `BSP_LED_Init':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:207:(.text.BSP_LED_Init+0x1a): undefined reference to `HAL_PWREx_EnableVddIO2'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_PWREx_EnableVddIO2): Unknown destination type (ARM/Thumb) in CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:207:(.text.BSP_LED_Init+0x1a): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:228:(.text.BSP_LED_Init+0x64): undefined reference to `HAL_GPIO_Init'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_GPIO_Init): Unknown destination type (ARM/Thumb) in CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:228:(.text.BSP_LED_Init+0x64): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj: in function `BSP_LED_On':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:272:(.text.BSP_LED_On+0x26): undefined reference to `HAL_GPIO_WritePin'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_GPIO_WritePin): Unknown destination type (ARM/Thumb) in CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:272:(.text.BSP_LED_On+0x26): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:276:(.text.BSP_LED_On+0x42): undefined reference to `HAL_GPIO_WritePin'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_GPIO_WritePin): Unknown destination type (ARM/Thumb) in CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:276:(.text.BSP_LED_On+0x42): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj: in function `BSP_LED_Off':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:293:(.text.BSP_LED_Off+0x26): undefined reference to `HAL_GPIO_WritePin'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_GPIO_WritePin): Unknown destination type (ARM/Thumb) in CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:293:(.text.BSP_LED_Off+0x26): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:297:(.text.BSP_LED_Off+0x42): undefined reference to `HAL_GPIO_WritePin'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_GPIO_WritePin): Unknown destination type (ARM/Thumb) in CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:297:(.text.BSP_LED_Off+0x42): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj: in function `BSP_LED_Toggle':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:311:(.text.BSP_LED_Toggle+0x20): undefined reference to `HAL_GPIO_TogglePin'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_GPIO_TogglePin): Unknown destination type (ARM/Thumb) in CMakeFiles/STM32_Drivers.dir/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.c:311:(.text.BSP_LED_Toggle+0x20): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj: in function `main':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:84:(.text.main+0x18): undefined reference to `HAL_Init'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_Init): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:84:(.text.main+0x18): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:109:(.text.main+0x3c): undefined reference to `HAL_XSPI_SetClockPrescaler'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPI_SetClockPrescaler): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:109:(.text.main+0x3c): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:128:(.text.main+0x94): undefined reference to `HAL_XSPI_Command'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPI_Command): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:128:(.text.main+0x94): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:138:(.text.main+0xbe): undefined reference to `HAL_XSPI_Command'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPI_Command): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:138:(.text.main+0xbe): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:147:(.text.main+0xdc): undefined reference to `HAL_XSPI_MemoryMapped'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPI_MemoryMapped): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:147:(.text.main+0xdc): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:174:(.text.main+0x178): undefined reference to `HAL_Delay'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_Delay): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:174:(.text.main+0x178): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:195:(.text.main+0x1ea): undefined reference to `HAL_Delay'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_Delay): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:195:(.text.main+0x1ea): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:204:(.text.main+0x20a): undefined reference to `HAL_XSPI_Abort'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPI_Abort): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:204:(.text.main+0x20a): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj: in function `SystemClock_Config':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:263:(.text.SystemClock_Config+0x22): undefined reference to `HAL_PWREx_ConfigSupply'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_PWREx_ConfigSupply): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:263:(.text.SystemClock_Config+0x22): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:270:(.text.SystemClock_Config+0x32): undefined reference to `HAL_PWREx_ControlVoltageScaling'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_PWREx_ControlVoltageScaling): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:270:(.text.SystemClock_Config+0x32): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:284:(.text.SystemClock_Config+0x6c): undefined reference to `HAL_RCC_OscConfig'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_RCC_OscConfig): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:284:(.text.SystemClock_Config+0x6c): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:292:(.text.SystemClock_Config+0x7e): undefined reference to `HAL_RCC_GetClockConfig'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_RCC_GetClockConfig): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:292:(.text.SystemClock_Config+0x7e): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:299:(.text.SystemClock_Config+0xa2): undefined reference to `HAL_RCC_ClockConfig'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_RCC_ClockConfig): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:299:(.text.SystemClock_Config+0xa2): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:320:(.text.SystemClock_Config+0xea): undefined reference to `HAL_RCC_OscConfig'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_RCC_OscConfig): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:320:(.text.SystemClock_Config+0xea): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:347:(.text.SystemClock_Config+0x142): undefined reference to `HAL_RCC_ClockConfig'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_RCC_ClockConfig): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:347:(.text.SystemClock_Config+0x142): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj: in function `MX_XSPI1_Init':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:387:(.text.MX_XSPI1_Init+0x74): undefined reference to `HAL_XSPI_Init'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPI_Init): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:387:(.text.MX_XSPI1_Init+0x74): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:394:(.text.MX_XSPI1_Init+0x98): undefined reference to `HAL_XSPIM_Config'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPIM_Config): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:394:(.text.MX_XSPI1_Init+0x98): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj: in function `APS256_WriteReg':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:452:(.text.APS256_WriteReg+0x6c): undefined reference to `HAL_XSPI_Command'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPI_Command): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:452:(.text.APS256_WriteReg+0x6c): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:458:(.text.APS256_WriteReg+0x82): undefined reference to `HAL_XSPI_Transmit'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPI_Transmit): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:458:(.text.APS256_WriteReg+0x82): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj: in function `APS256_ReadReg':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:496:(.text.APS256_ReadReg+0x72): undefined reference to `HAL_XSPI_Command'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPI_Command): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:496:(.text.APS256_ReadReg+0x72): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: /home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:502:(.text.APS256_ReadReg+0x88): undefined reference to `HAL_XSPI_Receive'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_XSPI_Receive): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:502:(.text.APS256_ReadReg+0x88): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj: in function `Error_Handler':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:594:(.text.Error_Handler+0xc): undefined reference to `HAL_Delay'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_Delay): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/main.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/main.c:594:(.text.Error_Handler+0xc): dangerous relocation: unsupported relocation
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/stm32n6xx_it.c.obj: in function `SysTick_Handler':
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/stm32n6xx_it.c:203:(.text.SysTick_Handler+0x4): undefined reference to `HAL_IncTick'
/home/simon/.local/share/stm32cube/bundles/gnu-tools-for-stm32/14.3.1+st.2/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld: (HAL_IncTick): Unknown destination type (ARM/Thumb) in CMakeFiles/XSPI_PSRAM_MemoryMapped_FSBL.dir/Src/stm32n6xx_it.c.obj
/home/simon/STM32Cube/Example/XSPI_PSRAM_MemoryMapped/FSBL/Src/stm32n6xx_it.c:203:(.text.SysTick_Handler+0x4): dangerous relocation: unsupported relocation
Memory region Used Size Region Size %age Used
ROM: 4844 B 255 KB 1.86%
RAM: 12968 B 256 KB 4.95%
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.Besides the relocation linker errors, some files seemingly are not included in the cmake file?
N.b. that the firmware can be built with the Stm32CubeIDE.
What needs changing? I expect the CubeMX code generator is missing a file or two?
Simon
Background: I am trying to set up a full project for the STM32N6 DK under VSCode that includes Camera, VENC, NPU and external memory support AND configures the clock tree etc. from CubeMX. The project currently fails to run because PSRAM fails to init so I want to cross-check the code from this example.