Jump to content
dave.s

Linker Failing!

Recommended Posts

Hi, I intend using the Novo RTOS on a PIC16F877a within a marine systems control panel, at present I am in the process of writing a series of test programs to evaluate each of the various functions required.

 

My present program is to test a variable PWM output as well as RS232 communications for setting the duty cycle of the pulse. Every thing seemed to be going fine, pwm output working as expected, rs232_driver.h setup and intialized, etc. I then declared two semaphores to flag the recipt of data and free transmitter, building worked ok to this point.

 

I then added a " SysSignalSemaphore( hTXsema ); " call into my main program before the tasks were started to indicate that the transmitter is free to use, where apon the linker returned the following error message -

 

 

failure

Error:Linking externs failed, extern declaration and variable declaration types are different for variable:'scheduler'

 

 

Please could you help as I cannot see what I have done wrong to recieve this message.

 

Attached are the files used in the program so far.

 

Thanks

 

Dave.S

PWM_Test.zip

Share this post


Link to post
Share on other sites

dave.s,

...

I then added a " SysSignalSemaphore( hTXsema ); " call into my main program before the tasks were started to indicate that the transmitter is free to use, where apon the linker returned the following error message -

 

failure

Error:Linking externs failed, extern declaration and variable declaration types are different for variable:'scheduler'

 

Please could you help as I cannot see what I have done wrong to recieve this message.

...

Interesting problem. When I tried to build your project I ended up with exactly the same error :)

You are using a custom build of Novo RTOS, if you are using the recommended naming convention then you have built a library with 10 tasks (t10) , 10 events (e10) and timer size of 2 bytes (ts2) - novocfg_pic16t10e10ts2.h

 

Here is what I did:

1) Built library with 10 tasks (t10) , 10 events (e10).

2) Copied the library into the boostc lib folder.

3) Built the pwm project, project build failed due to no ram block big enough for scheduler. The failure has occured because the memory required by the scheduler can't be fitted into the target devices memory.

 

4) Re-opened novocfg_pic16t10e10ts2.h and changed max number of semaphores and tasks both to 5.

5) Built pwm project again, and got Error:Linking externs failed, extern declaration and variable declaration types are different for variable:'scheduler'.

 

The problem is caused by the novolib_pic16t10e10ts2.lib library and the project being built with two different versions of the header file novocfg_pic16t10e10ts2.h.

 

I resolved the issue by re-building the novolib_pic16t10e10ts2.lib file and then rebuilding the project.

 

So I would suggest your project contains files built with different versions novocfg_pic16t10e10ts2.h, this could be in any .lib file or .obj file.

 

Here are a couple of tips for SourceBoost IDE:

1) Hold the cntrl key down while initiating the build to force a rebuild of all files in the project.

2) When adding lib files that reside in the default library file to the project, just type the lib name in the file name box and click OK. Now when the project is built it will look in the default lib folder automatically.

 

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

×
×
  • Create New...