Trouble Setting Up STM32 Development with VS Code on Zorin OS
I’m trying to set up STM32 development on Zorin OS using Visual Studio Code, but I’ve encountered some issues. Here's an overview of my setup and the problem I'm facing:
System Information:
- OS: Zorin OS 17.2 Core(based on Ubuntu)
- IDE: Visual Studio Code
- Toolchain: ARM GCC (installed through apt)
- Debugging Tool: OpenOCD
- STM32CubeMX for project generation
I choose Makefile in Cubemx and it creates a project folder. I am opening it in VS Code, and open a terminal in it, write make and it yields:
~/Codes/ST/blinkyy/blinkyy$ make
arm-none-eabi-gcc build/main.o build/stm32f4xx_it.o build/stm32f4xx_hal_msp.o build/stm32f4xx_hal_tim.o build/stm32f4xx_hal_tim_ex.o build/stm32f4xx_hal_rcc.o build/stm32f4xx_hal_rcc_ex.o build/stm32f4xx_hal_flash.o build/stm32f4xx_hal_flash_ex.o build/stm32f4xx_hal_flash_ramfunc.o build/stm32f4xx_hal_gpio.o build/stm32f4xx_hal_dma_ex.o build/stm32f4xx_hal_dma.o build/stm32f4xx_hal_pwr.o build/stm32f4xx_hal_pwr_ex.o build/stm32f4xx_hal_cortex.o build/stm32f4xx_hal.o build/stm32f4xx_hal_exti.o build/system_stm32f4xx.o build/sysmem.o build/syscalls.o build/startup_stm32f411xe.o -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nano.specs -TSTM32F411RETx_FLASH.ld -lc -lm -lnosys -Wl,-Map=build/blinkyy.map,--cref -Wl,--gc-sections -o build/blinkyy.elf
/opt/st/stm32cubeclt_1.16.0/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld:STM32F411RETx_FLASH.ld:56: syntax error
collect2: error: ld returned 1 exit status
make: *** [Makefile:176: build/blinkyy.elf] Error 1
It seems this is because STM32F411RETx_FLASH.ld file. I do not understand how it is generated and what to do solve.
Due to the character limitation in a post and restriction of uploading files, I can neither upload my STM32F411RETx_FLASH.ld and Makefile files nor put them here. But if you want, I can upload it via Gist or any other way.
Please feel free notify if something is missing, or you cannot understand something. Any replies is welcomed to solve this problem since it is important for me.
Thanks for your replies.
