<?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: Complex relocatable expression not supported in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205768#M17263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my point with your algorithm the last byte is send after the end of the routine. So it's not very good if you have different SPI communication with several slaves or several communications with the same slave.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do something like that (family MC9S08)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38153iE000FE4B6CDB726C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this method you only send the constant table GET1DATA0A (OutBuffer). I have to do something with the possibility to choose the constant table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2012 11:18:49 GMT</pubDate>
    <dc:creator>Brax02</dc:creator>
    <dc:date>2012-10-04T11:18:49Z</dc:date>
    <item>
      <title>Complex relocatable expression not supported</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205761#M17256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: Courier New,Courier,mono; margin-left: 1em; margin-top: 0.5em;"&gt; XDEF offset &lt;/P&gt;&lt;P style="font-family: Courier New,Courier,mono; margin-left: 1em; margin-top: 0.5em;"&gt; DataSec1: SECTION SHORT &lt;/P&gt;&lt;P style="font-family: Courier New,Courier,mono; margin-left: 1em; margin-top: 0.5em;"&gt; DataLbl1: DS.B 10 &lt;/P&gt;&lt;P style="font-family: Courier New,Courier,mono; margin-left: 1em; margin-top: 0.5em;"&gt; DataSec2: SECTION SHORT &lt;/P&gt;&lt;P style="font-family: Courier New,Courier,mono; margin-left: 1em; margin-top: 0.5em;"&gt; DataLbl2: DS.W 15 &lt;/P&gt;&lt;P style="font-family: Courier New,Courier,mono; margin-left: 1em; margin-top: 0.5em;"&gt; offset: EQU DataLbl2 - DataLbl1 &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt; I need to do something like that but it's generated the error (&lt;/SPAN&gt;Complex relocatable expression not supported ).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Somebody knows how to do that ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or it's not possible ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 15:36:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205761#M17256</guid>
      <dc:creator>Brax02</dc:creator>
      <dc:date>2012-10-01T15:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Complex relocatable expression not supported</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205762#M17257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bertrand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you have is not possible. Since the placement of sections won't occur until link-time, the assembler can't know where either "DataLbl2" or "DataLbl1" will be, and therefore can't calculate their offset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your options are:&lt;/P&gt;&lt;P&gt;1) Put both "DataLbl2" and "DataLbl1" in the same section.&lt;/P&gt;&lt;P&gt;2) Calculate the offset at run-time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would use the first option, myself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 18:49:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205762#M17257</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2012-10-01T18:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Complex relocatable expression not supported</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205763#M17258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tanks for your answer !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if I would like to know the offset between a Variable (RAM) and a constant (FLASH). The only option is to calculate the offset in run time because we can't put them in the same section ..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 07:28:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205763#M17258</guid>
      <dc:creator>Brax02</dc:creator>
      <dc:date>2012-10-02T07:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Complex relocatable expression not supported</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205764#M17259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Betrand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may have some variable or label V0 at start of RAM section. You may have some constant/label C0 at start of FLASH section dedicated to constants. Since you know where each section starts, you may try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;offset = (V1-V0) - (C1-C0) + (R0-F0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where V1-V0 is compile time constant variable offset relative to start of section.&lt;/P&gt;&lt;P&gt;C1-C0 - also compile time constant&lt;/P&gt;&lt;P&gt;R0 - known linker address of RAM section, F0 - known linker address of constants section. R0 == V0, F0 == C0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 08:09:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205764#M17259</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-10-02T08:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Complex relocatable expression not supported</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205765#M17260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bertrand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you are correct, you can't &lt;EM&gt;directly&lt;/EM&gt; calculate the offset between ram and flash when using relocatable assembly language. However, I have never found a need to do that. Can you give an example of what you are doing? Maybe there's a better way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edward's (kef's) technique will work, but you need to be aware of its fragility. R0 and F0 would need to be defined in the assembler source file as the start of the segments, and they need to be defined also in the .PRM file to the same addresses. If the segment locations in the .PRM file should change, as they might if you ported to a different MCU, no errors would be reported and the code would simply not work. Explicit comments at both locations would help to minimize the risk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 20:00:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205765#M17260</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2012-10-02T20:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Complex relocatable expression not supported</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205766#M17261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I send constant saved in FLASH by SPI (8bytes by frames). In the same time i want receive and save the datas on miso pin. So I would like to add or substract an offset beteween the addres of my table in flash and the adress in RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you are right there is probably a best way to do that.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 07:16:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205766#M17261</guid>
      <dc:creator>Brax02</dc:creator>
      <dc:date>2012-10-03T07:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Complex relocatable expression not supported</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205767#M17262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bertrand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do similar buffer management, as is pretty necessary with the SPI. The way I usually do it is with the H:X register as an index, and then having the address to each buffer specified as an offset in the MOV instruction. Here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, this new board pretty much sucks. I can't find a way to insert code. I never thought I would miss the old Lithium board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will post back when I find a way to insert code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: Well, there seems to be no way to post code in a window. There also seems to be no way to request help from a moderator. And also no topic to discuss the board itself. Yes, I'm starting to miss that crappy old Lithium board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I will simply attach the source file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AAARRGG: This board turned it into a ZIP file !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 19:28:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205767#M17262</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2012-10-03T19:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Complex relocatable expression not supported</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205768#M17263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my point with your algorithm the last byte is send after the end of the routine. So it's not very good if you have different SPI communication with several slaves or several communications with the same slave.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do something like that (family MC9S08)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38153iE000FE4B6CDB726C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this method you only send the constant table GET1DATA0A (OutBuffer). I have to do something with the possibility to choose the constant table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 11:18:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Complex-relocatable-expression-not-supported/m-p/205768#M17263</guid>
      <dc:creator>Brax02</dc:creator>
      <dc:date>2012-10-04T11:18:49Z</dc:date>
    </item>
  </channel>
</rss>

