ROM Memory constants starting with ?ICS_ - what are they?

mikroC, mikroBasic and mikroPascal PRO for Microchip’s 8-bit PIC MCUs.
Post Reply
Author
Message
tysseng
Posts: 89
Joined: 12 Dec 2005 21:01
Location: Oslo, Norway

ROM Memory constants starting with ?ICS_ - what are they?

#1 Post by tysseng » 04 Jul 2018 20:40

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?
Joakim Tysseng

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: ROM Memory constants starting with ?ICS_ - what are they

#2 Post by filip » 06 Jul 2018 13:21

Hi,

I will consult our developers and let you know.

Regards,
Filip.

tysseng
Posts: 89
Joined: 12 Dec 2005 21:01
Location: Oslo, Norway

Re: ROM Memory constants starting with ?ICS_ - what are they

#3 Post by tysseng » 06 Jul 2018 21:34

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:

Code: Select all

char hexBytePartCounter = 0;
If I change this to

Code: Select all

char hexBytePartCounter;

void main() {
  hexBytePartCounter = 0;
  ...
}
it disappears from the list. Perhaps it is the address of the initialization value?
Joakim Tysseng

tysseng
Posts: 89
Joined: 12 Dec 2005 21:01
Location: Oslo, Norway

Re: ROM Memory constants starting with ?ICS_ - what are they

#4 Post by tysseng » 06 Jul 2018 21:42

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).
Joakim Tysseng

Post Reply

Return to “PIC PRO Compilers”