<?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: How to extend .bss section to SRAM1 in MCUXPresso in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-extend-bss-section-to-SRAM1-in-MCUXPresso/m-p/1428487#M62641</link>
    <description>&lt;P&gt;To move BSS the linker script needs modified and then given the address of SRAM1.&lt;BR /&gt;&lt;BR /&gt;I don't use MCUXPresso so I can not help with that.&lt;BR /&gt;There may be someplace in there already that will simply assign the BSS address.&lt;/P&gt;&lt;P&gt;Failing that, I do know someplace there will be a .ld file that is currently being used.&lt;/P&gt;&lt;P&gt;Find that .ld file, make a copy, change MCUXpresso to use the new file.&lt;BR /&gt;&lt;BR /&gt;Look for this section and modify accordingly.&lt;BR /&gt;It may be a simple as changing the final SRAM to SRAM1 as shown here:&lt;BR /&gt;&lt;BR /&gt;SRAM and SRAM1 will be giving addresses at the top of the linker file in the section called MEMORY.&lt;BR /&gt;What you start with my not have the SORT_BY directives, feel free to add them.&lt;BR /&gt;&lt;BR /&gt;/* Uninitialized data section */&lt;BR /&gt;. = ALIGN(4); /* Align the .bss output section */&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;* SORT_BY_ALIGNMENT is very similar to SORT_BY_NAME. The&lt;BR /&gt;* difference is SORT_BY_ALIGNMENT will sort sections into descending&lt;BR /&gt;* order by alignment before placing them in the output file. Larger&lt;BR /&gt;* alignments are placed before smaller alignments in order to reduce&lt;BR /&gt;* the amount of padding necessary.&lt;BR /&gt;*/&lt;BR /&gt;.bss :&lt;BR /&gt;{&lt;BR /&gt;__bss_start__ = .; /* Standard newlib definition */&lt;BR /&gt;&lt;BR /&gt;*(.bss)&lt;BR /&gt;*(SORT_BY_ALIGNMENT(.bss*)) /* Sort the input sections from largest alignment to the smallest */&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;* A special notation is needed for common symbols, because in many&lt;BR /&gt;* object file formats common symbols do not have a particular input&lt;BR /&gt;* section. The linker treats common symbols as though they are in an&lt;BR /&gt;* input section named COMMON.&lt;BR /&gt;*/&lt;BR /&gt;*(COMMON)&lt;/P&gt;&lt;P&gt;. = ALIGN(4);&lt;BR /&gt;__bss_end__ = .; /* Standard newlib definition */&lt;BR /&gt;} &amp;gt; SRAM1&lt;BR /&gt;__bss_size__ = (__bss_end__ - __bss_start__);&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2022 12:18:06 GMT</pubDate>
    <dc:creator>bobpaddock</dc:creator>
    <dc:date>2022-03-15T12:18:06Z</dc:date>
    <item>
      <title>How to extend .bss section to SRAM1 in MCUXPresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-extend-bss-section-to-SRAM1-in-MCUXPresso/m-p/1427004#M62606</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I have a project on a MKW38 board which has 48k SRAM section and 15k SRAM1 section.&lt;/P&gt;&lt;P&gt;I have come to have a lot of static data and the build fails because the .bss section exceeds the limits of SRAM size&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="finalargasio_1-1647015839293.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/173248iEFFA6ECF4FD244D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="finalargasio_1-1647015839293.png" alt="finalargasio_1-1647015839293.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="finalargasio_0-1647015802508.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/173247i9106C5581C86263F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="finalargasio_0-1647015802508.png" alt="finalargasio_0-1647015802508.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like to make use of the SRAM1 section of 15k and allow the exceeding bytes of the bss to be placed there ( so bss is both on SRAM and SRAM1), but I couldn't figure out a way to do it in MCUXpresso,&lt;/P&gt;&lt;P&gt;can anyone help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 16:26:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-extend-bss-section-to-SRAM1-in-MCUXPresso/m-p/1427004#M62606</guid>
      <dc:creator>finalargasio</dc:creator>
      <dc:date>2022-03-11T16:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to extend .bss section to SRAM1 in MCUXPresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-extend-bss-section-to-SRAM1-in-MCUXPresso/m-p/1428350#M62637</link>
      <description>&lt;P&gt;bump&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 09:06:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-extend-bss-section-to-SRAM1-in-MCUXPresso/m-p/1428350#M62637</guid>
      <dc:creator>finalargasio</dc:creator>
      <dc:date>2022-03-15T09:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to extend .bss section to SRAM1 in MCUXPresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-extend-bss-section-to-SRAM1-in-MCUXPresso/m-p/1428487#M62641</link>
      <description>&lt;P&gt;To move BSS the linker script needs modified and then given the address of SRAM1.&lt;BR /&gt;&lt;BR /&gt;I don't use MCUXPresso so I can not help with that.&lt;BR /&gt;There may be someplace in there already that will simply assign the BSS address.&lt;/P&gt;&lt;P&gt;Failing that, I do know someplace there will be a .ld file that is currently being used.&lt;/P&gt;&lt;P&gt;Find that .ld file, make a copy, change MCUXpresso to use the new file.&lt;BR /&gt;&lt;BR /&gt;Look for this section and modify accordingly.&lt;BR /&gt;It may be a simple as changing the final SRAM to SRAM1 as shown here:&lt;BR /&gt;&lt;BR /&gt;SRAM and SRAM1 will be giving addresses at the top of the linker file in the section called MEMORY.&lt;BR /&gt;What you start with my not have the SORT_BY directives, feel free to add them.&lt;BR /&gt;&lt;BR /&gt;/* Uninitialized data section */&lt;BR /&gt;. = ALIGN(4); /* Align the .bss output section */&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;* SORT_BY_ALIGNMENT is very similar to SORT_BY_NAME. The&lt;BR /&gt;* difference is SORT_BY_ALIGNMENT will sort sections into descending&lt;BR /&gt;* order by alignment before placing them in the output file. Larger&lt;BR /&gt;* alignments are placed before smaller alignments in order to reduce&lt;BR /&gt;* the amount of padding necessary.&lt;BR /&gt;*/&lt;BR /&gt;.bss :&lt;BR /&gt;{&lt;BR /&gt;__bss_start__ = .; /* Standard newlib definition */&lt;BR /&gt;&lt;BR /&gt;*(.bss)&lt;BR /&gt;*(SORT_BY_ALIGNMENT(.bss*)) /* Sort the input sections from largest alignment to the smallest */&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;* A special notation is needed for common symbols, because in many&lt;BR /&gt;* object file formats common symbols do not have a particular input&lt;BR /&gt;* section. The linker treats common symbols as though they are in an&lt;BR /&gt;* input section named COMMON.&lt;BR /&gt;*/&lt;BR /&gt;*(COMMON)&lt;/P&gt;&lt;P&gt;. = ALIGN(4);&lt;BR /&gt;__bss_end__ = .; /* Standard newlib definition */&lt;BR /&gt;} &amp;gt; SRAM1&lt;BR /&gt;__bss_size__ = (__bss_end__ - __bss_start__);&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 12:18:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-extend-bss-section-to-SRAM1-in-MCUXPresso/m-p/1428487#M62641</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2022-03-15T12:18:06Z</dc:date>
    </item>
  </channel>
</rss>

