[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Padding problem with "progmem"
From: |
Christoph Plattner |
Subject: |
[avr-gcc-list] Padding problem with "progmem" |
Date: |
Sun, 05 Aug 2001 13:03:58 +0200 |
Hello AVR-GCC hackers !
I recognized the problem, that if a string, defined with
__attribite__ ((progmem)) or PSTR from the lib, has an odd length
(including \0 termination character), the linker has problems
to locate the code. Result are error messages like:
../os/OBJS.arch-avrmegaX03/rtx-os.R: In function `avr_serial_ioctl':
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x239c): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R: In function `avr_serial_init':
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x23f2): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x23fa): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x243e): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x244e): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R: In function `process_icmp':
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x2568): internal error: out
of range error
../os/OBJS.arch-avrmegaX03/rtx-os.R: In function `icmp_reply':
../os/OBJS.arch-avrmegaX03/rtx-os.R(.text+0x265e): internal error: out
of range error
Error in near all functions.
If the string has an even length, everything works ok.
I now the reason (16bit code access, single characters of 8
bit). But is it not possible to include a padding here, to
start and stop every string on an even address, although we
loose perhaps some bytes, if often single charaters are used.
Is there a workaround for that problen, like a
__asm__ __volatile__ (".align 2");
???
Please help here
Christoph P.
--
-------------------------------------------------------
private: address@hidden
company: address@hidden
- [avr-gcc-list] Padding problem with "progmem",
Christoph Plattner <=