View previous topic :: View next topic |
Author |
Message |
cfernandez
Joined: 18 Oct 2003 Posts: 145
|
Program Fill in Flash |
Posted: Tue Sep 12, 2006 4:33 pm |
|
|
Hi,
I need to calculate a CRC of my .hex and this are in two steps:
1) I take the .hex and analize the address of code and calculate the CRC
2) I have a routine into my application that make the calculate of CRC and compare with the CRC calculate for the windows program.
The problem is that the .hex have address without use and I dont know the right value in flash memory (I use a bootloader). I see that the compiler have #fill_rom and I think that this complete this address with the value, but this is not.
Exist any way in the compiler for that not make address without code? or which is the best way for this problem.
I hope that my explication is clare.
Thank you very much!
Best Regards, |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Sep 12, 2006 5:50 pm |
|
|
I'm not sure what your question is.
Is there a problem with the #fill_rom command ?
If so, please explain the problem, and also post your compiler version. |
|
|
cfernandez
Joined: 18 Oct 2003 Posts: 145
|
|
Posted: Tue Sep 12, 2006 7:49 pm |
|
|
I am not talk english very well and by this is a little difficult explain me.
The problem is very simple, when compile the program, the compile not use some address of flash memory. Then is difficult to me calculate the CRC from start address of my program to end address of my program. I need check into my program the CRC of flash memory for know if the program is changed. For this I calculate the CRC from .hex with a windows program and then send to my program (into the PIC) the CRC, then a routine into my program calculate the CRC of start:end address of my program and compare this CRC with the CRC from windows program.
I am use a bootloader for load the program into my PIC, and the address that the compiler not use not know the value.
You understand me, sorry by my english.
Thank you very much!!
Best Regards, |
|
|
cfernandez
Joined: 18 Oct 2003 Posts: 145
|
|
Posted: Wed Sep 13, 2006 6:14 am |
|
|
I solve my problem with the #fill_rom instruction.
Thank you very much! |
|
|
|