Jump to content

Flash_read


Recommended Posts

Hi All,

 

I'm using the SourceBoost IDE with the latest BoostC compiler. My target is a PIC 16F876A and i'm trying to read from the flash memory using Boost's built in flash routines.

 

My very simple code is:

#include <system.h>
#include <flash.h>

void main()
{
short x;
x = flash_read(0x2000);
while (1);
}

 

This compiles fine, but won't link (yes I added the flash.pic16.lib) to my project.

 

I get the following errors:

Failure

Error: Duplicate global var:cmcon

Error: Duplicate global var:eedata

Error: Duplicate global var:eeadr

Error: Duplicate global var:eecon1

Error: Duplicate global var:eecon2

Exit code was -2.

Removing target: flash.hex

Failed to locate output file 'flash.hex'

Done

 

Failed

 

Its almost as if the flash.pic16.lib is conflicting with libc.pic16.lib? If that is the case how do I force SourceBoost to remove this library, and what side effects will it cause (ie. am I going to lose string functions etc)?

 

Thanks,

Matt.

Link to comment
Share on other sites

doozer,

I get the following errors:

Failure

Error: Duplicate global var:cmcon

Error: Duplicate global var:eedata

Error: Duplicate global var:eeadr

Error: Duplicate global var:eecon1

Error: Duplicate global var:eecon2

Exit code was -2.

Removing target: flash.hex

Failed to locate output file 'flash.hex'

Done

 

Failed

This library code has data that conflicts (registers like eedata have different addresses) with the target device you have selected, so its not going to work.

 

The source needs to be built, maybe even changed to work with the device you want to use.

 

Regards

Dave

Link to comment
Share on other sites

This library code has data that conflicts (registers like eedata have different addresses) with the target device you have selected, so its not going to work.

 

This is an incorrect statement. There was such problem but it was fixed in the latest SourceBoost releases. Your code compiles and links fine using BoostC 6.35

 

Regards,

Pavel

Link to comment
Share on other sites

Pavel,

 

This is an incorrect statement. There was such problem but it was fixed in the latest SourceBoost releases. Your code compiles and links fine using BoostC 6.35

 

Thanks for the correction ;)

 

Regards

Dave

Link to comment
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...
 Share

×
×
  • Create New...