HEX size Problem

General discussion on mikroC for dsPIC30/33 and PIC24.
Post Reply
Author
Message
SSBISHT
Posts: 12
Joined: 11 Aug 2011 13:49

HEX size Problem

#1 Post by SSBISHT » 14 Jan 2013 15:22

Hi Mikroelectronika Team,

I am using mikroC PRO for dsPIC30/33 and pic24 ver 5.8.1, my program is complied successfully and working fine.

But my problem is the generated hex file size is 387KB whereas I am using PIC24FJ256GA110 (PROGRAM MEMMORY SIZE 256K Bytes)
how this file has been fitted into this program memory. I am sure generated file is smaller than 256KB but why it is showing 387KB in project folder.

Another confusion after compilation massage says

Used ROM (bytes): 70106 (40%) Free ROM (bytes): 104990 (60%)

If we add 70106 + 104990 = 175096 but should be 262144 (256KB).

Best regards

Sunny

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: HEX size Problem

#2 Post by Dany » 14 Jan 2013 15:43

The size of the hex file is at least the double of the size of the actual code. The hex file is a textfile: every byte is shown a 2 characters in addition to the addresses, checksums etc. that are also present in the hexfile.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

SSBISHT
Posts: 12
Joined: 11 Aug 2011 13:49

Re: HEX size Problem

#3 Post by SSBISHT » 14 Jan 2013 16:41

Hi Dany,

Thanks for prompt response, could you please explain me about
this massage generated by compiler.

Used ROM (bytes): 70106 (40%) Free ROM (bytes): 104990 (60%)

If we add 70106 + 104990 = 175096 but should be 262144 (256KB).

Best regards

Sunny

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: HEX size Problem

#4 Post by Dany » 14 Jan 2013 18:18

SSBISHT wrote:Hi Dany,

Thanks for prompt response, could you please explain me about
this massage generated by compiler.

Used ROM (bytes): 70106 (40%) Free ROM (bytes): 104990 (60%)

If we add 70106 + 104990 = 175096 but should be 262144 (256KB).

Best regards

Sunny
Yes.
The reason for this is that the unit used is not "bytes" but something else (approx 1.5 bytes), so if you multiply the figures with 1.5 you will get the right numbers in bytes.
For more elaboration see http://www.mikroe.com/forum/viewtopic.php?f=107&t=33036.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

SSBISHT
Posts: 12
Joined: 11 Aug 2011 13:49

Re: HEX size Problem

#5 Post by SSBISHT » 15 Jan 2013 00:10

Hi Dany,

Greatttttttttttttttt Thanks for helping

Best regards

Sunny

Post Reply

Return to “mikroC for dsPIC30/33 and PIC24 General”