Skip to main content
NSirm.1
Associate II
Oct 29, 2020 4:35 PM UTC
Solved

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

 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.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Oct 29, 2020 5:01 PM UTC

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..

3 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Oct 29, 2020 5:01 PM UTC

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
Oct 29, 2020 5:18 PM UTC

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
Oct 29, 2020 5:43 PM UTC

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..