Jump to content
Sign in to follow this  
Mike McLaren

Libc.pic16X.lib ?

Recommended Posts

Hi guys,

 

One of the caveats of using BoostC from within MPLAB is that I've always had to manually add the libc.pic16.lib file to my MPLAB project. Now I see there is a libc.pic16x.lib file. Am I correct in assuming I should be using this file in my MPLAB projects with "enhanced mid-range" target devices?

 

TIA! Cheerful regards, Mike

Edited by Mike McLaren

Share this post


Link to post
Share on other sites

Not sure what PICs are "enhanced mid-range" targets but you need to use libc.pic16x.lib instead of libc.pic16.lib with devices that use PIC16 extended instruction set like PIC16F193x and alike (the ones for which you need to use -16x compiler command line argument)

 

 

Pavel

Regards,

Share this post


Link to post
Share on other sites

Pavel

 

It's exactly that.

The Microchip documentation refers to the PIC16 devices that use the extended instruction set and extended memory address modes (linear) as "enhanced mid-range".

The PIC16F1xxx devices belong to that category.

 

Best regards

Jorge

Share this post


Link to post
Share on other sites

Thank you Pavel (and Jorge),

 

Pavel, may I ask if instructions for using libc.pic16x.lib were documented somewhere that I missed?

 

Thank you, Gentlemen...

Edited by Mike McLaren

Share this post


Link to post
Share on other sites

Hi

 

I learned that by an indirect reference in page 26 of the "BoostC v7 C Compiler for PICmicro Reference Manual"

I suspected something like this when I spoted the existence of "libc.pic16x.lib" and then it made sense when I learned about the "_PIC16x" predefined macro.

 

Besides that I didn't find any explicit references to it, but, as a matter of fact, I didn't read any "release notes" or other documentation.

 

 

Best regards

Jorge

Edited by JorgeF

Share this post


Link to post
Share on other sites

I learned that by an indirect reference in page 26 of the "BoostC v7 C Compiler for PICmicro Reference Manual"

I suspected something like this when I spoted the existence of "libc.pic16x.lib" and then it made sense when I learned about the "_PIC16x" predefined macro.

 

Besides that I didn't find any explicit references to it, but, as a matter of fact, I didn't read any "release notes" or other documentation.

 

 

I'm afraid the usage of libc.pic16x.lib is not documented well. The reason for that (not a good one) is that SourceBoostIDE users don't need to worry about this library as it is linked to a project automatically when working with SourceBoostIDE. But this is not the case when project is managed outside of SourceBoost IDE (i.e. under MPLAB) where the correct libc needs to be explicitly linked to a project:

 

large\\libc.pic18.lib PIC18, large memory model system library. Linked automatically under SourceBoostIDE. Needs to be explicitly linked when working outside of SourceBoostIDE (i.e. under MPLAB)

 

libc.pic16.lib PIC16 system library. Linked automatically under SourceBoostIDE. Needs to be explicitly linked when working outside of SourceBoostIDE (i.e. under MPLAB)

 

libc.pic16x.lib PIC16 extended instruction set system library. Linked automatically under SourceBoostIDE. Needs to be explicitly linked when working outside of SourceBoostIDE (i.e. under MPLAB)

 

libc.pic18.lib PIC18, small memory model system library. Linked automatically under SourceBoostIDE. Needs to be explicitly linked when working outside of SourceBoostIDE (i.e. under MPLAB)

 

Regards,

Pavel

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...