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 CCS Technical Support

Add Assembly Language Code Before CCS sets up C run time env

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



Joined: 24 Feb 2011
Posts: 1

View user's profile Send private message

Add Assembly Language Code Before CCS sets up C run time env
PostPosted: Thu Feb 24, 2011 1:37 pm     Reply with quote

I need to add code to enable the watchdog timer and set up low voltage detect that executes immediately just after the microcontroller is reset.

I cannot wait for CCS to setup the C run time environment, initialize the variables, etc, etc. Setting up the watchdog must come first. This is to eliminate an EMI compliance issue.

How do I accomplish this?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 24, 2011 1:54 pm     Reply with quote

Months ago, I emailed CCS with a request that they add a #build(noinit)
option to the compiler to leave off the start-up code. I haven't seen it
be added so I guess they blew off my suggestion.
temtronic



Joined: 01 Jul 2010
Posts: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Feb 24, 2011 1:59 pm     Reply with quote

Ok, I have to ask, what EMI issue? Is the PIC radiating it ? airborne or through connections ?
There is no 'C runtime environment'..watchdog timer is a fuse selection..

Airborne EMI fix...put in metal box..

Connections EMI fix...add ferrites and appropriate caps on the I/Os

Need more info, if you show us a very small code example it'd help.
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