avr-chat
[Top][All Lists]
Advanced

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

[avr-chat] Storing templates in flash


From: Hugo González Monteverde
Subject: [avr-chat] Storing templates in flash
Date: Wed, 04 Apr 2007 02:20:01 -0600
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Hello all,

I am writing a program that will print some forms to a serial ticket printer. I want to use the program space version of printf to do necessary interpolation in a template. I would be using a mega8

Thing is: I want to store the templates in flash and then use them, but I wouldn't like to declare them in a source file, but use a "section" (I 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.

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 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.

Hope someone can point me to docs or in the right direction.

Thanks,
Hugo




reply via email to

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