Skip to main content
Topic: New data file loader (Read 14473 times) previous topic - next topic

Re: New data file loader

Reply #15
Ok, so ... i will try to make the verification errors bit more verbose.

your files are strange, both "read" are exactly the same (content wise). But the written is differs in one single bit  (0x80 != 0x00)

I have small program for comparing hex files using the "memory loader" i have written. So it loads both HEXes into memory and compares them. I think i will improve it and make it public ;)

Re: New data file loader

Reply #16
I've added the PIC device used in v4 for programming trial. However both me and Sebastian were not able to program it, you can see his report here. Any thoughts? Write seems OK, maybe I've made a mistake in the PIC device settings?

Re: New data file loader

Reply #17
Sorry for replaying soo late :-)

I have noticed that the HEX contains 0xff 0xff 0xff 0x00  for any empty page, that is kinda weird. Is the flash organized in 24-bit words separated by 8bits ?

Re: New data file loader

Reply #18
[quote author="robots"]Sorry for replaying soo late :-)

I have noticed that the HEX contains 0xff 0xff 0xff 0x00  for any empty page, that is kinda weird. Is the flash organized in 24-bit words separated by 8bits ?[/quote]
That one was from a 18F4550. I looked up from the datasheet: Word size is 16-bits. I'll do the same tests tomorrow. Maybe I've messed sth up during that time, not sure.

Good news is that I was able to program BPv4. Seems that Config bits were stored in bootloader and that was the problem. :)

Re: New data file loader

Reply #19
[quote author="robots"]Sorry for replaying soo late :-)

I have noticed that the HEX contains 0xff 0xff 0xff 0x00  for any empty page, that is kinda weird. Is the flash organized in 24-bit words separated by 8bits ?[/quote]

This is the way it is stored. Only the first 24 bits are used. It took me quite a while to figure this out when I wrote the bootloader updater v3->v4. It also gives funny translations between bytes, words, long words, programwords etc. :)

Re: New data file loader

Reply #20
This is probably the only thing i hate about pics - their funky byte organization

Re: New data file loader

Reply #21
[quote author="robots"]I have small program for comparing hex files using the "memory loader" i have written. So it loads both HEXes into memory and compares them. I think i will improve it and make it public ;)[/quote]

I have committed few changes into the svn. Some bug fixes in my memory code (not too severe) and I have also added the tool for comparing 2 files (either bin or hex). Manual to this tool is inside compare.c file. Have fun.