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

Boot Loader question

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



Joined: 23 Apr 2009
Posts: 32

View user's profile Send private message

Boot Loader question
PostPosted: Tue Apr 20, 2021 12:19 pm     Reply with quote

I used the PCD boot loader example to get a boot loader to load a program via serial. It worked OK for my simple test code, but when I try a larger piece of code, it doe not work. I suspect that the issue is with the following part of the boot loader code:

Code:
#ifndef LOADER_PAGES
 #if getenv("FLASH_ERASE_SIZE") == 128
  #define LOADER_PAGES 19
 #else
  #define LOADER_PAGES 2
 #endif
#endif


and the matching piece in loader_pcd.c:

Code:
/*
#ifndef LOADER_PAGES
 #if getenv("FLASH_ERASE_SIZE") == 128
  #define LOADER_PAGES 13
 #else
  #define LOADER_PAGES 1
 #endif
#endif


I am targeting a dsPIC33EP512MU810. but I am unsure exactly how to change these. These seem to allocate the memory locations.

I really would like to allow all of the available program memory to be used. So something like Max program size - bootloader size (I think that has to be rounded to a "page" number
Ttelmah



Joined: 11 Mar 2010
Posts: 19221

View user's profile Send private message

PostPosted: Wed Apr 21, 2021 12:32 am     Reply with quote

The code you are showing is not the problem. This leaves the space for
the bootloader.
There is nothing in the bootloader that should restrict you from programming
the whole chip (except for the bootloader area, and on your PIC the top
page where the configuration fuses reside).
How big is the program you are trying to load?. Where does it sit in memory?
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