Jump to content
Sign in to follow this  
fred

Linker Options

Recommended Posts

When I link my project in sourceboost it links succesfull with still remaining 3 free bytes for code (..:) )

 

When I link the same thing within the MPLAB it fails

"Too much code to fit in ROM, overfilled by:27 locations."

 

 

I copied the linker options from the sourceboost IDE in MPLAB IDE. When I look at the linker execution lines sourceboost added extra options however which probably causes extra optimization when linking.

 

any ideas??

(to be sure it's the linker I first did a complete build of the project in MPLAB IDE and the relinked from within sourceboost IDE)

 

linker execution line in sourceboost IDE

"C:\Program Files\SourceBoost\boostlink.pic.exe" /ld "C:\Program Files\SourceBoost\lib" libc.pic16.lib DAC.obj DAC_DEVICE.obj DAC_LPH7779.obj FR_EEPROM.obj FR_LIB.obj LCD_LPH7779.obj clock.obj sTimer.obj /t PIC16F648A /d "G:\development\DAC Control" /p DAC -swcs 6 2 
BoostLink Optimizing Linker Version 6.84

 

linker execution line mplab IDE

Executing: "C:\Program Files\SourceBoost\boostlink.pic.exe"  "G:\development\DAC Control\DAC_LPH7779.obj" "G:\development\DAC Control\FR_EEPROM.obj" "G:\development\DAC Control\FR_LIB.obj" "G:\development\DAC Control\LCD_LPH7779.obj" "G:\development\DAC Control\sTimer.obj" "G:\development\DAC Control\clock.obj" "G:\development\DAC Control\DAC.obj" "G:\development\DAC Control\DAC_DEVICE.obj" "C:\Program Files\SourceBoost\Lib\libc.pic16.lib" -O1  -p "DAC" -t 16F648A -swcs 6 2 
BoostLink Optimizing Linker Version 6.84

the -O1 option was already there, I added the -swcs 6 2

Share this post


Link to post
Share on other sites
When I link my project in sourceboost it links succesfull with still remaining 3 free bytes for code (.. :) )

 

When I link the same thing within the MPLAB it fails

"Too much code to fit in ROM, overfilled by:27 locations."

 

 

I copied the linker options from the sourceboost IDE in MPLAB IDE. When I look at the linker execution lines sourceboost added extra options however which probably causes extra optimization when linking.

 

any ideas??

(to be sure it's the linker I first did a complete build of the project in MPLAB IDE and the relinked from within sourceboost IDE)

 

linker execution line in sourceboost IDE

"C:\Program Files\SourceBoost\boostlink.pic.exe" /ld "C:\Program Files\SourceBoost\lib" libc.pic16.lib DAC.obj DAC_DEVICE.obj DAC_LPH7779.obj FR_EEPROM.obj FR_LIB.obj LCD_LPH7779.obj clock.obj sTimer.obj /t PIC16F648A /d "G:\development\DAC Control" /p DAC -swcs 6 2 
BoostLink Optimizing Linker Version 6.84

 

linker execution line mplab IDE

Executing: "C:\Program Files\SourceBoost\boostlink.pic.exe"  "G:\development\DAC Control\DAC_LPH7779.obj" "G:\development\DAC Control\FR_EEPROM.obj" "G:\development\DAC Control\FR_LIB.obj" "G:\development\DAC Control\LCD_LPH7779.obj" "G:\development\DAC Control\sTimer.obj" "G:\development\DAC Control\clock.obj" "G:\development\DAC Control\DAC.obj" "G:\development\DAC Control\DAC_DEVICE.obj" "C:\Program Files\SourceBoost\Lib\libc.pic16.lib" -O1  -p "DAC" -t 16F648A -swcs 6 2 
BoostLink Optimizing Linker Version 6.84

the -O1 option was already there, I added the -swcs 6 2

 

The final binary is affected by the order the modules are linked together in because that affects their placement in memory, and hence may cause some jumps to cross code page boundaries. The order the modules are linked under MPLAB is different to that under SourceBoost IDE.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Does that mean that there is an order of optimum module placement? It would be nice if there was a compile option which could iterate the run a number of times to discover which would be best.

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...