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

Why is my binary larger than is should be?

Hi. I want to save special data at the first address of the last sector, i.e. at address 0x10007000.

I do it like this

const unsigned char CANNodeAddress__attribute__((section(".ARM.__at_0x00007000"))) = (unsigned char)CAN_ADDR_ANTx;

My map file shows that CANNodeAddress is the last symbol in the memory map.

0x000039c4   0x00000020   Data   RO         1058    Region$$Table       anon$$obj.o
0x000039e4   0x0000361c   PAD
0x00007000   0x00000001   Data   RO           57    .ARM.__at_0x00007000  main.o

The question is, why does my binary file created with fromelf utility contains 123 bytes after the CANNodeAddress position. The binary file ends with 0xAAAAAAAA and not my CANNodeAddress variable.

This creates a problem because I cannot put my data at the end of the last sector because linker complains there is not enough space in ROM.

Thanks.

Parents
  • Is it placing static initialization tables, and data there for the "Load Region"?

    You'll probably want to rethink how you do things, and how to create scatter files to control the placement of data/structures beyond the extent of the primary load region.

    I went over this the other week about how to place checksums/calibration data at the far end of the rom, or tail of the image.

    If you just want to substitute variables, consider some "static const" type structure with a signature you can detect with a simple post link processing step.

Reply
  • Is it placing static initialization tables, and data there for the "Load Region"?

    You'll probably want to rethink how you do things, and how to create scatter files to control the placement of data/structures beyond the extent of the primary load region.

    I went over this the other week about how to place checksums/calibration data at the far end of the rom, or tail of the image.

    If you just want to substitute variables, consider some "static const" type structure with a signature you can detect with a simple post link processing step.

Children
No data