CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Tinybootloader+PIC16F883

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

Tinybootloader+PIC16F883
PostPosted: Tue Jan 18, 2011 9:50 am     Reply with quote

I have been using the following syntax for tiny bootloader definition:
Code:

#define MAX_FLASH getenv("PROGRAM_MEMORY")
#define LOADER_SIZE   0xFF   //tinybld size + a bit more (200 bytes is enough)
#build(reset=0x0000:0x0007)
#org MAX_FLASH-LOADER_SIZE , MAX_FLASH-1 {}//void boot_loader(void) {}


It has always worked well for all the PICs I have ever used.
But it does not compile for 16F883/6.
There is 1 error and weird compiler messages:
"#build(reset=0x0000:0x0007)" causes the following messages:
"Error: Invalid ORG directive"
" and also
Info 300....More info: Segment at 00000-00007 (0004 used) Priv.
"...and similar ones.

Is "#build(reset=0x0000:0x0007)" line essential for the bootloader to work?

Cheers
Meereck
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jan 18, 2011 3:20 pm     Reply with quote

Quote:
#build(reset=0x0000:0x0007)

I don't know anything about the Tiny Bootloader, but this line looks
suspicious. In the 18F PICs, the interrupt vector is at address 0x0008,
so it would seem that the line above is for an 18F PIC.

But you are now using a 16F PIC. In those PICs, the interrupt vector
is at address 0x0004, so an upper limit of 0x0003 would seem more
likely to be correct.

But, if that doesn't work, post a little test program which uses the lines
from your post, and about maybe 10 more lines (total).

And, post your compiler version so we can test it.
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

PostPosted: Tue Jan 18, 2011 3:52 pm     Reply with quote

oops, didnt realize that.
I have always been using 18F PICs, not 16F, so you got the point!
thanks
Meereck
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group