<?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>Classic/Legacy CodeWarrior中的主题 Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150280#M2034</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Dear all,&lt;BR /&gt;Thanks for your reply and tips. I still do not understand how to use variable(s) declared using the #pragma DATA_SEG syntax. You are dealing with a novince programmer - needless to say -&amp;nbsp;so please bare with me and my questions!&lt;/DIV&gt;&lt;DIV&gt;1. I want to store a bunch of variables in data memory&amp;nbsp;inside my bootloader code&amp;nbsp;like a int *, int [], char etc. at memory location(s) ALPHA, BETA, THETA.. etc (for argument sake lets assume these addresses are valid).&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My&amp;nbsp; bootloader&amp;nbsp;invokes my RTOS code ( In Keil I simply do: ((void (code *) (void)) CVECT_BOOT)(); - the bootloader transfers control over to the RTOS residing at address location CVECT_BOOT&amp;nbsp;-&amp;nbsp;Still need to figure how to do this in CW but thats another question Ill be bothering you later with). Once inside my RTOS how do I access those same variables&amp;nbsp;declared&amp;nbsp;and defined in my bootloader? For this I am assuming I need to know the "physical" address location and not the "name" of my data segment?&lt;/DIV&gt;&lt;DIV&gt;2. What would I do if I needed to do the same thing but this time my information is in program memory and not in data memory? I want to share my&amp;nbsp;decode and encode array for manchester&amp;nbsp;encoding in program memory. &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Since my foundation is so shaky I would appreciate if you could suggest some books/notes as well.&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;DIV&gt;NeedHelp&amp;nbsp;- no kiddin!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by NeedHelp on &lt;SPAN class="date_text"&gt;2008-04-28&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;07:17 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Apr 2008 01:12:44 GMT</pubDate>
    <dc:creator>NeedHelp</dc:creator>
    <dc:date>2008-04-29T01:12:44Z</dc:date>
    <item>
      <title>Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150269#M2023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Background:&lt;/DIV&gt;&lt;DIV&gt;The bootloader and OS are sharing the same UART and the OS needs to access some variables defined in the UART section of the bootloader.&lt;/DIV&gt;&lt;DIV&gt;Using the Keil compiler all I had to do was:&lt;/DIV&gt;&lt;DIV&gt;On the BL side:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;unsigned int x _at_ SOME_HARD_CODED_VECTOR;&lt;/DIV&gt;On the OS side:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;unsigned int x _at_ SOME_HARD_CODED_VECTOR;&lt;/DIV&gt;&lt;DIV&gt;and both would essentially refer to the same address location.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However, code warrior doesnt support the _at_ keyword. How do I go about doing this in code warrior?&lt;/DIV&gt;&lt;DIV&gt;Basically&amp;nbsp;how do I define&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;int x;&lt;/DIV&gt;&lt;DIV&gt;int * y;&lt;/DIV&gt;&lt;DIV&gt;In the bootloader and also have access to it from the OS?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please help! The datasheet shows accessing memory locations in assembly using P:$xxxx and D:$xxxx but how do I do it in C?&lt;/DIV&gt;&lt;DIV&gt;Thanks a bunch!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 01:54:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150269#M2023</guid>
      <dc:creator>NeedHelp</dc:creator>
      <dc:date>2008-04-25T01:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150270#M2024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If the variables are at a known fixed location, or can be made so, you&amp;nbsp;might also&amp;nbsp;define the absolute address of&amp;nbsp;the variable within its definition.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;#define VAR_LOC&amp;nbsp; 0x1234&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;volatile int var1 @VAR_LOC;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 02:56:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150270#M2024</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-04-25T02:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150271#M2025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello Mac,&lt;/DIV&gt;&lt;DIV&gt;Thanks for your suggestion.&amp;nbsp;For some reason I am getting a compile time error.&lt;/DIV&gt;&lt;DIV&gt;This is what I have in my code:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#define VAR_LOC&amp;nbsp; 0x1234&lt;BR /&gt;volatile int var1 @VAR_LOC;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When I compile it says:&lt;/DIV&gt;&lt;DIV&gt;Error&amp;nbsp; : ";" expected&lt;/DIV&gt;&lt;DIV&gt;packet.c line 77 volatile int var1 @VAR_LOC;&lt;/DIV&gt;&lt;DIV&gt;-with a underscore under @&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Im using codewarrior 5.6.1.1658.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;IMG alt=":smileysad:" class="emoticon emoticon-smileysad" id="smileysad" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" title="Smiley Sad" /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any other suggestion(s)? Thank you!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 03:55:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150271#M2025</guid>
      <dc:creator>NeedHelp</dc:creator>
      <dc:date>2008-04-25T03:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150272#M2026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;ISO C conformant version of the same:&lt;BR /&gt;&lt;BR /&gt;#define var1 (*((volatile unsigned int*)0x1234))&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 13:57:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150272#M2026</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2008-04-25T13:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150273#M2027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks a bunch and thank god its friday!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 21:41:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150273#M2027</guid>
      <dc:creator>NeedHelp</dc:creator>
      <dc:date>2008-04-25T21:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150274#M2028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I had no problem compiling and linking the code.&amp;nbsp; Can I assume that line 77 contains the global definition of the variable, and is not within a function?&amp;nbsp; Sometimes, this sort of error can indicate a missing semicolon within a few lines above the indicated line.&amp;nbsp; See if the following code will compile (assuming 0x1234 represents a RAM address for the MCU derivative you are using.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;#define VAR_LOC&amp;nbsp; 0x1234&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;volatile int var1 @VAR_LOC;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;void main (void)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;{&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp; var1 = 1000;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp; for ( ; ; );&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;}&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 22:14:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150274#M2028</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-04-25T22:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150275#M2029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi there,&lt;/DIV&gt;&lt;DIV&gt;Rest assured there are no typos in the code. I think its got something to do with the C code being "ISO C conformant" - whetever that means I have no clue.&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2008 23:08:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150275#M2029</guid>
      <dc:creator>NeedHelp</dc:creator>
      <dc:date>2008-04-25T23:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150276#M2030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;I have the feeling that we might guess incorrectly because of the lack of knowledge which core you are targeting.&lt;BR /&gt;Please specify which CPU, which derivative and which version of CW you are using,&lt;BR /&gt;given the version "5.6.1.1658" (not sure what this version refers too, if this is a product version or just the version of some part of the product) and that you did previously post in the &lt;SPAN class="time_text text_smallest"&gt;&lt;/SPAN&gt;&lt;A href="http://forums.freescale.com/../board?board.id=CWDSPCOMM" rel="nofollow" target="_blank"&gt;DSP56xxx&lt;/A&gt; message board,&lt;BR /&gt;I'm not sure the @ syntax applies. The @ syntax does exist for the HC08/HC12 tools, I'm not not sure of the support for the DSP's, I doubt that they have it.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Apr 2008 01:02:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150276#M2030</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2008-04-26T01:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150277#M2031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;The target is a&amp;nbsp;MC56F8014. When I goto help-&amp;gt;about metrowerks codewarrior it says codewarrior ide version 5.6.1.1568.&lt;/DIV&gt;&lt;DIV&gt;Compiler : Metrowerks DSP C Compiler. (cant find the exact version #.. where do&amp;nbsp;I look for it?)&lt;/DIV&gt;&lt;DIV&gt;Hope this helps,&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Apr 2008 01:41:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150277#M2031</guid>
      <dc:creator>NeedHelp</dc:creator>
      <dc:date>2008-04-26T01:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150278#M2032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The problem appears because the OP is most likely using the pre-defined register map included in Codewarrior, which maps all registers to their correct addresses.&lt;BR /&gt;&lt;BR /&gt;If you try to use the "@" syntax as in your example when the register is already defined, the linker will try to allocate a new variable on the same spot.&lt;BR /&gt;&lt;BR /&gt;The code I posted allocates no variable, but just accesses a certain address, therefore it should work. It is also better, since it follows the C standard.&lt;BR /&gt;&lt;BR /&gt;Instead of using the "@" syntax, you could use the #pragma DATA_SEG syntax. It makes the code portable.&lt;BR /&gt;&lt;BR /&gt;ISO C conformant means just that: that the code you have written follows the C programming standard and is therefore portable. Knowing what is standard and what isn't is very basic knowledge for a professional programmer.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 21:31:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150278#M2032</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2008-04-28T21:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150279#M2033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;This request has been duplicated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We don't support the same syntax.&lt;/DIV&gt;&lt;DIV&gt;See below extract of the 56800x_Build_Tools_Reference.pdf manual.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Specifying Variable Addresses in C&lt;BR /&gt;The user can tell the compiler to specify the address of a variable in a C file using the :&lt;BR /&gt;operator. The constant value following the : operator is the word address of the global&lt;BR /&gt;variable (i.e., int OneReg : 0xBCD ; specifies that the global variable OneReg&lt;BR /&gt;resides at word address 0xBCD).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope this will help you&lt;/DIV&gt;&lt;DIV&gt;Pascal&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 22:27:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150279#M2033</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2008-04-28T22:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150280#M2034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Dear all,&lt;BR /&gt;Thanks for your reply and tips. I still do not understand how to use variable(s) declared using the #pragma DATA_SEG syntax. You are dealing with a novince programmer - needless to say -&amp;nbsp;so please bare with me and my questions!&lt;/DIV&gt;&lt;DIV&gt;1. I want to store a bunch of variables in data memory&amp;nbsp;inside my bootloader code&amp;nbsp;like a int *, int [], char etc. at memory location(s) ALPHA, BETA, THETA.. etc (for argument sake lets assume these addresses are valid).&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My&amp;nbsp; bootloader&amp;nbsp;invokes my RTOS code ( In Keil I simply do: ((void (code *) (void)) CVECT_BOOT)(); - the bootloader transfers control over to the RTOS residing at address location CVECT_BOOT&amp;nbsp;-&amp;nbsp;Still need to figure how to do this in CW but thats another question Ill be bothering you later with). Once inside my RTOS how do I access those same variables&amp;nbsp;declared&amp;nbsp;and defined in my bootloader? For this I am assuming I need to know the "physical" address location and not the "name" of my data segment?&lt;/DIV&gt;&lt;DIV&gt;2. What would I do if I needed to do the same thing but this time my information is in program memory and not in data memory? I want to share my&amp;nbsp;decode and encode array for manchester&amp;nbsp;encoding in program memory. &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Since my foundation is so shaky I would appreciate if you could suggest some books/notes as well.&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;DIV&gt;NeedHelp&amp;nbsp;- no kiddin!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by NeedHelp on &lt;SPAN class="date_text"&gt;2008-04-28&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;07:17 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 01:12:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150280#M2034</guid>
      <dc:creator>NeedHelp</dc:creator>
      <dc:date>2008-04-29T01:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Program/Data hard addresses  in C: Please help!!!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150281#M2035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Pragma like DATA_SEG, CONST_SEG , CODE_SEG are not valid for DSC product.&lt;/DIV&gt;&lt;DIV&gt;This can be used only on HC08 and HC12 product.&lt;/DIV&gt;&lt;DIV&gt;Using this pragma you can define a specific memory segment.&lt;/DIV&gt;&lt;DIV&gt;In the prm file (linker parameter file) you must define the segment in a phisical memory area.&lt;/DIV&gt;&lt;DIV&gt;Attached to this post you will find an&amp;nbsp;example.&lt;/DIV&gt;&lt;DIV&gt;Hope this will help you.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;for details please jhave a look to the compiler manual and in the smartlinker section of Build_Tools_Utilities.pdf.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards&lt;/DIV&gt;&lt;DIV&gt;Pascal&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="http://www.freescale.com/files/community_files/CWDSPCOMM/954_Test_marc_banked.zip" rel="nofollow" target="_self"&gt;Test_marc_banked.zip&lt;/A&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-15&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;05:43 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 13:06:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Accessing-Program-Data-hard-addresses-in-C-Please-help/m-p/150281#M2035</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2008-04-29T13:06:21Z</dc:date>
    </item>
  </channel>
</rss>

