2003-06-05 02:59 AM
2003-06-04 01:33 AM
Hello,
while compiling i often get this message: #error clnk Ex6a.lkf:1 bad address (0x100) for zero page symbol _leesADC$L This happens after i create more variables in my code. The error disapears after rewriting the code using less variables. Does anybody know what is going wrong. Thanks in advance!!! This is a part of my code: int leesADC2(int adc, int waarde) { PADR = 0x02; if (ValBit(PBDR,adc)) // after changing ''adc'' in ex. ''1'', the code works waarde--; PADR = 0x01; if (ValBit(PBDR,adc)) waarde++; return waarde; } [ This message was edited by: joble on 04-06-2003 15:31 ]2003-06-04 10:37 PM
It seems you try to put too many variables in your ram0 (zeropage from 80 to FF). Some are placed over this limit (from 100!), and the linker notes the problem.
--> Depending on your ST7, create a RAM section if possible (from 100) or use #define or EQU directives for constant, which do not use any space in memory.2003-06-05 02:59 AM
Hello,
I think you are probably using the small/compact/short memory models. You could consider changing your memory model to medium/long which simulate stack in long range and force some functions onto that stack using the @nostack directive. The section on memory models in the ''C Cross Compiler User's Guide for ST MicroElectronics ST7'' manual in ....Cosmic\ST7\docs\ will help you understand memory models better.