Hi there, I'm having problem with the size of my binary code. My program uses cosine, arc tangent and square root. My kit only has a memory of 8k. I'm not including the math.h file. Instead, I coded the functions in the program itself. When I compile using model-large the program compiles but the size is bigger than 8k. When I try to compile with model-small appears an error message. I appreciate any help. Nei
appears an error message if the error message is ... the answer is .... if the error message is ... the answer is .... if the error message is ... the answer is .... if the error message is ... the answer is .... if the error message is ... the answer is .... if the error message is ... the answer is .... get my drift ? Erik
"When I compile using model-large the program compiles but the size is bigger than 8k." How much bigger? What optimisation setting are you using?
Sorry, The error message I get is removing robo20053.rel ?ASxxxx-Error-<a> in line 2572 of robo20053.asm <a> machine specific addressing or addressing mode error When I compile with model-large a binary that had 6K turns to have 9K. I'm using the command line that came with the compiler: "$NAME $EXT --vc --use-stdout --model-small --stack-loc 0xD0" so I dont't know what optimization set it's using. My kit has a RAM size of 256 bytes and the compiler shows me this report when I use model-large: Direct Internal RAM: Name Start End Size Max ---------------- -------- -------- -------- -------- REG_BANK_0 0x00 0x07 8 8 REG_BANK_1 0x08 0 8 REG_BANK_2 0x10 0 8 REG_BANK_3 0x18 0 8 BSEG_BYTES 0x20 0 16 DATA 0x08 0x1a 19 128 ---------------- -------- -------- -------- -------- TOTAL: 0x00 0x1a 27 128 Stack starts at: 0xd0 (sp set to 0xcf) with 48 bytes available Other memory: Name Start End Size Max ---------------- -------- -------- -------- -------- INDIRECT RAM 0x80 0 128 EXTERNAL RAM 0x0000 0x0104 261 65536 ROM/EPROM/FLASH 0x0000 0x264c 9805 65536 Is that correct?
"$NAME $EXT --vc --use-stdout --model-small --stack-loc 0xD0" That's not a Keil C51 command line! What compiler are you using? Note that this forum is specifically for Keil products: http://www.keil.com/forum/
Sorry, I'm using SDCC, I couldn't get Keil. Thanks.
"I'm using SDCC" The SDCC homepage lists sources of support for SDCC - including mailing lists and a User Forum: http://sdcc.sourceforge.net/