Hi!
I am trying to convert one of the bootloaders found on LibStock to receive Midi. I have managed to receive midi and overwrite flash memory, but even if I replace the program vector and interrupt vectors with the original ones, my program crashes after writing the first 64byte block (PIC18F25K50).
I have made sure that all bootloader functions stay way out of the flash memory I write to by postfix'ing them with org XXXXXXXX (confirmed by looking at statistics), but I still get code at addresses 00018 to 00045.
Looking at other statistics, I noticed that in ROM Memory Constants, some of these addresses are used, by constants named ?ICS_xxxxxx, where xxxxxx is the name of a VARIABLE in my code, not a constant. What are these doing, and can I move them somehow?
ROM Memory constants starting with ?ICS_ - what are they?
ROM Memory constants starting with ?ICS_ - what are they?
Joakim Tysseng
Re: ROM Memory constants starting with ?ICS_ - what are they
Hi,
I will consult our developers and let you know.
Regards,
Filip.
I will consult our developers and let you know.
Regards,
Filip.
Re: ROM Memory constants starting with ?ICS_ - what are they
I think I figured it out, or at least I found a pattern.
All rom memory constants prefixed with ?ICS_ match the names of global variables that are initialized in place. E.g:
If I change this to
it disappears from the list. Perhaps it is the address of the initialization value?
All rom memory constants prefixed with ?ICS_ match the names of global variables that are initialized in place. E.g:
Code: Select all
char hexBytePartCounter = 0;
Code: Select all
char hexBytePartCounter;
void main() {
hexBytePartCounter = 0;
...
}
Joakim Tysseng
Re: ROM Memory constants starting with ?ICS_ - what are they
Initializing all these in main removed almost all code in the 0x18 to 0x48 range. I am however still left with two bytes at 0x18 and 0x19: F3 D7
Any idea what they are? (also, 0x10 to 0x17 is filled with 00, but I guess that's not a problem).
Any idea what they are? (also, 0x10 to 0x17 is filled with 00, but I guess that's not a problem).
Joakim Tysseng