How to solve this problem and how did I got into this problem ?
I have used Silabs F930 and Silabs IDE for projects, and Linker gives me this error and it has to do something about the memory mapping and space. How to dig into the source of this problem ? Internet is full of instructions and examples but nothing is clear to me what is happening and how this can be solved. This happens now when code size had increased over a certain point. What kind of settings I should change or command options to solve the problem ? The error message comes in this form: xxxx.obj >> SEGMENT: ABSOLUTE OFFSET: 0023H
Program Size: data=20.0 xdata=0 code=2397 LINK/LOCATE RUN COMPLETE. 0 WARNING(S), 1 ERROR(S) Download cancelled.
Linker BL51.EXE and Compiler C51.EXE
Compiler options are: DB OE BR INCDIR(C:\SiLabs\MCU\Inc) LC ROM(Small) Linker options are: RS(256) PL(68) PW(78) CO(7000)
Thanks.
I'm aware of previous cases like this: www.keil.com/.../
" The improper fixup error occurs because his code is using more than 256 bytes of data. Overlaying data space reduces data space usage and corrects the bug."
What does the above mean in practise, 256 bytes of data !?!?
"Tells me that this is either an assembler routine or that it is the vector for an interrupt service routine (because the segment is ABSOLUTE). "
In my case it is Interrupt to UART0 which is causing this problem.
" The offset of 0023H tells me that the problem happens at the interrupt vector location. The only thing that would cause this problem there is an AJMP to an ISR that is too far away."
Why this would happen in the first place, why there is a jump distance limitation ?
"It you are using C, this problem should not occur."
I do not use assembler, I only use C.
-Thx
Oh, that previous forum post link is from year 2003 !
www.keil.com/.../
Still the problem seems to remain.
Firstly because the hardware has such a limitation in one of its addressing, and secondly because the OP back then in 2003 configured the compiler in such a way that this limitation would be imposed on C code, too.
If you're going to still use an 8051 derivative in this day and age, you should at least have read enough of the processor manual and the C51 documentation to be able to figure out those for yourself, though.
ROM(Small)
That option would appear somewhat problematic, given you're currently facing a problem where things are, apparently, too big.
Memory model had no difference whatsoever if it is placed small or large, same error appears anyway. So this is irrelevant.
That setting is not the memory model.