On Mon, Dec 12, 2011 at 1:39 PM, Peter Bigot <big...@acm.org> wrote:
> On Mon, Dec 12, 2011 at 2:31 PM, Timothy Logan <timothy.lo...@gmail.com> 
> wrote:
>> Hello,
>>
>> I am porting some code from IAR which involves me having to place a few
>> different structures in very specific addresses in the MSP430 memory.
>>
>> In IAR there is a pragma to do it:
>> http://supp.iar.com/Support/?note=27787&from=search+result
>>
>> The way I see doing it in mspgcc is to create a custom linker script with
>> custom memory sections, and simply use the "section" attribute to manage
>> specific variable memory locations in declarations. This seems a little
>> overkill though as I would have to make different memory sections for each
>> variable and would have to rewrite the entire memory table as a side
>> effect.
>>
>> My question: Is there an easier way to control which address in memory a
>> variable/structure is stored in without having to muck around with linker
>> scripts?
>
> You can use asm statements, as are done with the peripheral register
> declarations.  Something like:
>
> volatile unsigned int specialdata __asm__("0x1320");
>
> will force the definition of specialdata to be placed at address 0x1320.
>

Is there a syntax that will allow placement of a initialized const
variables in memory?  (I want my bootloader to place its version
number in a well-defined place in flash memory.)  Is this possible
without mucking with the linker script?

-- 
Regards,
Mark
markrages@gmail

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to