[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AW: [avr-gcc-list] why the pointer get a error address?
From: |
Fabian Braun |
Subject: |
AW: [avr-gcc-list] why the pointer get a error address? |
Date: |
Sat, 14 Feb 2004 09:21:44 +0100 |
Hy whiteman
As far as I know: If you declare a constant value you also have
to define its value in the same line eg. (const char x = 5;).
I'm not very sure, could also be compiler dependent but I learned
that you never can assing a value to a const variable in the programme
like (charcter_pnt = test_array;).
Might be a fault :-)
/FaB
-----Ursprüngliche Nachricht-----
Von: address@hidden [mailto:address@hidden Im Auftrag von whiteman
Gesendet: Samstag, 14. Februar 2004 02:28
An: avr-gcc-list
Betreff: [avr-gcc-list] why the pointer get a error address?
hi,all!
I defined a array in program space and a pointer to this array.
eg:
uint8_t test_array[] PROGMEM = {
1,2,3,4,5,6,7
};
const prog_char *character_pnt;
void main(void)
{
charcter_pnt = test_array;
;
;
}
but when I simulated with avr_studio, I found the "character_pnt" get a error
address,The "*character_pnt" isn't equal to 1.why?
Regards
whiteman
address@hidden
2004-02-14
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list