Size of LDR file

Hi, 

I open the Test.ldr into a buffer LDR_PATH and the size of the buffer is 111312 which is correct with number of arrays in Test.ldr
unsigned char LDR_PATH[] = {
#include "C:/Test.ldr"
};

Then I define the size of Read_BUFF to be the same as previous buffer (LDR_PATH). But it takes just 45775 buffer. 
unsigned char Read_BUFF[sizeof(LDR_PATH)] = {0};

What is wrong?

Parents
  • 0
    •  Analog Employees 
    on Sep 30, 2019 1:01 PM

    How are you checking the sizes of these buffers? I wonder if you are looking at the ".ldr" file size and in that case please be aware that the Read_BUFF array will be a single zero-byte FILL block whereas the LDR_PATH will require block payloads for the initialized data (presuming it is mostly non-zero).

    Regards,
    Stuart.

Reply
  • 0
    •  Analog Employees 
    on Sep 30, 2019 1:01 PM

    How are you checking the sizes of these buffers? I wonder if you are looking at the ".ldr" file size and in that case please be aware that the Read_BUFF array will be a single zero-byte FILL block whereas the LDR_PATH will require block payloads for the initialized data (presuming it is mostly non-zero).

    Regards,
    Stuart.

Children