On 14. 11. 2012 17:13, Diego Herranz wrote:
First of all, I know this is a sdcc mailing list but since gputils developers are also involved in sdcc project and this mail is somehow related to sdcc, I thought this was the right place
In the code I attach (test.c):
If array1 size is an odd number of bytes (i.e. if NO_OF_STRINGS * STRING_LENGTH is an odd number) the first byte of array2 overlaps and this gplink error is shown:
error: multiple sections using address 0x1038
If array1 size is an even number of bytes, everything works ok.
The asm file (file.asm) seems to be fine so I guess it has something to do with even addresses alignment and gplink, but what is the precise explanation? Or is it a bug? It seems that starting the array at an odd address (0x1001) is not a problem though.
sdcc --use-non-free -mpic16 -p18f4550 test.c
gplink-0.14.3 #861 (Nov 14 2012)
sdcc 3.2.1 #8039 (Jul 13 2012) (Linux)
Keep these great projects going!
Thank you very much!