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 support@ccsinfo.com

bootloader with large code

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



Joined: 06 Oct 2008
Posts: 43

View user's profile Send private message

bootloader with large code
PostPosted: Sun Apr 22, 2012 10:00 pm     Reply with quote

Hi everyone, I want to implement a bootloading scheme to my code. I am using a pic18f46k20 and my code has used 68% of ram and 82% of rom. It is a large code that uses interrupts, adc, timers, serial, etc.

I found a bootloader code in this forum and I tested it to download a short piece of code and it works well. However, when I used it to download my large code, it just starts for a moment and then it stops.

I thought that if I just add this piece of code:
Code:

#define LOADER_END 0x5FF
#define LOADER_SIZE 0x4FF
#define USE_STATEMENT_SIZE 0x100

#ifndef _bootloader

#if defined(__PCM__)
   #build(reset=LOADER_END+1+USE_STATEMENT_SIZE, interrupt=LOADER_END+5+USE_STATEMENT_SIZE)
#elif defined(__PCH__)
   #build(reset=LOADER_END+1+USE_STATEMENT_SIZE, interrupt=LOADER_END+9+USE_STATEMENT_SIZE)
#endif
#org 0, LOADER_END+USE_STATEMENT_SIZE {}

#endif

then it will run smoothly but it didn't. Please help.
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