Jump to content
Sign in to follow this  
rlang

Boostc 2.0 Beta Bug

Recommended Posts

Bug description:

Program that compiled and executed with IDE 5.8 and BOOSTC 1.9.3

will not compile with IDE 5.9 and BOOSTC 2.0

 

Steps to reproduce:

1 Program that previously generated on compile time errors now generates the following:

BoostC Optimizing C Compiler Version 2.0 Beta (for PIC18 architecture)

 

usbtest.c(233:10): warning: '!' operation has no effect

usbtest.c(885:12): error: l-value specifies const object

usbtest.c(885:12): error: failed to generate expression

usbtest.c(886:10): error: l-value specifies const object

usbtest.c(886:10): error: failed to generate expression

usbtest.c(888:10): error: l-value specifies const object

usbtest.c(888:10): error: failed to generate expression

usbtest.c(888:2): error: error in the body of 'if' expression

usbtest.c(898:12): error: l-value specifies const object

usbtest.c(898:12): error: failed to generate expression

usbtest.c(899:10): error: l-value specifies const object

usbtest.c(899:10): error: failed to generate expression

usbtest.c(901:10): error: l-value specifies const object

usbtest.c(901:10): error: failed to generate expression

usbtest.c(901:2): error: error in the body of 'if' expression

usbtest.c(916:12): error: l-value specifies const object

usbtest.c(916:12): error: failed to generate expression

usbtest.c(917:10): error: l-value specifies const object

usbtest.c(917:10): error: failed to generate expression

usbtest.c(919:10): error: l-value specifies const object

usbtest.c(919:10): error: failed to generate expression

usbtest.c(919:2): error: error in the body of 'if' expression

usbtest.c(923:12): error: l-value specifies const object

usbtest.c(923:12): error: failed to generate expression

usbtest.c(924:10): error: l-value specifies const object

usbtest.c(924:10): error: failed to generate expression

usbtest.c(926:10): error: l-value specifies const object

usbtest.c(926:10): error: failed to generate expression

usbtest.c(926:2): error: error in the body of 'if' expression

usbtest.c(930:12): error: l-value specifies const object

usbtest.c(930:12): error: failed to generate expression

usbtest.c(931:10): error: l-value specifies const object

usbtest.c(931:10): error: failed to generate expression

usbtest.c(933:10): error: l-value specifies const object

usbtest.c(933:10): error: failed to generate expression

usbtest.c(933:2): error: error in the body of 'if' expression

usbtest.c(1035:12): error: l-value specifies const object

usbtest.c(1035:12): error: failed to generate expression

usbtest.c(1036:10): error: l-value specifies const object

usbtest.c(1036:10): error: failed to generate expression

usbtest.c(1039:10): error: l-value specifies const object

usbtest.c(1039:10): error: failed to generate expression

usbtest.c(1039:2): error: error in the body of 'if' expression

usbtest.c(1056:12): error: l-value specifies const object

usbtest.c(1056:12): error: failed to generate expression

usbtest.c(1057:10): error: l-value specifies const object

usbtest.c(1057:10): error: failed to generate expression

usbtest.c(1060:10): error: l-value specifies const object

usbtest.c(1060:10): error: failed to generate expression

usbtest.c(1060:2): error: error in the body of 'if' expression

usbtest.c(1348:10): warning: '!' operation has no effect

failure

Exit code was 1.

Removing target: usbtest.obj

Failed to locate output file 'usbtest.obj'

Done

 

Failed

 

2.) Some of the old lines that are now causing problems include:

 

233 while (!btxif); // wait until tx register is empty

885 EP0_start = DeviceDescriptor;

886 EP0_end = DeviceDescriptor + sizeof(DeviceDescriptor);

 

Expected behavior:

Program would not have to be rewritten for new compiler version

 

Is the problem 100% reproducible:

Yes

SourceBoost version: 5.9

Compiler: BoostC

Compiler version: Compiler Version 2.0 beta (for PIC18 architecture)

OS: Windows 98

Comments: Any idea what is going on? Looks like something that used to be ok is now verboten. What is I value?

Share this post


Link to post
Share on other sites

Rob,

 

An L-value (Left value) is the thing on the left hand side of an "=".

 

ie:

char a = 1;

a = 10; // L-value is a

 

const char a = 1;

a = 10; // invalid L value, a constant can't be changed.

 

This version of the compiler tightens up on such declarations.

 

Regards

Dave

Share this post


Link to post
Share on other sites
This version of the compiler tightens up on such declarations.

 

Regards

Dave

 

I changed two lines that were causing all the constant errors.

 

I changed while (!btxif); // wait until tx register is empty

to while (btxif == 0); // wait until tx register is empty

(note that line is in your serial driver example)

 

I now get the following error during link

 

BoostLink Optimizing Linker Version 2.0 Beta

Reading:C:\SBOOST\config\PIC18F2455.TDF failed

Failed

 

I noticed that the PIC18F2455.TDF was missing from the 5.9 IDE release, so I made a copy of PIC18F4455.TDF and renamed it PIC18F2455.TDF. Now I get some sort of internal linker error

 

BoostLink Optimizing Linker Version 2.0 Beta

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

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

Internal Error: Unable to resolve label ID:0x100002F6

Failed

Exit code was -1. [No error.]

 

Any help appreciated.

Share this post


Link to post
Share on other sites
Internal Error: Unable to resolve label ID:0x100002F6

Failed

Exit code was -1.  [No error.]

 

Any help appreciated.

 

I installed the missing TDF file you sent however I still get the error above during link and do not know what it is telling me.

Share this post


Link to post
Share on other sites
This is a compiler error introduced in 2.0 I will look at it right now.

 

The problem has been fixed. After more checks it will be bublished either as an update or if the check is done soon as a new release.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Internal Error: Unable to resolve label ID:0x100002F6

Failed

Exit code was -1. [No error.]

 

Through trial and error I determined what was causing the above linkage error. I had incorrectly used a logical AND when I should have used a bitwise AND.

if (portc && 0x01) {}

instead of

if (portc & 0x01) {}

 

Maybe a better error message could be developed. Thanks for your help.

 

Rob

Share this post


Link to post
Share on other sites
Internal Error: Unable to resolve label ID:0x100002F6

Failed

Exit code was -1.  [No error.]

 

Through trial and error I determined what was causing the above linkage error.  I had incorrectly used a logical AND when I should have used a bitwise AND.

  if (portc && 0x01) {}

instead of   

  if (portc & 0x01) {}

 

Maybe a better error message could be developed.  Thanks for your help.

 

Fixed. Fix will be available in the next release.

 

Regards,

Pavel

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