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
Posted: Sat Jan 02, 2010 6:15 pm
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
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