[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] String in flash access in Boot Loader Atmega1280
From: |
Stu Bell |
Subject: |
RE: [avr-gcc-list] String in flash access in Boot Loader Atmega1280 |
Date: |
Mon, 24 Sep 2007 13:33:31 -0600 |
As well as Martin's solution, you might also look at the
solution I used for my ATmega2560. It's posted on the AVRfreaks.net
site:
As
always, there's moe than one way to do anything. :-)
Best
regards,
Stu Bell
DataPlay (DPHI, Inc.)
Hello,
I try to program a
boot loader on Atmega1280.
My configuration
:
- linux Fedora
Core 7,
- avr libc
1.4.6,
- avrdude
5.3.1,
- avrgcc
4.2.0.
I use the program in
application section and there is no problem.
When I try to use it
in boot loader section, the program starts but I can't access to string in
flash.
I use
pgm_read_byte_far().
I read in file
pgmspace.h :
\note If possible, put your constant tables in the lower 64 KB and
use
pgm_read_byte_near() or pgm_read_word_near() instead
of
pgm_read_byte_far() or pgm_read_word_far() since it is
more efficient that
way, and you can still use the upper
64K for executable code.
All functions that are suffixed
with a \c _P \e require their
arguments to be in the lower
64 KB of the flash ROM, as they do
not use ELPM
instructions. This is normally not a big concern as
the linker setup arranges any program space constants
declared
using the macros from this header file so they
are placed right after
the interrupt vectors, and in front
of any executable code. However,
it can become a
problem if there are too many of these constants, or
for
bootloaders on devices with more than 64 KB of ROM.
<em>All these functions will not work in that
situation.</em>
Does that really
mean that I can't use Boot loader in Atmega1280 ?
How can I access to
string in flash ?
If someone can help.
Thanks for
answers.
Yannick PODGORSKI.
Kuantic.