Dear All,
I have a .lcf file with the following definition:
__SRAM_LOAD_SIZE = (SIZEOF(.flash_data)/4);
Then in a .s file I have the extern declaration:
.extern __SRAM_LOAD_SIZE # Defined in the linker file
The problem is that when I link using command line tools (Codewarrior for MPC55xx v2.3) I see the following error:
mwldeppc.exe: undefined: '__SRAM_LOAD_SIZE'
mwldeppc.exe: Referenced from '.init' in Test_d.lib
I would thank if someone could tell me how to do for the linker use the definitions included on the .lcf file
Thanks a lot and best regards,
ispd
Hello ispd,
Both lines (.lcf + .s files) seems to be ok.
I suspect you are linking with different .lcf file.
Could you double check your command line linker option -lcf fileneme to make sure you are using correct .lcf file which includes __SRAM_LOAD_SIZE definition.
Regards,
Stanish
Hello Stanish,
It is using it and no other. I have changed the name of the .lcf and then an error of linker file not found has appear. I have changed the name to another one (just in case another linker file with the same name is being used) and the problems remains.
I have used the option -r1 and It seems no errors but I am not sure if using this options means that maybe the .elf is not fully linked (although I see the .elf).
For testing that I would like to open the .elf with codewarrior but I am unable, I move the .elf file to the codewarrior window but a message telling me that Codewarrior does not understand that format appears. I have used also another .elf (codewarrior examples) and it seems it is also not possible. In the past I used Coldfire CW6 and I was able to drag and drop an .elf file with the mouse to the codewarrior IDE and the Codewarrior builded the project. I used that for debugging because I am more used to makefiles for compile/link. It is not possible to do that on MPC55xx v2.3 or I am forgetting something?
Thanks a lot and best regards,
ispd