[En-Nut-Discussion] 2561with more than 128k code and Winavr
PragmaLab (Rob van Lieshout)
info at pragmalab.nl
Sun Mar 4 10:47:14 CET 2012
>have you documented the problems?
>We also have an interest in our application to upgrade the ATMEGA256
>Can you give us some hints?
The problem was the compiler: GCC didn't support the 3-byte program-counter
the first year after the Mega256 was introduced. That's why we decided to
switch to ICC (Imagecraft) since they claimed support for > 128K code.
Wrong. They only claimed advertisement headlines: the first version only had
an include file for the mega256 but no support for the long (3-bytes) jumps
at all. Together with Richard (Imagecraft) we debugged for a long year their
attempt to fully support the Mega256. To find out one frustrating year later
that finally GCC came out with a new version that did the job perfectly....
I saw some posts in other groups stating that the 'constant data should be
linked beyond the > 128K", others stating that it should be in the lower
128K part. My experience is that GCC is perfectly able to access both
program code as well as constant data at any address you like. It uses some
kind of trampoline mechanism to brake the 128K barrier. If you examine the
.map files, you can figure out how they do it.
I offered Joerg to send our Makefiles to him to help him sort out his
Mega256 problems. Got no reaction from him so I reckon his problems are
solved as well.
More information about the En-Nut-Discussion