View previous topic :: View next topic |
Author |
Message |
lucasromeiro
Joined: 27 Mar 2010 Posts: 167
|
bootloader configs |
Posted: Fri Dec 04, 2015 3:44 pm |
|
|
Hello,
I modified a bootloader to read the EEPROM of code to update GPRS.
It worked.
But I need to know details of how to configure the bootloader and it will run for main_code not happen any bug.
I need those lines in the two codes (bootloader and main_code)?
Code: | #define LOADER_END 2751
#include <bootloader.h> |
In the main code so I need it?
Code: | #define LOADER_END 2751
#include <bootloader.h> |
The LOADER_END may be larger than what I need without causing trouble?
The FUSES have to be equal in the two codes (bootloader and main_code)?
Is there any limitation on the use of bootloader?
Any tips or trick I need to know for the bootloader run smoothly? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Sat Dec 05, 2015 6:27 am |
|
|
general comments since I don't know what 'bootloader' code you're using...
1) fuses must be the same or you can run into serious trouble
2) having bootloaderend larger than needed reduces available program space especially if not at end of a 'block' of memory.
3) performance is tied to code which we don't see.Depending on wh cut the code it might be as fast as it can get but waste space or it could be 'tight' but messy or ???
4) with ANY bootloader you MUST ensure the PIC power supply doesn't fail during loading! Having a good battery backup with seamless switchover is important. Also some form of data checking is required(checksum, validation,etc.). Loading in ONE bad bit WILL spell disaster.
5) there are no 'limitations' to a bootloader though any that are 'generic' tend to have features your specific application doesn't need. Some 'all-in-one' programs will take longer. Obvious you should test the PIC to be sure you can download the new code though! You can't stuff 16KW of code into a 1KW PIC !!
Jay |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1358
|
|
Posted: Sat Dec 05, 2015 6:39 am |
|
|
temtronic wrote: |
1) fuses must be the same or you can run into serious trouble
|
Just wanted to add on to this. Another option you have is:
In the bootloader, specify the fuses.
In the application, specify #FUSES NONE
That way, your application doesn't clobber the bootloader's fuses. |
|
|
|