How do I create separate object files Using the PIC Compiler
Posted: Fri Jun 02, 2006 1:03 pm
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
Posted: Fri Jun 02, 2006 1:58 pm
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.
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