Help understanding Pic24F Hex file format for an over the air bootloader
Greetings from St Louis Missouri
I'm working with a pic 24FJ64GA004 and the boot loader app AN1157. I have a beta boot loader that works very well with a serial port connected to PC running the microchip P24QP.exe Visual Basic Pic 24 programmer. The problem is it doesn't work over the air yet. Attached to this message is a zip file which contains a hex: Pic24F.hex and a boot loader log file. I need to replace the P24QP.exe Visual Basic program with my own C++ class that can open up the attached hex file and then create the exact same data you see in the attached log file. The boot loader log file first entry shows life begins at address 0C00
WritePM Len=1 Addr=0C00 Row=256
WL 0C00:0000 0000
WL 0C02:0004 7F62
WL 0C04:0000 0000
WL 0C06:0004 7F62
The hex file does not have an interrupt vector table. (MPLAB-X project properties, XC16 linker options, NO Interrupt vector table is check on. The Linker script for this hex file is set with a AIV at 0C00 I need to emulate how the Pic24 Visual basic program processes the attached hex file. The first thing it transmits is the above
WL 0C00:0000 0000
Where in this attached hex file, what line does this occur ?
I read old threads from this forum about the hex file format - One suggest looking at the Intel document Hexadecimal Object File Format Specification, Rev A januar 1988 with the name intelhex.pdf
I looked it over and the Micro chip hex file doesn't seem to conform to that exactly, or does it ?
Is this ancient (1988) document really the best explanation of the attached Pic24 hex file ?
My target has an integrated EM250 Zigbee co-processor connected as a UART. This EM250 has a network stack frame which will emulate a comport. Ultimately my app hex files need to be send over the air by PC based windows application written in C++ that has a TCP network api and stack frame. All I am missed is a C++ code can emulate Visual Basic Pic 24 programmer and serialize the actual data. For security purposes all of the code for the entire project needs to be in C/C++. I want help learning how to read and process a hex file for my boot loader.
My target has a 2nd serial port just for debugging. My target has printf mapped to a dedicated UART TX output going to a PC running a terminal program which captures the data. This is particular Pic24 F chip has latches which buffer an entire PAGE of flash program memory before the actual write commit function. I have modified the microchip boot loader example C function: void WritePM(...) to echo back a hex dump.
This attached hex file (Pic24F.hex) is from a working Pic24 bootloader app. It is not not supposed to have anything below the address 0C00. Life starts there for my app.
Are there any utility programs that will display a hex file in a better? Or is this similar then that ?
Maybe somebody with experience will read this and can reconcile the attached hex file into the first 10 lines in the log file.
Monkey see monkey do. If you can reconcile just 1% of this hex file for me, separate the sections like this
:10 1800 0000 000 000627f0400 00 00 0000627f04000e
( I just made up those spaces just to emphasize all I need is for someone to actually for real break down the entire line with spaces for each step this monkey can write the C++ class to do it automatically. If you have suggestions of abstract functions a C++ class should have I'd appreciate it.
My server side Windows application is written in C++ builder. It has a network stack frame and API that will accept serialize data and can transmit it to the target mac address. The target zigbee firmware I developed will reassemble the data and present it to the Pic24 as a UART running at 115200 baud. All of that part is all done. All I need know is to learn how to process the hex file in C code for my target UC
If you have any suggestions, tips or links to things that will teach me how to open and process a hex file I would appreciate some suggestions.
St. Louis Missouri
post edited by binaryman - 2017/11/24 15:04:52