cancel
Showing results for 
Search instead for 
Did you mean: 

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

NSirm.1
Associate III

 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.

1 ACCEPTED SOLUTION

Accepted Solutions

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
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

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
Up vote any posts that you find helpful, it shows what's working..
NSirm.1
Associate III

Hello

Thank you for your answer.

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

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
Up vote any posts that you find helpful, it shows what's working..