Jump to content
Sign in to follow this  
L de vries

Linker Does Have Problems In Mplab

Recommended Posts

Used Software:

Windows xp-sp3

MPlab 8.73a

Sourceboost 7.04

processor: PIC16F88

 

C Code:

 

/* Set 31250Hz clock frequency */

 

#pragma CLOCK_FREQ 31250

 

/* Set PIC16 configuration word 1 Internal RC-clock 31250Hz no watchdog no startup-timer*/

#pragma DATA _CONFIG1, 0x3F38

 

/* Set PIC16 configuration word 2 */

#pragma DATA _CONFIG2, 0x3FFC

 

 

void main (void)

 

{

 

// LED Eblock output on PortB

portb = 0x00 ;

trisb = 0x00 ;

 

char a = 0;

short b = 31995;

short c = 2133;

 

a = b / c;

 

// a = 31995 / 2133

// a = 15 (= 0b00001111)

 

portb = a;

 

while (1){

}

 

 

}

 

 

This piece of code Compiles and links without problems when used in Sourceboost IDE .

 

When you setup the same project in MPlab8.73a IDE:

Compiling works without complaining.

Linking gives the message:

 

Executing: "C:\Program Files\SourceBoost\boostlink_pic.exe" "G:\SourceboostMPlab\sourceboost.obj" -O1 -p "MPlabIDE" -t 16F88

BoostLink Optimizing Linker Version 7.04

http://www.sourceboost.com

Copyright© 2004-2011 Pavel Baranov

Copyright© 2004-2011 David Hobday

 

 

Optimisation level:1

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external symbol, function:__div_16_16

 

 

failure

Link step failed.

BUILD FAILED: Wed Aug 03 22:07:02 2011

 

What can I do to solve this?

 

Thanks in advance,

 

Lieuwe

Share this post


Link to post
Share on other sites
Used Software:

Windows xp-sp3

MPlab 8.73a

Sourceboost 7.04

processor: PIC16F88

 

C Code:

 

/* Set 31250Hz clock frequency */

 

#pragma CLOCK_FREQ 31250

 

/* Set PIC16 configuration word 1 Internal RC-clock 31250Hz no watchdog no startup-timer*/

#pragma DATA _CONFIG1, 0x3F38

 

/* Set PIC16 configuration word 2 */

#pragma DATA _CONFIG2, 0x3FFC

 

 

void main (void)

 

{

 

// LED Eblock output on PortB

portb = 0x00 ;

trisb = 0x00 ;

 

char a = 0;

short b = 31995;

short c = 2133;

 

a = b / c;

 

// a = 31995 / 2133

// a = 15 (= 0b00001111)

 

portb = a;

 

while (1){

}

 

 

}

 

 

This piece of code Compiles and links without problems when used in Sourceboost IDE .

 

When you setup the same project in MPlab8.73a IDE:

Compiling works without complaining.

Linking gives the message:

 

Executing: "C:\Program Files\SourceBoost\boostlink_pic.exe" "G:\SourceboostMPlab\sourceboost.obj" -O1 -p "MPlabIDE" -t 16F88

BoostLink Optimizing Linker Version 7.04

http://www.sourceboost.com

Copyright© 2004-2011 Pavel Baranov

Copyright© 2004-2011 David Hobday

 

 

Optimisation level:1

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external symbol, function:__div_16_16

 

 

failure

Link step failed.

BUILD FAILED: Wed Aug 03 22:07:02 2011

 

What can I do to solve this?

 

Thanks in advance,

 

Lieuwe

Missing library - Add Libc.pic16.lib to the mplab project.

 

Regards

Dave

Share this post


Link to post
Share on other sites
Used Software:

Windows xp-sp3

MPlab 8.73a

Sourceboost 7.04

processor: PIC16F88

 

C Code:

 

/* Set 31250Hz clock frequency */

 

#pragma CLOCK_FREQ 31250

 

/* Set PIC16 configuration word 1 Internal RC-clock 31250Hz no watchdog no startup-timer*/

#pragma DATA _CONFIG1, 0x3F38

 

/* Set PIC16 configuration word 2 */

#pragma DATA _CONFIG2, 0x3FFC

 

 

void main (void)

 

{

 

// LED Eblock output on PortB

portb = 0x00 ;

trisb = 0x00 ;

 

char a = 0;

short b = 31995;

short c = 2133;

 

a = b / c;

 

// a = 31995 / 2133

// a = 15 (= 0b00001111)

 

portb = a;

 

while (1){

}

 

 

}

 

 

This piece of code Compiles and links without problems when used in Sourceboost IDE .

 

When you setup the same project in MPlab8.73a IDE:

Compiling works without complaining.

Linking gives the message:

 

Executing: "C:\Program Files\SourceBoost\boostlink_pic.exe" "G:\SourceboostMPlab\sourceboost.obj" -O1 -p "MPlabIDE" -t 16F88

BoostLink Optimizing Linker Version 7.04

http://www.sourceboost.com

Copyright© 2004-2011 Pavel Baranov

Copyright© 2004-2011 David Hobday

 

 

Optimisation level:1

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

Error: Unresolved external symbol, function:__div_16_16

 

 

failure

Link step failed.

BUILD FAILED: Wed Aug 03 22:07:02 2011

 

What can I do to solve this?

 

Thanks in advance,

 

Lieuwe

Missing library - Add Libc.pic16.lib to the mplab project.

 

Regards

Dave

 

 

 

BoostLink Optimizing Linker Version 7.04

http://www.sourceboost.com

Copyright© 2004-2011 Pavel Baranov

Copyright© 2004-2011 David Hobday

 

 

Optimisation level:1

Building CASM file

Memory Usage Report

===================

RAM available:368 bytes, used:16 bytes (4.4%), free:352 bytes (95.6%),

Heap size:352 bytes, Heap max single alloc:111 bytes

ROM available:4096 words, used:90 words (2.2%), free:4006 words (97.8%)

 

 

 

success

Loaded G:\SourceboostMPlab\MPlabIDE.COF.

BUILD SUCCEEDED: Thu Aug 04 00:09:24 2011

 

Thank you David.

 

Such a fast reply, I like Sourceboost, no service contract, but still you get service!

And free updates, as long it is the same version.

All of it for a very Fair price.

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