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

How do I create separate object files Using the PIC Compiler

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



Joined: 24 Apr 2006
Posts: 5

View user's profile Send private message

How do I create separate object files Using the PIC Compiler
PostPosted: Fri Jun 02, 2006 1:03 pm     Reply with quote

I would like to have a main program created that would be used as
boot up program. Then I would like to have separate Code held in
a outside EEPROM location. I want the boot program to go and access
this outside EEPROM to copy the program into a RAM. (The PIC I am using is a FPGA Design). Then I want to have the PIC execute the code
in the RAM. Later after the RAM code has been executed. I
May have the ROM program load a different section of the EEPROM
which has another RAM Program to run in it.

Can I do this? I am using MPLABs linker. It says I can create CODEPAGES, SECTIONS to have code placed in these locations of
my choosing. Then I can cut and paste the sections and place into EEPROM the sections which will not fit into the ROM of my FPGA PIC.


Now I also see that MPLINK help file says under the Logical Section Definition help the following.
"To use logical sections, define the section in the linker script file with the section directive and then reference the name in the source file using that
languages built in mechanism, eg. #PRAGMA."


My question here is if in my linker file is say for example :

SECTION NAME = filter_coeffs ROM = CONSTANTS
filter_coeffs CODE

? What do I need to put in the source file so that the linker will
associate the generated object file to the SECTION NAME = filter_coeffs?

My Guess might be something like

#PRAGMA SECTION filter_coeffs






Thank You
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jun 02, 2006 1:58 pm     Reply with quote

You're looking for a linker-loader and CCS doesn't have this yet.
Currently, CCS requires every program to have a main().
This will change with vs. 4.0, but that's not been released yet
and it may still not have everything you need. I'm not a beta
tester for it, so I don't know any more about it.
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