PDA

View Full Version : Explain "Define Loader_Used 1"



Short_Circuit
- 24th June 2010, 02:20
Would someone please explain "Define Loader_Used 1"

What does it do?

Thank you

Darrel Taylor
- 24th June 2010, 04:22
It just makes sure there's no code in the first 4 program memory locations.

When using a bootloader, those locations are used to jump to the boodloader code, before running the user code.

ChrisKiwi
- 9th September 2010, 06:59
It just makes sure there's no code in the first 4 program memory locations.

When using a bootloader, those locations are used to jump to the boodloader code, before running the user code.

So, in effect, different bootloaders could be used with PBP "define LOADER_USED 1" command ?

I note that the MCS 877 bootloader uses all 4 locations. The Tiny 877 bootloader only uses the first 3 and the ds30Loader 887 uses only the first 3 also.

Now, I have used "define LOADER_USED 1" in a simple test program to flash a LED but the program doesn't run - though it downloads OK via the ds30 Loader PC interface (loader).

This doesn't make sense, as the bootloader should know where to jump back to in order for the code to start running assuming that you haven't overwritten the bootloader code while downloading your code to the micro.

Does my fist question hold true ? or have I missed something else completely?

Regards, Chris