Jump to content
Sign in to follow this  
Gues7

Strange Errors....

Recommended Posts

Im new to using BoostC, I recently bought a standard license copy from Maplin (Ireland), but I am having a few issues when trying to compile some code...

 

/*

SERIAL RGB LED CONTROLLER
STEVEN MOUGHAN

P: PIC12F675
C: 4MhZ

DESIGNED USING SOURCEBOOST IDE
COMPILE USING BOOSTC

GPIO0: RED PWM  : OP
GPIO1: GRN PWM  : OP
GPIO2: BLU PWM  : OP
GPIO3: MCLR	 : IP
GPIO: SERIAL TX : OP
GPIO: SERIAL RX : IP

1ms xxxxxxxx xx xxxxxxxx p 2ms

START BIT(1) -> ADDRESS -> FUNCTION -> VALUE -> STOP BIT(0)
ADDRESS: 0x00 is reserved for broadcast
FUNCTION: 0X00 RED, 0X01, GREEN, 0X02 BLUE, 0X03 SET ADDRESS
VALUE: RANGES FROM 0X00 TO 0XFF
USES EVEN PARITY
PERIOD OF EACH BIT IS ??

HTTP://WWW.BUILDFUNSTUFF.COM

*/

// INCLUDE FILES
#include <system.h>
//#include <eeprom.h>
//#include <PIC12F675.h>


//PRAGMA'S
#pragma OPTIMIZE "a"							//AGGRESSIVE OPTIMIZATION
#pragma CLOCK_FREQ 4000000						//INTERNAL OSC SPEED
#pragma DATA _CONFIG, _CP_OFF & _BODEN_OFF & _MCLRE_ON & _WDT_OFF & _HS_OSC & _INTRC_OSC_NOCLKOUT & _PWRTE_ON & _CPD_OFF
											//CODE PROTECT OFF
											//BROWN OUT DETECT OFF
											//MCLR ON
											//WATCH DOG TIMER OFF
											//HIGH SPEED OSC
											//INTERNAL OSC, NO OUTPUT CLOCK
											//POWER UP TIMER ON
											//WTF IS CPD?
#pragma DATA _EEPROM, 0b00000001				//DEFAULT ADDRESS: 0x01

//CUSTOM DEFINES
#define EADDR 0

//FUNCTION PROTOTYOPES
void setNewAddress(char newAddress);

//GLOBAL VARIABLES
char myAddress=0;

void main(void) {

myAddress = eeprom_read(EADDR);				//READ THE ADDRESS OF THE UNIT FROM EEPROM
trisio = 0b00010111;						//SET THE I/O DIRECTIONS

}

void setNewAddress(char newAddress) {
eeprom_write(newAddress, EADDR);
myAddress = newAddress;
}

 

I receive the following errors...

 

Building...

BoostC Optimizing C Compiler Version 6.81 (for PIC16 architecture)

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

Licensed to MAPL50468 under Single user Standard License for 1 node(s)

Limitations: PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only

 

 

RGB Controller.c

 

failure

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:14): error: unknown identifier 'eeprom_read'

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:14): error: failed to generate expression

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:14): error: invalid operand 'eeprom_read(0)'

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:12): error: failed to generate expression

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(69:2): error: unknown identifier 'eeprom_write'

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(69:2): error: failed to generate expression

"C:\Program Files\SourceBoost\boostc.pic16.exe" "RGB Controller.c" -t PIC12F675

Exit code was 1.

Removing target: RGB Controller.obj

Failed to locate output file 'C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.hex'

Done

 

Failed

 

and when I uncomment the #include <eeprom.h> file I get the following errors...

 

Building...

BoostC Optimizing C Compiler Version 6.81 (for PIC16 architecture)

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

Licensed to MAPL50468 under Single user Standard License for 1 node(s)

Limitations: PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only

 

 

RGB Controller.c

 

success

BoostLink Optimizing Linker Version 6.81

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

 

 

 

failure

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_read(unsigned char)'

Error: Unresolved external function:'eeprom_read(unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external symbol, function:eeprom_write

Error: Unresolved external function:'eeprom_read(unsigned char)'

Error: Unresolved external symbol, function:eeprom_read

