2014-04-18 22:48 GMT+02:00 David W. Schultz <david.schu...@earthlink.net>:
> On 04/18/2014 12:08 PM, Tomek Lorek wrote:
>
>> Is that doable? How can I define in the application’s code that the
>> reset vector (0xFFFE) shall contain the bootloader’s init code
>> (0x4400)?
>>
>
> Why not let the bootloader take care of this?
>
> Once you have a bootloader in place the idea is to let it load the main
> program. Since it is in charge of that process it can make sure that the
> reset vector gets loaded with the desired address.

David, this is exactly what I want to achieve: the bootloader that
fully controls MCU powerup and loading the application's main
function.
The problem arises when you first flash the bootloader and then flash
the application - both use the same vector table (0xFFE0 - 0xFFFE), so
the bootloader's vector table (which has 0xFFFE assigned a value of
0x4400) is overwritten with application's vector table (which has
0xFFFE = 0x5400) (see my first post in this thread).

That is why I either have to overwite bootloader's 0xFFFE cell with a
value of 0x4400 (which I planned to have forced in the application so
that it doesn't use 0x5400) or don't overwrite it at all once flashing
the application (just omit 0xFFFE once flashing) - but the latter I
have no idea how to do :)

Best Regards,
Tomek

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to