We are using MCUXpresso's Managed Linker Script feature. However, we do have a small linker script to support gnu_build_id, used by Memfault.
The highlighted region is causing these warnings:
gnu_build_id.ld:12: warning: memory region `QSPI_FLASH' not declared
gnu_build_id.ld:12: warning: memory region `SRAM' not declared
imxrt685_Debug_memory.ld:15: warning: redeclaration of memory region `QSPI_FLASH'
imxrt685_Debug_memory.ld:16: warning: redeclaration of memory region `SRAM'
The MEMORY defined in the generated imxrt685_Debug_memory.ld is pretty typical.
Removing the highlighted portion from gnu_build_id.ld results in the warnings going away, but then the ID code may not appear at the correct address.
Perhaps something needs to be done with the the Miscellaneous or Managed Linker Script settings?
Hi @pcpro1789
I hope to find you well.
The debug linker script created by MCUxpresso does includes memory.ld and library ld.
Are you missing this? QSPI_FLASH and SRAM are already defined in the IDE's magemed linker script.
how are you integrating the below script? I mentoned the above since I do not saw the includes.
Diego
Hi @pcpro1789
Thank you for your reply! I am very sorry for the delayed response.
I agree with you the main and default ld, which is generated by the MCUxpresso define SRAM and QSPI_FLASH . However, the linker file that you included, does not know about those areas, I suggested that you could add the import directive on that ld.
Does including the other lds on this on your ld works?
There is another option that we can try:
Disable the Manage Linker script, and add your ld to the lds generated by the IDE. This way when you re-compile the IDE will not longer re-create the ld. Please help me testing this workarround.
I am not falimiliar with the ld that you require to include, but there is another one, to avoid disabling the Manage linker script and to add sections in on the IDES auto generated lds. This is creating your custom extra linker areas. But this is all the flexibility I can find on the MCUXpresso managed linker script.
Thank you!
Diego
@diego_charles The Managed Linker Script utility does indeed generate the memory.ld and library.ld files.
The custom script is integrated via the Miscellaneous linker settings (third screen capture in my original post). Here it is again. Please see the highlighted blue line.