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

Functions previously on PIC called later

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



Joined: 07 Aug 2008
Posts: 17

View user's profile Send private message

Functions previously on PIC called later
PostPosted: Sat Jan 02, 2010 5:57 pm     Reply with quote

I would like to put a few functions in a block of the pic that I can later call from my main code that I will upload later.

As an example my bootloader has usb_write and usb_read
I also use these in my main code. I would prefer not to have my pic have two copies of this function and waste the space.

I want to be able to call my use_send in my bootloader from my mian code.

I am looking for tricks in CCS to make this happen. I am guessing I will have to have some ASM code to make this happen as I have seen very little positive results for calling a pointer to a function.

Re
SM
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sat Jan 02, 2010 6:15 pm     Reply with quote

I suppose you could write these routines and force them into some location inside your bootloader area.

see the #EXPORT feature.

Using them as included external linked functions (but hardwired into the bootloader's area) (and somehow including them in your bootloader but not using them) would accomplish that.

I'm sure the pros have better suggestions.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
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