cancel
Showing results for 
Search instead for 
Did you mean: 

Emwin GUI_init() function causes the output binary a huge size

Vprabhu
Associate II

I am using emwin graphics library in our project , in which the GUI_INIT() function which initializes all the memoy and LCD causes the generated output binary to be huge size(3GB) , i have used MB for each LCD_LAYER0_FRAME_BUFFER and LCD_LAYER_FRAME_BUFFER which are mapped on external SDRAM.

The application works fine but the binary is too large where as hex is 1549KB, how do i resolve the binary size issue

4 REPLIES 4
AvaTar
Lead

The issue with binaries have been discussed several times here, just try the search function.

And basic understanding of the MCU address space and binary data vs. file formats containing meta data (HEX, S19), would be helpful.

Use Keil's FromELF tool, it splits multiple separate regions into different .BIN files.​

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

Look at the linker script and .MAP file to understand where the data is situated and where it came from.​

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Vprabhu
Associate II

Thanks all for the replies , the problem got resolved on making changes in linker script file by making different output section as (NOLOAD).

 /* The startup code goes first into FLASH */

 .isr_vector :

 {

  . = ALIGN(4);

  KEEP(*(.isr_vector)) /* Startup code */

  . = ALIGN(4);

 } >FLASH

 .SDRAMIMAGE(NOLOAD) :

 {

  . = ALIGN(4);

    *(.SDRAMIMAGE)

  . = ALIGN(4);

 } > SDRAMIMAGE  

 .SDRAMTERMINAL(NOLOAD) :

 {

  . = ALIGN(4);

    *(.SDRAMTERMINAL)

  . = ALIGN(4);

 } > SDRAMTERMINAL

  

 .SDRAMVAR(NOLOAD) :

 {

  . = ALIGN(4);   

   *(.SDRAMVAR);

   . = ALIGN(4);

 } > SDRAMVAR