2019-06-12 04:11 AM
Is there any specific address location in generated binary file so we can know the size of that binary file?
Using this, in the firmware to read the size of binary file from that location and use it in our application.
Solved! Go to Solution.
2019-08-05 05:41 AM
@Community member
I am shocked that how the 3GB binary is generated?.
I suggest that please share your project to me so I can try to build it in my way then I will get back to with the result.
2019-08-05 05:48 AM
Hello @Community member
Thank you for your suggestion.
The project is confidential and I cannot share it,
I should minimize the project and send you but I will take time.
Can you please explain your way?
Yacob Hassidim.
2019-08-05 06:00 AM
@Community member
Can you please explain your way?
First send it to me then I will tried with 2 to 3 ways which I already suggest you after I will tell something to say.
Still it is very strange for me to 3GB binary.
2019-08-05 06:04 AM
.HEX files can be sparse, describing different memory regions, whereas .BIN must describe linear memory. If you have addresses that span 3GB the binary will be very large.
KEIL's tool will break into multiple binary sections.
You'd better understand what your linker script is generating.
2019-08-05 06:05 AM
Hello @Community member
After I will minimize the project, I will send you.
Thank you for your help and suggestions.
Yacob Hassidim.
2019-08-05 07:15 AM
@Community member
The binary file is so large because you've chosen wrong start address (probably 0).
The start address of the flash is 0x08000000 and from there you need to copy the binary data.
If you start from 0, the size of course will be huge.
For manipulations on binary data, Python is very good and easy. No other linuxy stuff is needed on Windows.
And on Linux or Mac Python is great too.
-- pa
2019-08-05 07:44 AM
2019-08-05 08:14 AM
You're describing SDRAM, and not storing the content you initialize there in FLASH.
You will need to make it a NOLOAD/NOINIT type section,
Or use the >EXTRAM_REGION AT> FLASH
along with the code in startup.s to copy the data after you have brought up the external memory interface.
/* Memories definition */
MEMORY
{
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K
EXTRAM_REGION (xrw) : ORIGIN = 0xD0000000, LENGTH = _Extram_Length /*CNT-32*/
}
2019-08-05 08:16 AM
Conservatively 0xD0000000-0x08000000 = 3,355,443,200
So you definitely have stuff being described in SDRAM that shouldn't be in the file at that location. When the device powers up the SDRAM will contain random junk, you need to unpack the content from FLASH.
2019-08-05 08:24 AM
Hello @Community member
Thank you for your answer.
Can you please advise how I define The EXTRAM_REGION as NOLOAD/NOINIT type section?
Can you please explain what is mean "AT > FLASH"?
Yacob Hassidim.