Jump to content
Sign in to follow this  
Guest Joe

Bug In Delay_us Linking?

Recommended Posts

Guest Joe

Hi,

 

The code compiles but fails to link.

 

   delay_us( 10 );

 

error:

Linking...

 

"C:\Program Files\SourceBoost\linker.exe" /ld "C:\Program Files\SourceBoost\lib" libc.pic16.lib Fade.obj /t 12F629 /d F:\projects\Pulser\Fade\Code /p Fade

 

BoostLink Optimizing Linker Version 1.8 Alpha

http://www.picant.com/c2c/c.html

Copyright© 2004 Pavel Baranov

Copyright© 2004 David Hobday

Warning: Unable to successfully create 'delay_us' for target with clock freq 4000000 Hz

Warning: argument of 'delay_10us' calls must have a value of 1 or more

Error: Unresolved external function:delay_us

Error: unresolved external symbol, function:delay_us

 

Failed

Done

Share this post


Link to post
Share on other sites

Joe,

 

This is the expected behaviour if the clock frequency of the target is < 20MHz.

 

The code fails to link becauses its then that the delay routine is actually created.

 

The linker finds that it can't generate an accurate delay_us function, so it doesn't then create that function.

 

The idea here is that rather than generate an in-accurate delay (that may result in other side affect), the code fails to link.

 

Solution use the delay_10us() function instead when the clock frequency of the target is less than 20MHz.

 

Regards

Dave

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