I have broken out the MEMORY{} command of my linker script into a separate file memmap.ld in order to share it between projects (bootloader and target firmware). The file is currently located in the same directory as the main linker script and I include it using the line
INCLUDE memmap.ld
from my main .ld script however this does not work and I get the error
ld.exe: cannot open linker script file memmap.ld: No such file or directory
when building. The section of the ld manual dealing with the INCLUDE filename command reads
Include the linker script filename at this point. The file will be searched for in the current directory, and in any directory specified with the ā-Lā option. You can nest calls to INCLUDE up to 10 levels deep. You can place INCLUDE directives at the top level, in MEMORY or SECTIONS commands, or in output section descriptions.
What is up with this? Is the current directory taken from the current script, executable, some other external parameter?
Am using the ST build of the GNU Linker distributed with the 64 bit Windows STM32CubeIDE if it makes any difference.