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

problems with non-debug executable

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



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

problems with non-debug executable
PostPosted: Mon Jul 18, 2005 10:37 pm     Reply with quote

Colleagues,

I have problems building the firmware, which runs without debugger. The hex file does download, but it doesn't run, when I remove the debugger and cycle the power on the box. Here's my h-file. What am I doing wrong?

Code:

// version 0.3

#include <18F6720.h>
//#device ICD=TRUE
#device adc=10
#use delay(clock=11000000)

// debug fuses
// #fuses NOWDT,WDT128,HS, NOPROTECT, NOOSCSEN, BROWNOUT, BORV25, NOPUT, NOCPD, STVREN, DEBUG, NOLVP, NOWRT, NOCPB, NOEBTRB, NOEBTR, NOWRTD, NOWRTC, NOWRTB

// release fuses
#fuses NOWDT,WDT128,HS, NOPROTECT, NOOSCSEN, BROWNOUT, BORV25, NOPUT, NOCPD, STVREN, NODEBUG, NOLVP, NOWRT, NOCPB, NOEBTRB, NOEBTR, NOWRTD, NOWRTC, NOWRTB

//#use rs232(baud=19200,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8, errors)

// CCS supports multiple RS232 streams, and it comes handy during debugging.
// e.g. fprintf(debug_stream, "0x%2X\n\r", read_iso_buttons());
#use rs232(baud=19200,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,errors,stream=rs232_stream)
#use rs232(DEBUGGER, stream=debug_stream)

#use i2c(Master,Slow,sda=PIN_C4,scl=PIN_C3)


Thanks,
Nick
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jul 18, 2005 11:01 pm     Reply with quote

What programmer and what programming software are you using ?
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Mon Jul 18, 2005 11:27 pm     Reply with quote

I'm using:

ICD-U40 w/ firmware v01.30
ICD control program v2.12
CCS compiler v3.209
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jul 18, 2005 11:42 pm     Reply with quote

But what are you using as an IDE to run the compiler ?
PCW or PCWH ?
or MPLAB 7.20 ?
or the PICC icon ?
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Tue Jul 19, 2005 12:01 am     Reply with quote

I'm using PCWH for IDE.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jul 19, 2005 12:34 am     Reply with quote

I don't have that IDE so I can only be of limited help, but the line
below is intended for use with the CCS debugger. It creates a
software UART to transmit serial data on pin B3. If you're not
using the debugger, it should probably be commented out.
Code:
#use rs232(DEBUGGER, stream=debug_stream)
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Tue Jul 19, 2005 11:16 am     Reply with quote

PCM programmer wrote:
...If you're not
using the debugger, it should probably be commented out.
Code:
#use rs232(DEBUGGER, stream=debug_stream)


Thank you! After I have masked this line with #ifdef, the code began to work standalone.
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