avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-chat] order of modules to linker


From: georg chambert
Subject: [avr-chat] order of modules to linker
Date: Sat, 6 Jan 2018 15:21:20 +0100

Hi,
I have an issue, which i have "solved" in that it now works, but Im curious why.
 
I linked a load module where I had a library of my own (.a) and a number of
object modules.
 
I used external in the file containing main, however outside main, to get the linker to include
two ISRs that were located in the .a and one of the .o files
 
I also used directives for the Atmega8 to use internal EEPROM, EEMEM directive for declaration, and
the other constructs needed for accessing the EEPROM.
 
NOW: first time I linked my .a file was last in the list of modules;  the resulting load module didnt work.
 
I checked out the .lst usinng listing option for the .elf file; and saw a strange ting, on the position of the vector for
vector_11, there instead was written some strange address (very high) and some eeprom-information......
(vector_11 is in the m8 the address for the UART RX interrupt, which I use, and the ISR is loceted in the .a file)
 
Now I got some back-of-the-head hunch, so I re-arranged so that the .a was first in the link-list, and sure enough
the vector_11 was now a fine address to the ISR, and the load-module work (what I can see so far)
 
WHAT WAS THAT, is my question (I usuallly want to understand whats happening, otherwise things tend
to come back in some other shape and bite u)
 
/georg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]