Skip to main content
NSirm.1
Associate II
October 29, 2020
Solved

Hello I am using STM3F205VF microcontroller. I want to print hello world. I followed the following steps. I am encountering following errors.

  • October 29, 2020
  • 3 replies
  • 1580 views

 The steps that I followed :1. Configured micrcontroller added UART Rx, UART Tx and Serial wire Viewer

2. In main.c in the infinite while loop added (HAL_UART_Transmit(&huart2, "HELLOWORLD ", 12, 100)

../Core/Src/main.c:100:35: warning: pointer targets in passing argument 2 of 'HAL_UART_Transmit' differ in signedness [-Wpointer-sign]

c:\st\stm32cubeide_1.4.0\stm32cubeide\plugins\tools\arm-none-eabi\bin\ld.exe: cannot open linker script file \ENT-FILESERVER\nsirmokadam\STM32CubeIDE\workspace_1.4.0\HW\STM32F205VFTX_FLASH.ld: No such file or directory

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:50: HW.elf] Error 1

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

This topic has been closed for replies.
Best answer by Tesla DeLorean

Cast the pointer appropriately

HAL_UART_Transmit(&huart2, (uint8_t *)"HELLOWORLD ", 12, 100) ;

Better yet write a subroutine that takes a char * input, and does the strlen() so you're not going to have to keep the parameters consistent.

If the linker can't find the linker script you need to resolve that, either put the .LD file where you're telling the linker it is situated, or pointing it at one that actually exists and is visible in the file system.

3 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
October 29, 2020

Cast the pointer appropriately

HAL_UART_Transmit(&huart2, (uint8_t *)"HELLOWORLD ", 12, 100) ;

Better yet write a subroutine that takes a char * input, and does the strlen() so you're not going to have to keep the parameters consistent.

If the linker can't find the linker script you need to resolve that, either put the .LD file where you're telling the linker it is situated, or pointing it at one that actually exists and is visible in the file system.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
NSirm.1
NSirm.1Author
Associate II
October 29, 2020

Hello

Thank you for your answer.

Could you tell me where can i check for the settings to change the location of .ld file?

Tesla DeLorean
Guru
October 29, 2020

I don't use CubeIDE, but rather GNU/GCC from the console with make.

You'll have to hunt-n-peck around the GUI and linker settings, or peek into the project file metadata.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..