Skip to main content
parth kothiya
Associate III
January 10, 2019
Solved

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

  • January 10, 2019
  • 1 reply
  • 1194 views

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

This topic has been closed for replies.
Best answer by waclawek.jan

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

1 reply

waclawek.jan
Super User
January 10, 2019

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