"C:\Program Files\SourceBoost\boostc.pic16.exe" "RGB Controller.c" -t PIC12F675

"C:\Program Files\SourceBoost\boostlink.pic.exe" /ld "C:\Program Files\SourceBoost\lib" libc.pic16.lib "RGB Controller.obj" /t PIC12F675 /d "C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects" /p "RGB Controller"

Exit code was -2.

Removing target: RGB Controller.hex

Failed to locate output file 'C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.hex'

Done

 

Failed

 

I have never encountered such errors using other compilers so Im kinda stumped... I have tried playing around with a few bits and pieces but to no solution.

 

Thanks in advance for any replies I might get.

Share this post


Link to post
Share on other sites
failure

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:14): error: unknown identifier 'eeprom_read'

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:14): error: failed to generate expression

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:14): error: invalid operand 'eeprom_read(0)'

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:12): error: failed to generate expression

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(69:2): error: unknown identifier 'eeprom_write'

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(69:2): error: failed to generate expression

"C:\Program Files\SourceBoost\boostc.pic16.exe" "RGB Controller.c" -t PIC12F675

Exit code was 1.

Removing target: RGB Controller.obj

Failed to locate output file 'C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.hex'

Done

 

Failed

 

and when I uncomment the #include <eeprom.h> file I get the following errors...

Yes you need the header file, so the compiler knows about the functions arguments and return types from the function prototypes.

 

Building...

BoostC Optimizing C Compiler Version 6.81 (for PIC16 architecture)

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

Licensed to MAPL50468 under Single user Standard License for 1 node(s)

Limitations: PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only

 

 

RGB Controller.c

 

success

BoostLink Optimizing Linker Version 6.81

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

 

 

 

failure

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_read(unsigned char)'

Error: Unresolved external function:'eeprom_read(unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external symbol, function:eeprom_write

Error: Unresolved external function:'eeprom_read(unsigned char)'

Error: Unresolved external symbol, function:eeprom_read

"C:\Program Files\SourceBoost\boostc.pic16.exe" "RGB Controller.c" -t PIC12F675

"C:\Program Files\SourceBoost\boostlink.pic.exe" /ld "C:\Program Files\SourceBoost\lib" libc.pic16.lib "RGB Controller.obj" /t PIC12F675 /d "C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects" /p "RGB Controller"

Exit code was -2.

Removing target: RGB Controller.hex

Failed to locate output file 'C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.hex'

Done

 

Failed

 

I have never encountered such errors using other compilers so Im kinda stumped... I have tried playing around with a few bits and pieces but to no solution.

You also need to add the EEPROM library (eeprom.pic16.lib) to the project so that the linker has the actual code for the functions.

 

Regards

Dave

Share this post


Link to post
Share on other sites
You also need to add the EEPROM library (eeprom.pic16.lib) to the project so that the linker has the actual code for the functions.

 

Regards

Dave

 

Many thanks Dave, its compiling now.

Share this post


Link to post
Share on other sites
Im new to using BoostC, I recently bought a standard license copy from Maplin (Ireland), but I am having a few issues when trying to compile some code...

 

/*

SERIAL RGB LED CONTROLLER
STEVEN MOUGHAN

P: PIC12F675
C: 4MhZ

DESIGNED USING SOURCEBOOST IDE
COMPILE USING BOOSTC

GPIO0: RED PWM  : OP
GPIO1: GRN PWM  : OP
GPIO2: BLU PWM  : OP
GPIO3: MCLR	 : IP
GPIO: SERIAL TX : OP
GPIO: SERIAL RX : IP

1ms xxxxxxxx xx xxxxxxxx p 2ms

START BIT(1) -> ADDRESS -> FUNCTION -> VALUE -> STOP BIT(0)
ADDRESS: 0x00 is reserved for broadcast
FUNCTION: 0X00 RED, 0X01, GREEN, 0X02 BLUE, 0X03 SET ADDRESS
VALUE: RANGES FROM 0X00 TO 0XFF
USES EVEN PARITY
PERIOD OF EACH BIT IS ??

HTTP://WWW.BUILDFUNSTUFF.COM

*/

