View previous topic :: View next topic |
Author |
Message |
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
bootloader hex2bin converstion of line type 4 |
Posted: Wed Dec 14, 2005 12:31 pm |
|
|
I am makeing a boot loader of types.
I am hiting a line type 4. extened LBA the address comes out to a
big 0x00300026 which is way biger than the 32K I can program.
AND
hex2bin is producing a big(padded with zeros) file.
Is someone one messing with the intel spec?
How should I interpret this line type 4? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Dec 14, 2005 1:25 pm |
|
|
Post the part of the HEX file that contains that line, and a few lines
before it. Also post your PIC type. |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Dec 14, 2005 2:02 pm |
|
|
18F452 @40MhZ pcwh 3.239
This is from the very end of the hex file.
ps: I used the #fill_rom 0xFFFF, note the FF's
Code: | 107F7000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF11
:107F8000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF01
:107F9000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1
:107FA000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE1
:107FB000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD1
:107FC000FFFFFFFFFFFFF2CF0EF0F29EF76AE00F18
:107FD000F66E7F0EF7220900F5500EBEF28E1200EB
:107FE000020103010100000CFFFFFFFFFFFFFFFF85
:107FF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF91
:020000040030CA
:0E0000000026020E000181000FC000E00F403C
:00000001FF
;PIC18F452
|
I can see where the compiler 0xFF filed the file to addr=0x7FFF which is my standard 32K progm space. Then comes the type 4 line and the next.
------hex2bin output-----------
C:\ccs\Projects\3200I\update_firmware>hex2bin t_172
HEX2BIN Version 1.06
Copyright (c) 1995 Programix Corp.
Portions copyright (c) 1993-1995 BITWARE.
All rights reserved.
Status: Creating binary file.
Status: Read linear address record of 0x00000000.
Status: Writing 16 bytes at address 0x00007FF0.
Status: Read linear address record of 0x00300000.
Status: Writing 14 bytes at address 0x00300000.
Status: HEX to BIN conversion was successful. |
|
|
Ttelmah Guest
|
|
Posted: Wed Dec 14, 2005 2:14 pm |
|
|
The configuration fuses are stored at address 0x300000.
Best Wishes |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Dec 14, 2005 2:21 pm |
|
|
Thanks. Figured that was it. ((from deductive reasoning))
I can't write_program_memory() for that line? can I.
Don't I need the high volt of ICSP to program them?
Last edited by treitmey on Wed Dec 14, 2005 2:27 pm; edited 1 time in total |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
Ttelmah Guest
|
|
Posted: Wed Dec 14, 2005 3:15 pm |
|
|
Ongoing, it is up to you what you do with them.
There is a 'write_configuration_memory' function. It is internally identical to the write_program_memory function, except the addresses it actually writes start at the required address. You can write these bits without high voltage programming, _but_ the bits in the 'code protection' area, can only be _cleared_ by a high voltage erase.
Generally, for many bootloaders, you would not want these bits to be changeable, so you just ignore data in this area.
Best Wishes |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Dec 14, 2005 3:33 pm |
|
|
Thanks so very, very much. |
|
|
|