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

PIC24EP512GP806 - Bootloader no longer working

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



Joined: 30 Oct 2007
Posts: 596
Location: Ottawa, Ontario, Canada

View user's profile Send private message

PIC24EP512GP806 - Bootloader no longer working
PostPosted: Thu Feb 12, 2026 2:50 pm     Reply with quote

Device: PIC24EP512GP806
Compiler 1: 5.116
Compiler 2: IDS 5.071, PCB/D/H/M: 5.026

Hi guys,

Years ago, I had bootloader code that worked fine but I haven't used it in 6-7 years.

Back then, I only needed it when shipping devices to partners for testing which, in the event of a required change, all they had to do was to upload new firmware via TeraTerm without needing a programmer.

The process was simple for me:
1. Uncomment bootloader.h in my main code and recompile;
2. Compile and burn the bootloader to the PIC;
3. Reboot the device in bootloader mode;
4. Drag the main hex file into TeraTerm to upload;
5. Reboot the device and after so many seconds waiting for the bootloader, it would timeout and jump to the main code;

I stopped using it years ago and never touched it again for other reasons.

Today, I'm trying to use it again but when I upload the main program, the device just keeps reloading the bootloader instead of running my code.

I think it might be a memory issue. Over the years my code has grown a lot:

- Compiler 2 (IDE 5.071 / PCD 5.026): Compiles at 95% ROM normally, 96% with bootloader.h;
- Compiler 1 (5.116): Won't compile at all—gives "Out of ROM" error on a function with #separate;

Back when the bootloader last worked, ROM usage was around 92-93% when compiled on Compiler 2.

My theory: Since Compiler 2 is older and compiles at 96% without ERRORS, maybe it's silently overwriting memory that the bootloader needs? Compiler 1 fails with an OUT OF ROM ERROR but not Compiler 2.

Tomorrow I'll try commenting out code to get it compiling on Compiler 1 with the bootloader and see if that fixes it.

But does this make any sense? Could compiling at 96% with Compiler 2 be corrupting bootloader memory?

Thanks,

Ben
temtronic



Joined: 01 Jul 2010
Posts: 9620
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Feb 12, 2026 3:42 pm     Reply with quote

It kinda sounds like the 'bank memory' problem.....functions can't 'jump banks'.have to be 100% within ONE bank.
Others will know.... maybe 'optimize' level can fix this ??
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