This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Program size problem

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

Parents
  • 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?

Reply
  • 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?

Children