Jump to content
Sign in to follow this  
rlang

Boostc 1.8 Non Exisistent Config Locations

Recommended Posts

Bug description:

BOOSTC 1.8 defines unimplemented configuration memory

 

Steps to reproduce:

1.) Compile program for PIC18F2455

#include <system.h>

#pragma DATA   _CONFIG1L, 00100100b                                                                                             
#pragma DATA   _CONFIG1H, 00001111b                                                                                           
#pragma DATA   _CONFIG2L, 00111111b                                                                                         
#pragma DATA   _CONFIG2H, 00011110b                                                                                        
#pragma DATA   _CONFIG3H, 10000000b                                                                                            
#pragma DATA   _CONFIG4L, 10000001b  // DEBUG AND LVP off                                                                                        
#pragma DATA   _CONFIG5L, 00001111b                                                                                           
#pragma DATA   _CONFIG5H, 11000000b                                                                                            
#pragma DATA   _CONFIG6L, 00001111b                                                                                           
#pragma DATA   _CONFIG6H, 11100000b                                                                                            
#pragma DATA   _CONFIG7L, 00001111b                                                                                             
#pragma DATA   _CONFIG7H, 01000000b   

void interrupt( void )
{
   portb++;
   clear_bit( intcon, TMR0IF );  //clear TMR0 overflow flag
}
void main()
{
   trisb = 0;  //configure port B
   portb = 0;
   clear_bit( t0con, T0CS );  // select internal clock
   clear_bit( t0con, T0PS3 );  // select pres-scaler
   set_bit( t0con, T0PS0 );  // set pres-scaler to 1:256
   set_bit( t0con, T0PS1 );  
   set_bit( t0con, T0PS2 );
   set_bit( intcon, GIE );    // enable interrupts    
   set_bit( intcon, TMR0IE ); //enable TMR0 overflow bit    
   while( 1 ) {}
}

2.) Examine listing

	ORG 0x00300000
300000  0F24      	DW 0x0F24
300002  1E3F      	DW 0x1E3F
ORG 0x00300004
300004  80FF      	DW 0x80FF
300006  FF81      	DW 0xFF81
ORG 0x00300008
300008  C00F      	DW 0xC00F
30000A  E00F      	DW 0xE00F
30000C  400F      	DW 0x400F

 

Expected behavior:

Config locations 300004 and 300007 do not exist on the microprocessor but FF is defined for that location. When a non-existent config location is read 0 is returned. This may cause a problem in verification. It would be nice if 0 were loaded in these two locations.

 

Is the problem 100% reproducible:

Yes

SourceBoost version: 5.7

Compiler: BoostC

Compiler version: Compiler Version 1.8 Alpha (for PIC18 architecture)

OS: Windows 98

Comments:

None

Edited by rlang

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