// INCLUDE FILES
#include <system.h>
//#include <eeprom.h>
//#include <PIC12F675.h>


//PRAGMA'S
#pragma OPTIMIZE "a"							//AGGRESSIVE OPTIMIZATION
#pragma CLOCK_FREQ 4000000						//INTERNAL OSC SPEED
#pragma DATA _CONFIG, _CP_OFF & _BODEN_OFF & _MCLRE_ON & _WDT_OFF & _HS_OSC & _INTRC_OSC_NOCLKOUT & _PWRTE_ON & _CPD_OFF
											//CODE PROTECT OFF
											//BROWN OUT DETECT OFF
											//MCLR ON
											//WATCH DOG TIMER OFF
											//HIGH SPEED OSC
											//INTERNAL OSC, NO OUTPUT CLOCK
											//POWER UP TIMER ON
											//WTF IS CPD?
#pragma DATA _EEPROM, 0b00000001				//DEFAULT ADDRESS: 0x01

//CUSTOM DEFINES
#define EADDR 0

//FUNCTION PROTOTYOPES
void setNewAddress(char newAddress);

//GLOBAL VARIABLES
char myAddress=0;

void main(void) {

myAddress = eeprom_read(EADDR);				//READ THE ADDRESS OF THE UNIT FROM EEPROM
trisio = 0b00010111;						//SET THE I/O DIRECTIONS

}

void setNewAddress(char newAddress) {
eeprom_write(newAddress, EADDR);
myAddress = newAddress;
}

 

I receive the following errors...

 

Building...

BoostC Optimizing C Compiler Version 6.81 (for PIC16 architecture)

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

Licensed to MAPL50468 under Single user Standard License for 1 node(s)

Limitations: PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only

 

 

RGB Controller.c

 

failure

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:14): error: unknown identifier 'eeprom_read'

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:14): error: failed to generate expression

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:14): error: invalid operand 'eeprom_read(0)'

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(63:12): error: failed to generate expression

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(69:2): error: unknown identifier 'eeprom_write'

C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.c(69:2): error: failed to generate expression

"C:\Program Files\SourceBoost\boostc.pic16.exe" "RGB Controller.c" -t PIC12F675

Exit code was 1.

Removing target: RGB Controller.obj

Failed to locate output file 'C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.hex'

Done

 

Failed

 

and when I uncomment the #include <eeprom.h> file I get the following errors...

 

Building...

BoostC Optimizing C Compiler Version 6.81 (for PIC16 architecture)

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

Licensed to MAPL50468 under Single user Standard License for 1 node(s)

Limitations: PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only

 

 

RGB Controller.c

 

success

BoostLink Optimizing Linker Version 6.81

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

 

 

 

failure

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external function:'eeprom_read(unsigned char)'

Error: Unresolved external function:'eeprom_read(unsigned char)'

Error: Unresolved external function:'eeprom_write(unsigned char,unsigned char)'

Error: Unresolved external symbol, function:eeprom_write

Error: Unresolved external function:'eeprom_read(unsigned char)'

Error: Unresolved external symbol, function:eeprom_read

"C:\Program Files\SourceBoost\boostc.pic16.exe" "RGB Controller.c" -t PIC12F675

"C:\Program Files\SourceBoost\boostlink.pic.exe" /ld "C:\Program Files\SourceBoost\lib" libc.pic16.lib "RGB Controller.obj" /t PIC12F675 /d "C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects" /p "RGB Controller"

Exit code was -2.

Removing target: RGB Controller.hex

Failed to locate output file 'C:\Program Files\SourceBoost\Samples\C\BoostC\myProjects\RGB Controller.hex'

Done

 

Failed

 

I have never encountered such errors using other compilers so Im kinda stumped... I have tried playing around with a few bits and pieces but to no solution.

 

Thanks in advance for any replies I might get.

 

 

i personally am looking into using the eeprom to store frames for a 3x3x3 led cube but i havent got round to coding it yet. may i suggest including eeprom.c (it may not exist as i downloaded extra libraries from the net, no url soz). it probably wont work, but ill post any news i have in getting eeprom to work

 

james waples

 

ps. im pretty crap at programming, so dont take anything for granted... ill do my best :rolleyes:

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