News:

Let's find out together what makes a PIC Tick!

Main Menu

GLD linker files & working directory

Started by Wimax, Nov 15, 2025, 03:33 PM

Previous topic - Next topic

Wimax

Hello everybody ;) 

Is there a way to force Positron24 to use, as "inc" files, the gld file for the selected mcu directly from the working directory and not from PDS ?



top204

#1
The compiler does not use the .gld files, and neither does the assembler. They are only used by the linker, after compilation and assembly have taken place.

The only way to use different values in a linker file is to change the values in it, and keep a backup of the original.

Wimax

I thought there was a way to 'convince' the linker to search for the gld first in the working directory and then in PDS.
To avoid accidental overwriting, I solved the problem with two service directories, each containing the file with the custom changes, to be copied into the main directory each time.
It seems trivial, but having to keep the same file name for different programmes during development and testing,  the error is lurking.

atomix

#3
If you are using VSCode and my Positron extension, you can use automatic replacement of the *.gld file and then restore it (see the attached example).

Wimax

Hi Atomix,

I use the native editor, but I will definitely try VSCode, thank you for the suggestion.