View previous topic :: View next topic |
Author |
Message |
brianj
Joined: 06 Oct 2003 Posts: 6 Location: Liverpool, UK
|
No code produced for 'write_program_memory' for PIC18F4620. |
Posted: Sun Nov 28, 2004 8:30 am |
|
|
I'm porting a working application from an 18F452 to an 18F4620. On looking at the .lst file, no code has been produced for 'write_program_memory' - the compiler has just ignored it! There's no code protection set, so it isn't being clever and optimizing it out. Any ideas please?
Brian |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Sun Nov 28, 2004 9:40 am |
|
|
Which compiler version are you using?
From the CCS list of Software Changes:
Quote: | 3.208 WRITE_PROGRAM_MEMORY was broke on some parts and is now fixed |
|
|
|
Guest
|
|
Posted: Sun Nov 28, 2004 9:49 am |
|
|
Sorry, forgot to mention the compiler. It's 3.212 and I have all versions back to 3.208, so I'll see if it works in one of those.
Thanks.
Brian |
|
|
Ttelmah Guest
|
|
Posted: Sun Nov 28, 2004 10:33 am |
|
|
Check that 'nolist' is not turned off in the include file for the older chip, and on on the newer one.
Best Wishes |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sun Nov 28, 2004 10:34 am |
|
|
It doesn't appear to work for me either, however, write_program_eeprom() works just fine or at least generates some code |
|
|
Tom-H-PIC
Joined: 08 Sep 2003 Posts: 105 Location: New Castle, DE
|
I’ve been working with CCS on the 18F2620 and the 18F4620 |
Posted: Sun Nov 28, 2004 10:42 am |
|
|
First to use the ICD you need firmware 1.30 this is beta. I have been told that it will be in the next release of the compiler. I'm using compiler 3.212.
Two per-processor directives that I have not been able to use at this time is because compiler has trouble generating code for the 18Fx620 chips.
#ZERO_RAM // This sends the compiler to never never land output code is junk.
#device WRITE_EEPROM=ASYNC // This keeps write EEPROM from working at all.
Ok the good news is that I'm not having an issue with using
write_program_eeprom(0x200000,Rom_Total);
As you can see this address is not in the program memory proper, this is the user ID location.
The long and short of it is that write program eeprom is working for locations 0x200000 to 0x200007.
I don’t know if any of this information is helpful at all but I though I would pass on what I know about the working with the 18Fx620 chips.
Tom |
|
|
brianj
Joined: 06 Oct 2003 Posts: 6 Location: Liverpool, UK
|
|
Posted: Wed Dec 01, 2004 11:49 am |
|
|
Thanks for all the suggestions. I can't get it to produce code with any of the recent versions I've tried. I've just had to write it in assembler, which is annoying. I can understand bugs in functions - but missing out a whole function altogether?
Brian |
|
|
RossJ
Joined: 25 Aug 2004 Posts: 66
|
|
Posted: Wed Dec 08, 2004 2:20 am |
|
|
I get some code generated (just no where near enough)...
Code: | .................... write_program_memory(addr, &rx_buffer[8], rx_msg_length - 8);
053C: MOVLW 08
053E: SUBWF x92,W
0540: MOVWF x9D
|
The workaround I used is...
Code: | for (i = 0; i < rx_msg_length - 8; i += 2)
write_program_eeprom(addr + i, *((int16*) &rx_buffer[8 + i]));
|
Does anyone know if this bug has been reported to CCS? Is there any way to find out short of putting together a sample program etc. and submitting it to CCS support (which takes time and effort -- which is wasted if they already know)? I am surprised that this bug could have existed for so long.
I am using PCWH 3.214 and a PIC18F2620. |
|
|
|