Hex file size got exceeded than the total Flash size

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, I am using atmega328pb. And I have written the code on Atmel Studio 7

My application's hex file size is 28 KB

And I am using bootloader to update the code serially and its Hex file size is 5 KB.

So, total 33 is KB.

 

But the total flash size of ATMEGA328pb is 32 KB.

 

But the good thing is that the overall application is working fine.

So, how is that possible?

Is my bootloader and application code is overlapping?

Will it give me any trouble in long run?

Last Edited: Tue. Oct 15, 2019 - 02:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The hex file is at least twice the size of the code it represents. So, you do not yet have a worry.

 

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


From the wiki Intel Hex format shows:

 

 

each byte of data is made up of two ascii characters plus the over head of the address and checksum,

as West Coast Jim said, your application size is less then half the hex file size.

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you so much for the answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My application's hex file size is 28 KB

That's rather huge (in many cases)...what did you write that takes up so much code space? I'm suspicious.  Does it have a lot of text? 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!