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


_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat

Reply via email to