CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

No code produced for 'write_program_memory' for PIC18F4620.

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
brianj



Joined: 06 Oct 2003
Posts: 6
Location: Liverpool, UK

View user's profile Send private message

No code produced for 'write_program_memory' for PIC18F4620.
PostPosted: Sun Nov 28, 2004 8:30 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Nov 28, 2004 9:40 am     Reply with quote

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








PostPosted: Sun Nov 28, 2004 9:49 am     Reply with quote

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







PostPosted: Sun Nov 28, 2004 10:33 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Sun Nov 28, 2004 10:34 am     Reply with quote

It doesn't appear to work for me either, however, write_program_eeprom() works just fine or at least generates some code Very Happy
Tom-H-PIC



Joined: 08 Sep 2003
Posts: 105
Location: New Castle, DE

View user's profile Send private message

I’ve been working with CCS on the 18F2620 and the 18F4620
PostPosted: Sun Nov 28, 2004 10:42 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Dec 01, 2004 11:49 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Dec 08, 2004 2:20 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group