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

Bootloader adaption from 8k to 4k flash device

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







Bootloader adaption from 8k to 4k flash device
PostPosted: Sun Mar 02, 2008 11:48 am     Reply with quote

Hello everybody,

i need a bootloader for the 16F88. My problem is that i can't find any in the web for the 16F88, so i tried to change some code fragments of the delivered example bootloader (EX_BOOTLOADER.C) and also tried this with the Codeloader (w*w.thebytefactory.com/dl_codeloader.asp)

Both are written for the 16F877, which have an 8k flash. If I compile them i'll get always an "Out of ROM" error. So i have to change something by the #org instructions, but don't know to which value they have to be set.

Here are the code fragment which reserves the rom so the bootloader has to be write at the end, i hope some of you can tell me the right values. Here you see the Codeloader.
Code:
// The loader will protect itself from firmware being downloaded on top of it
// The MAX_LOADABLE values below are set loosely so that a wide variety of compiler versions will
// compile this source code without "Out of ROM" errors. To maximize the available program space for
// user applications, MAX_LOADABLE should be adjusted to as large as your compiler version will allow.
#if getenv("FUSE_SET:WDT")==TRUE
#define MAX_LOADABLE   0x1B00   // The watch-dog is enabled and will be reported to (requires more program memory)
#else
#define MAX_LOADABLE   0x1B20   // The watch-dog is disabled allowing for smaller loader size
#endif

#org 0x0004, 0x07FF {}         // Consume program memory to force the loader to reside in the highest space
#org 0x0800, 0x0FFF {}
#org 0x1000, 0x17FF {}
#org 0x1800, MAX_LOADABLE {}   // CodeLoader will reside from MAX_LOADABLE + 1 to the end of program memory


Im not sure where the code is hid that is responsible by the CCS example bootloader.

Sorry if i spoke a little bit confused because my english is not perfect but i think you can understand it and if not just tell me. Thanks ahead.

Greetings!
Benny
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