avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-chat] Storing templates in flash


From: Schwichtenberg, Knut
Subject: RE: [avr-chat] Storing templates in flash
Date: Wed, 4 Apr 2007 12:59:19 +0200

Hugo, 

> -----Original Message-----
> 
> think that's how it can be done). This would be the structure 
> of my code 
> space:
> 
> first address:        Bootloader
> 1k later:     Application
> starting at 7k:               Templates
> 
> ...so I can use a bootloader to change only the templates.
If you could convince the m8 to have the bootloader at this address your layout 
will work, otherwise - if you want to use the original silicon your memory 
layout has to look different - please read the bootloader section of the m8 
Datasheet.
> 
> I don't want to declare them in .c files as PROGMEM variables and 
> arrays. I have seen somewhere that you can declare a section 
> somewhere 
> (linker file?) and so the costants are copied to flash (no 
> source code 
> compilation) I would then remember the address for the start of my 
> templates for using that in the C programs that read the template.
How is your template available? As binary data, as a graphic, as an idea? ;-) 
You need to have any kind of definied object file that can be programmed by the 
normal programmers into the m8. And the formats for the programmere are 
limitted. 
> 
> How can that be done? I have looked into AVR GCC and 
> Introducion to GCC 
> documents, but I cannot find a way to declare the sections 
> and put the 
> data in.
Up to now I only understand what you don't want to do, but what is the source 
for your template?  

Using a section / giving it an address at linking time is done via the 
following snipset of the linker command:
 
...-Wl,--section-start=.absolute=0x800100,--defsym=__stack=0x0... 

Cheers

Knut




reply via email to

[Prev in Thread] Current Thread [Next in Thread]