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

write_program_memory compiles to... nothing?

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







write_program_memory compiles to... nothing?
PostPosted: Thu Nov 02, 2006 5:08 pm     Reply with quote

While fighting to figure out while my write_program_memory wasn't working, I took a look at the listing, and low and behold, it doesn't appear to be compiling to anything! Check it out below...

Am I missing something obvious? This is a 18F4620 and 3.212 of the compiler.

Code:

C328:  MOVWF  xDD
C32A:  MOVLB  0
C32C:  CALL   B34A
....................
....................       write_program_memory(0x0200, data, 8);
....................
....................       packet[UDP_data+2] = 'A'; //change NRR to NRA!
C330:  MOVLW  41
C332:  MOVWF  49
....................       read_program_memory(memaddr, packet+47, 64);
C334:  MOVFF  1CA,FF8
C338:  MOVFF  1C9,FF7
C33C:  MOVFF  1C8,FF6
C340:  CLRF   FEA
C342:  MOVLW  4C
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 02, 2006 5:22 pm     Reply with quote

Here are two possibilities:

1. Maybe they didn't add support for it until vs. 3.215. See the
version history below.
Quote:

3.213 Updates for the newest chips
3.213 An internal error with some shift operations involving int32's is fixed
3.214 An underserved syntax error in #IF is fixed
3.214 A bug in set_tris_x() in PIC18 in fast_io mode is fixed
3.214 Some problem with the header files for new chips are fixed
3.214 A PIC18 optimization bug is fixed
3.215 A problem with %u during printf redirection is fixed
3.215 The SSP pins are corrected for non-standard chips
3.215 PCW now recognizes MPLAB 7.0
3.215 Flash programming algorithms updated for the newest chips, see readme.txt
3.215 New function WRITE_CONFIGURATION_MEMORY has been added
3.215 Some baud rate issues with parts that have a EUART are fixed
3.215 #USE I2C now allows the speed to be set in BPS using FAST=xxxxxxx


2. It's possible that support for writing to Flash memory is not
enabled in the Device data. I don't have PCWH, so I can't check
this for you. (I only have the command line compilers).
But if if you have PCWH, edit the 18F4620 data, and look for some
setting that allows writing to Flash memory. See if it's enabled.
http://www.ccsinfo.com/images/content/device_editor.gif
mrsmith
Guest







Weird
PostPosted: Thu Nov 02, 2006 6:56 pm     Reply with quote

Kinda weird, since write_program_eeprom does seem to work fine...
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 02, 2006 7:12 pm     Reply with quote

Here's a thread from 2 years ago which discusses the problem.
http://www.ccsinfo.com/forum/viewtopic.php?t=21112
mrsmith
Guest







Ahh...
PostPosted: Thu Nov 02, 2006 8:57 pm     Reply with quote

Thanks. I actually did a search before I posted, but I didn't see that thread. Just changed it to write_program_eeprom and everything is fine...
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