<?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>Other NXP ProductsのトピックRe: Cretating a section for MPC5606S graphics RAM</title>
    <link>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154591#M636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems I need to add a&lt;/P&gt;&lt;PRE&gt;__declspec(section "graphics")&lt;/PRE&gt;&lt;P&gt;to the actual variable declaration, which resulted in a "no uninitialized data" error message.&lt;/P&gt;&lt;P&gt;From other posts I have gathered that I need to change the pragma to:&lt;/P&gt;&lt;PRE&gt;#pragma section data_type "graphics" "graphics"&lt;/PRE&gt;&lt;P&gt;I'll try that later and report back...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 08:58:11 GMT</pubDate>
    <dc:creator>fieroluke</dc:creator>
    <dc:date>2020-10-29T08:58:11Z</dc:date>
    <item>
      <title>Cretating a section for MPC5606S graphics RAM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154590#M635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am new to the PPC world, so this may be a dumb question, but I would like to know how to define a section for the 160KB on-chip graphics RAM the 5606S features with CW2.9 .The default LCF file only contains sections for regular (ECC) RAM.&lt;/P&gt;&lt;P&gt;I've added the line&lt;/P&gt;&lt;PRE&gt;graphics_ram : org = 0x60000000, len = 0x00028000&lt;/PRE&gt;&lt;P&gt;to the MEMORY section, and I defined a group&lt;/P&gt;&lt;PRE&gt;GROUP : {       graphics : {}    } &amp;gt; graphics_ram&lt;/PRE&gt;&lt;P&gt;In the code I defined a variable:&lt;/P&gt;&lt;PRE&gt;#pragma push // save the current state #pragma section RW "graphics"uint8_t buffer[65536];#pragma pop // restore the previous state&lt;/PRE&gt;&lt;P&gt;But somehow "buffer" still gets allocated in regular internal RAM. What am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:58:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154590#M635</guid>
      <dc:creator>fieroluke</dc:creator>
      <dc:date>2020-10-29T08:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cretating a section for MPC5606S graphics RAM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154591#M636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems I need to add a&lt;/P&gt;&lt;PRE&gt;__declspec(section "graphics")&lt;/PRE&gt;&lt;P&gt;to the actual variable declaration, which resulted in a "no uninitialized data" error message.&lt;/P&gt;&lt;P&gt;From other posts I have gathered that I need to change the pragma to:&lt;/P&gt;&lt;PRE&gt;#pragma section data_type "graphics" "graphics"&lt;/PRE&gt;&lt;P&gt;I'll try that later and report back...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:58:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154591#M636</guid>
      <dc:creator>fieroluke</dc:creator>
      <dc:date>2020-10-29T08:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cretating a section for MPC5606S graphics RAM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154592#M637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, this seems to work:&lt;/P&gt;&lt;PRE&gt;GROUP : {       .graphics  (DATA) : {}                  } &amp;gt; graphics_ram&lt;/PRE&gt;&lt;PRE&gt;#pragma push // save the current state #pragma section data_type ".graphics" ".graphics"__declspec(section ".graphics") uint8_t Vram[320*240];#pragma pop // restore the previous state&lt;/PRE&gt;&lt;P&gt;However: although the code works now, the segment is initialized data as it seems, so the binary file is unnecessarily large.&lt;/P&gt;&lt;P&gt;I also tried:&lt;/P&gt;&lt;PRE&gt;GROUP : {       .graphics  (BSS) : {}                  } &amp;gt; graphics_ram&lt;/PRE&gt;&lt;PRE&gt;#pragma push // save the current state #pragma section data_type ".text" ".graphics"__declspec(section ".graphics") uint8_t Vram[320*240];#pragma pop // restore the previous state&lt;/PRE&gt;&lt;P&gt;Now the segment seems to be uninitialized data, however the compiler wants to put the variable into the initialized section&lt;/P&gt;&lt;P&gt;Hints anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:58:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154592#M637</guid>
      <dc:creator>fieroluke</dc:creator>
      <dc:date>2020-10-29T08:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cretating a section for MPC5606S graphics RAM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154593#M638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently CW only allows #pragma section for initialized data, if an uninitialized section is used in the declspec, the compiler issues an error. In effect, all uninitialized data must go into the (single) BSS segment.&lt;/P&gt;&lt;P&gt;Obviously I don't want &lt;EM&gt;all&lt;/EM&gt; uninitialized data to go into graphics memory, so I put the declaration of the graphics memory buffer into a separate file gfx.c:&lt;/P&gt;&lt;PRE&gt;uint8_t Vram[240*320];&lt;/PRE&gt;&lt;P&gt;and in the LCF file I added:&lt;/P&gt;&lt;PRE&gt;MEMORY{        graphics_ram :     org = 0x60000000,   len = 0x00028000}GROUP : {       .graphicsBSS  (BSS) : { gfx.o (.bss) }               } &amp;gt; graphics_ram&lt;/PRE&gt;&lt;P&gt;Although the compiler only allows a single BSS segment, the linker allows different BSS segments for different files. At least this seems to work, although I now have to put all graphics descriptor data into separate files. If there is another way of creating and using a separate uninitialized data segment, I'd be glad to know it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:58:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154593#M638</guid>
      <dc:creator>fieroluke</dc:creator>
      <dc:date>2020-10-29T08:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cretating a section for MPC5606S graphics RAM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154594#M639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about decalring a global POINTER to the graphics RAM, and have everything use that. Then initialise the pointer in code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 21:40:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154594#M639</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2012-04-19T21:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cretating a section for MPC5606S graphics RAM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154595#M640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;That's what I did at first, but when the application is done, I'll have quite a lot of graphics buffers, and I would like the compiler keep track of where which buffer is, instead of keeping track manually.&lt;P&gt;The DCU2 is able to blend the graphics layers, so there won't be just one or two static (large) buffers, but also many smaller ones of various sizes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 03:02:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/Cretating-a-section-for-MPC5606S-graphics-RAM/m-p/154595#M640</guid>
      <dc:creator>fieroluke</dc:creator>
      <dc:date>2012-04-20T03:02:26Z</dc:date>
    </item>
  </channel>
</rss>

