[PIC][C] Array in code memory (Flash ROM)

Status
Not open for further replies.

dondu

Newbie level 4
Joined
Jan 16, 2011
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,329
HI,

Assumptions of the project:

- PIC18F67K90 (128kB Flash, 4kB EEPROM),
- very small board (only this PIC on it)
- I can't use external EEPROM or other chips,
- I want record its performance (history) at periodic intervals (how often was used, how long, and many other parameters...),
- internal EEPROM is too small, and I want use it to store other informations.
- program memory will code protected without last block (where my data will be written by PIC)
- I'm using MPLAB IDE 8.63 with HI-TECH PIC18 PRO 9.65.

I want too use flash_wite() function which is part of Hi_TECH PIC18 9.65 compiler
It's described at manual and I found it at directory: ...\HI-TECH Software\PICC-18\PRO\9.65\sources\flashwrite.c

I want to use last block (whole 8kW) of flash memory from 0x1C000 (this block will not be code protected):



So, the question is: How to declare an array, exactly at address 0x1C000 ?
If not in C, maybe by assembler ?

At the end i want use C pointer to this array.
 

Try
const char my_array[sizeof array] @ 0x1c000;
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…