• AVR Freaks

Helpful ReplyHot![SOLVED]Loaded Hex file not match

Author
dpsqps
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2019/11/25 17:45:05
  • Location: 0
  • Status: offline
2020/04/08 00:33:26 (permalink)
0

[SOLVED]Loaded Hex file not match

Hi, I was trying to program board with IPE v 5.35 but it didn't go well..
If anyone can lead me to the right direction, many thanks!
 
I'm using PicKit3 and project built by MPLAB v8.92.
Target programming chip is PIC32MX798F512L
 
Here is what happend,
I programmed a board with IPE by loading hex file, it says program succeed.
verify ok, not blank.
However, board doesn't work properly(not even booted).
Project should blink Led on start, but it didn't.
So, I looked the memory tab from IPE after browse hex file,
and it didn't match with the actual hex file.
 
Actual file start
:020000040000fa
:020000041fc01b
:10000000c0bf1a3c10005a2708004003000000003f
:1000100000601a40c0045a7f050040130000000031
:10002000059d1a3c342b5a270800400300000000ad
:1000300002a01d3cf0ffbd2701a01c3c30809c2786

 
IPE loaded  boot memory
1FC0_0000 3C1ABFC0 275A0010 03400008 00000000
1FC0_0010 401A6000 7F5A04C0 13400005 00000000
1FC0_0020 3C1A9D05 275A2B34 03400008 00000000
1FC0_0030 3C1DA002 27BDFFF0 3C1CA001 279C8030

 
program memory
:020000041d00dd
:10000800f0ffbd270c00beaf21f0a0031000c4af65
:100018000000c0a30c00400b000000000000c293c9
:10002800010042240000c2a30000c3931000c28f45
:100038002b106200f9ff40140000000021e8c00303
:100048000c00be8f1000bd270800e0030000000070

 
IPE loaded program memory
1D00_0000 FFFFFFFF FFFFFFFF 27BDFFF0 AFBE000C
1D00_0010 03A0F021 AFC40010 A3C00000 0B40000C
1D00_0020 00000000 93C20000 24420001 A3C20000
1D00_0030 93C30000 8FC20010 0062102B 1440FFF9
1D00_0040 00000000 03C0E821 8FBE000C 27BD0010

 
While typing this, I realized that the program memory start from 1D00_0008.
does that matter? if so, can I fix it by change some configurations?
 
My question is, is it usually different to actual file to the memory map?
And what could be the failure of program?
 
Thanks to all who reply!
post edited by dpsqps - 2020/04/09 20:01:12
#1
dpsqps
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2019/11/25 17:45:05
  • Location: 0
  • Status: offline
Re: Loaded Hex file not match 2020/04/08 01:07:48 (permalink)
0
I realized that this memory map from IPE just switched LSB, MSB by 4 bytes..
So, that might not be the problem why board not working after program.
#2
ric
Super Member
  • Total Posts : 26942
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: Loaded Hex file not match 2020/04/08 04:51:04 (permalink) ☄ Helpfulby dpsqps 2020/04/09 19:53:37
0
Does the hex file contain the configuration bits?
Often in MPLAB8, the config bits were set manually in the programming software, rather than embedded in the sourc code.
(Although this was more common for 8 bit chips, I'm not so sure about the 32 bitters.)
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#3
dpsqps
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2019/11/25 17:45:05
  • Location: 0
  • Status: offline
Re: Loaded Hex file not match 2020/04/08 17:14:00 (permalink)
0
Thanks for the reply ric, and you are right!
There are no configuration bits in the hex file..
 
I tried to find on the build option to include them but I couldn't find one.
Is there anyway I can include them?
#4
XorLor
Starting Member
  • Total Posts : 49
  • Reward points : 0
  • Joined: 2009/10/23 00:17:05
  • Location: 0
  • Status: offline
Re: Loaded Hex file not match 2020/04/09 18:55:28 (permalink)
0
dpsqps
I programmed a board with IPE by loading hex file, it says program succeed.
verify ok, not blank.
However, board doesn't work properly(not even booted).

 
So, have you been able to verify the code works with the board (perhaps by programming it with MPLAB)? If so, you could export the working hex file from the board via the IPE. Then you can compare the hex files to help answer your questions. The  4 blank bytes at address 1D00_0000 doesn't seem right.
 
#5
dpsqps
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2019/11/25 17:45:05
  • Location: 0
  • Status: offline
Re: Loaded Hex file not match 2020/04/09 20:00:46 (permalink)
0
Thanks for the reply XorLor.
It seems not right that from address 1D00_0000 to 1D00_0008 is blank FFFFFFFF FFFFFFFF but it works...
I tried to read functioning board and still it's same there.
Like ric mentioned, configuration bits were missing at the hex file. So, I added it and it worked!
#6
Jump to:
© 2020 APG vNext Commercial Version 4.5