On Wed, 2010-10-13 at 16:24 +0100, Alan Hourihane wrote: > Hi, > > I wonder if someone can help. > > I'm using a PIC18F242 / PIC18F2420 and sdcc 2.9.0 and currently using > this code to pop things into EEPROM storage. > > __code unsigned char __at( 0xf00000 ) > values[] = { > 0x00, 0x01, > 0x02, 0x03, > 0x04, 0x05, > }; > > Unfortunately, when I use the EEPROM read commands for index 0, I get > 0x00, for index 1, I get 0x02, and index 2, I get 0x04. > > I've read articles that say the EEPROM needs to be padded to 16bits for > the above PICs, and was hoping that I could declare with __eeprom > instead of __code and sdcc would fix this up for me but it seems that > __eeprom isn't done for PIC16. I don't want to have to declare as a > 'short' as then it impacts the code itself to cater for /2 situations. > > Any help much appreciated ?
Anyone got any clues ? Thanks, Alan. ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user