PlatformIO Community

Stm32f103rc ldscript question


#1

Could anyone tell me the location of platformio stm32f103rc default ldscript? i am using stm32duino platform


#2

pio run -t clean && pio run -v to see the full compiler commands, the last ones should be having the LD script you’re searching for.


#3

thanks a lot for your answer.

And i have another problem:
i write a .bat file to upload my firmware, and i want to know how can i replace it with vscode upload button action


#4

And i find the similar script in packages\tool-stm32duino : serial_upload.bat
image

but in that bat it doen’t use the stm32loader.py ,which i want to use,at the follow picture the thrid line
but default is second line , rem: means comment
image

so how can i do that without changing the platformio default things


#5

Change the upload_protocol = ... according to https://docs.platformio.org/en/latest/boards/ststm32/genericSTM32F103RC.html#uploading, seems like you want serial


#6

yes , i want serial to upload ,but in official platformio ,it use stm32flash.exe to upload, but i want my own .bat file to do that


#7

Then implement a upload_protocol = custom script as noted in https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html#custom-upload-tool.