cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate hex file in True Studio? not elf.

parth kothiya
Senior

size of elf file and hex file is different for same code hex file size is small so in true studio use elf file thats why i get error

FLASH' overflowed by 156416 bytes C/C++ Problem

if both file generate then also gives same error so only HEX file not ELF.0690X000006D1VgQAK.bmp

0690X000006D1VWQA0.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

Your problem is, that program + constant data are bigger than the FLASH in your mcu. This has nothing to do with the size of .elf - besides the resulting binary which goes into FLASH, .elf contains also debug information (and that often is much bigger than the binary). Chose an STM32 model with bigger FLASH, or rethink what needs to go to your program. Looking at the .map file might help to spot what is the biggest part consuming FLASH.

JW

View solution in original post

1 REPLY 1

Your problem is, that program + constant data are bigger than the FLASH in your mcu. This has nothing to do with the size of .elf - besides the resulting binary which goes into FLASH, .elf contains also debug information (and that often is much bigger than the binary). Chose an STM32 model with bigger FLASH, or rethink what needs to go to your program. Looking at the .map file might help to spot what is the biggest part consuming FLASH.

JW