<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot change linker script path without changing output path? in MCUXpresso IDE</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806658#M2879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the output from the console where the linker gets invoked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;Building target: RTCP_Host_BL.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Sources\NXPBootloaderPoC\RTCP_Host_BL\libs" -Xlinker -Map="RTCP_Host_BL.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -Xlinker --sort-section=alignment -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -T "RTCP_Host_BL.ld" -L ..\ -o "RTCP_Host_BL.axf"&amp;nbsp; ./startup/startup_mkv31f51212.o&amp;nbsp; ./source/Test_Proj.o&amp;nbsp; ./board/board.o ./board/clock_config.o ./board/peripherals.o ./board/pin_mux.o&amp;nbsp; ./CMSIS/system_MKV31F51212.o&amp;nbsp;&amp;nbsp; -larm_cortexM4lf_math
arm-none-eabi-gcc.exe: error: RTCP_Host_BL.axf: No such file or directory
make: *** [RTCP_Host_BL.axf] Error 1

11:26:49 Build Finished (took 3s.866ms)&lt;/PRE&gt;&lt;P&gt;The reason why I turned off the managed linker script mechanism is to keep the start addresses and lengths of the bootloader and application images in the same space.&amp;nbsp; If I used the Memory Configuration Editor in the project settings, it would be &lt;EM&gt;REALLY&lt;/EM&gt; easy for a developer later on to change an address or length in one project (application or bootloader) and forget to change the addresses in other project.&lt;/P&gt;&lt;P&gt;I have a common linker file that is included by the main linker scripts for the bootloader and application, like this horrific diagram shows:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;IMG alt="pastedImage_3.png" src="https://community.nxp.com/t5/image/serverpage/image-id/76150i3D62D37FDBA27105/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addresses.ld contains the following:&lt;/P&gt;&lt;PRE&gt;&amp;nbsp; __TOTAL_FLASH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x00040000;
&amp;nbsp;&amp;nbsp; &amp;nbsp;__BOOTLOADER_START&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x00000000;
&amp;nbsp;&amp;nbsp; &amp;nbsp;__BOOTLOADER_LENGTH_BYTES&amp;nbsp;&amp;nbsp; = 0x00005000;
&amp;nbsp; __APPLICATION_START&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = __BOOTLOADER_START + __BOOTLOADER_LENGTH_BYTES;
&amp;nbsp; __APPLICATION_LENGTH_BYTES&amp;nbsp; = __TOTAL_FLASH - __BOOTLOADER_LENGTH_BYTES;
&amp;nbsp;
MEMORY
{
&amp;nbsp; /* Define each memory region */
&amp;nbsp; BOOTLOADER_FLASH (rx) : ORIGIN = __BOOTLOADER_START, LENGTH = __BOOTLOADER_LENGTH_BYTES
&amp;nbsp; APPLICATION_FLASH(rx) : ORIGIN = __APPLICATION_START, LENGTH = __APPLICATION_LENGTH_BYTES
&amp;nbsp; SRAM_UPPER (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000 /* 32K bytes (alias RAM) */ &amp;nbsp;
&amp;nbsp; SRAM_LOWER (rwx) : ORIGIN = 0x1fffc000, LENGTH = 0x4000 /* 16K bytes (alias RAM2) */ &amp;nbsp;
}&lt;/PRE&gt;&lt;P&gt;The linker script for the bootloader uses the BOOTLOADER_FLASH memory definition.&amp;nbsp; The linker script for the application uses the APPLICATION_FLASH memory definition.&lt;/P&gt;&lt;P&gt;This way, a future developer has less of chance of screwing up the memory locations, since the values for the start addresses and lengths are all contained within a common, shared file.&amp;nbsp; It also eliminates duplication, and duplication drives me up the wall.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Nov 2020 14:11:27 GMT</pubDate>
    <dc:creator>curtis_hendrix</dc:creator>
    <dc:date>2020-11-02T14:11:27Z</dc:date>
    <item>
      <title>Cannot change linker script path without changing output path?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806655#M2876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to manually manage the linker scripts for a bootloader project, and I'm having a problem with changing the linker script location.&lt;/P&gt;&lt;P&gt;Since all of the configurations (Debug / Release /etc) for my project use the same linker scripts, I want to put them in main project folder.&amp;nbsp; By default, the linker scripts get generated in the configuration (Debug/Release) folder.&amp;nbsp; I'm moving the linker scripts up one directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went into the project properties-&amp;gt;C/C++ Build-&amp;gt;Settings-MCU Linker-&amp;gt;Managed Linker Script, unchecked "Manage linker script", put the name of my linker script in for "Linker script", and set "Script path" to "..\", like so.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75971iE963CC883932356B/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's the only thing I changed in the project properties.&lt;/P&gt;&lt;P&gt;But now the project fails to build with the following error:&lt;/P&gt;&lt;P&gt;arm-none-eabi-gcc.exe: error: RTCP_Host.axf: No such file or directory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought the "Script path" only changed where the linker went looking for its script.&amp;nbsp; Apparently this is not correct.&amp;nbsp; What exactly does the "Script path" setting change?&amp;nbsp; And how can I change the linker script location without changing where the output file gets located?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 18:29:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806655#M2876</guid>
      <dc:creator>curtis_hendrix</dc:creator>
      <dc:date>2018-10-18T18:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot change linker script path without changing output path?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806656#M2877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I figured out a workaround:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start by changing the Command line pattern field to match the following:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75898i1C0ABD84EAE63D1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then add the relative path to the linker script name, like so:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75948iE284DE31F27B8A3E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keep in mind that the linker script used in the "Linker Script" field will still be local to the configuration directory.&amp;nbsp; For example, this is my project directory, with a couple of other linker scripts that get included inside of "RTCP_Host.ld"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/root&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; /common&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTCP_memory.ld&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; /projectDir&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTCP_Host_library.ld&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTCP_Host.ld&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to use the following inside of RTCP_Host.ld in order for the other 2 linker files to be included directory.&lt;/P&gt;&lt;P&gt;INCLUDE "\..\..\Common\RTCP_memory.ld"&lt;BR /&gt;INCLUDE "\..\RTCP_Host_library.ld"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 19:06:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806656#M2877</guid>
      <dc:creator>curtis_hendrix</dc:creator>
      <dc:date>2018-10-18T19:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot change linker script path without changing output path?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806657#M2878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please post the actual text from the build log in the Console view (probably just the link step from towards the end) showing the full error message and the command that triggered it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See section 18.8, "The Console View" of the MCUXpresso IDE v10.2 User Guide for details of how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might also be useful to understand what you are doing that is causing you to turn off the managed linker script mechanism. It may well be that all you actually need to do is modify that project's memory map in the memory configuration editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MCUXpresso IDE Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 12:51:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806657#M2878</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2018-10-19T12:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot change linker script path without changing output path?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806658#M2879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the output from the console where the linker gets invoked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;Building target: RTCP_Host_BL.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Sources\NXPBootloaderPoC\RTCP_Host_BL\libs" -Xlinker -Map="RTCP_Host_BL.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -Xlinker --sort-section=alignment -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -T "RTCP_Host_BL.ld" -L ..\ -o "RTCP_Host_BL.axf"&amp;nbsp; ./startup/startup_mkv31f51212.o&amp;nbsp; ./source/Test_Proj.o&amp;nbsp; ./board/board.o ./board/clock_config.o ./board/peripherals.o ./board/pin_mux.o&amp;nbsp; ./CMSIS/system_MKV31F51212.o&amp;nbsp;&amp;nbsp; -larm_cortexM4lf_math
arm-none-eabi-gcc.exe: error: RTCP_Host_BL.axf: No such file or directory
make: *** [RTCP_Host_BL.axf] Error 1

11:26:49 Build Finished (took 3s.866ms)&lt;/PRE&gt;&lt;P&gt;The reason why I turned off the managed linker script mechanism is to keep the start addresses and lengths of the bootloader and application images in the same space.&amp;nbsp; If I used the Memory Configuration Editor in the project settings, it would be &lt;EM&gt;REALLY&lt;/EM&gt; easy for a developer later on to change an address or length in one project (application or bootloader) and forget to change the addresses in other project.&lt;/P&gt;&lt;P&gt;I have a common linker file that is included by the main linker scripts for the bootloader and application, like this horrific diagram shows:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;IMG alt="pastedImage_3.png" src="https://community.nxp.com/t5/image/serverpage/image-id/76150i3D62D37FDBA27105/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addresses.ld contains the following:&lt;/P&gt;&lt;PRE&gt;&amp;nbsp; __TOTAL_FLASH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x00040000;
&amp;nbsp;&amp;nbsp; &amp;nbsp;__BOOTLOADER_START&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x00000000;
&amp;nbsp;&amp;nbsp; &amp;nbsp;__BOOTLOADER_LENGTH_BYTES&amp;nbsp;&amp;nbsp; = 0x00005000;
&amp;nbsp; __APPLICATION_START&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = __BOOTLOADER_START + __BOOTLOADER_LENGTH_BYTES;
&amp;nbsp; __APPLICATION_LENGTH_BYTES&amp;nbsp; = __TOTAL_FLASH - __BOOTLOADER_LENGTH_BYTES;
&amp;nbsp;
MEMORY
{
&amp;nbsp; /* Define each memory region */
&amp;nbsp; BOOTLOADER_FLASH (rx) : ORIGIN = __BOOTLOADER_START, LENGTH = __BOOTLOADER_LENGTH_BYTES
&amp;nbsp; APPLICATION_FLASH(rx) : ORIGIN = __APPLICATION_START, LENGTH = __APPLICATION_LENGTH_BYTES
&amp;nbsp; SRAM_UPPER (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000 /* 32K bytes (alias RAM) */ &amp;nbsp;
&amp;nbsp; SRAM_LOWER (rwx) : ORIGIN = 0x1fffc000, LENGTH = 0x4000 /* 16K bytes (alias RAM2) */ &amp;nbsp;
}&lt;/PRE&gt;&lt;P&gt;The linker script for the bootloader uses the BOOTLOADER_FLASH memory definition.&amp;nbsp; The linker script for the application uses the APPLICATION_FLASH memory definition.&lt;/P&gt;&lt;P&gt;This way, a future developer has less of chance of screwing up the memory locations, since the values for the start addresses and lengths are all contained within a common, shared file.&amp;nbsp; It also eliminates duplication, and duplication drives me up the wall.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:11:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806658#M2879</guid>
      <dc:creator>curtis_hendrix</dc:creator>
      <dc:date>2020-11-02T14:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot change linker script path without changing output path?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806659#M2880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your explanation - we'll ponder on whether there is anything we can do in this area for a future release.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, with regards to your original problem - can you try replacing your "..\" path with ".." or "../". I suspect that one of these will fix the problem (I don't have access to a Windows box right now to check this out though).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[It is always best to stick with Unix style directory separators inside source files and IDE configuration options, even when working on Windows.]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MCUXpresso IDE Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 10:47:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Cannot-change-linker-script-path-without-changing-output-path/m-p/806659#M2880</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2018-10-23T10:47:59Z</dc:date>
    </item>
  </channel>
</rss>

