AnsweredAssumed Answered

Re-Allocate _Startup in PRM file?

Question asked by sebasira on Jan 20, 2012
Latest reply on Feb 1, 2012 by sebasira



I'm using CW 4.6.


I've got and application merged with bootloader using the HEXFILE instruction. Also have PRM pre-process enable, so I define a label __INCLUDE_BOOTLOADER__ to include it.


When including the bootloader _Startup cannot be @0xFFFE because the bootloader reset vector is there; and it must be place @0xEFFE... So I try doing this:

#ifndef __INCLUDE_BOOTLOADER__  VECTOR ADDRESS 0xFFFE  _Startup#else  VECTOR ADDRESS 0xEFFE  _Startup#endif

And it works.... but I've got some questions:


1) First of all... Is that correct? Because I thoguht that it will trow me and error because 0xEFFE is no a "VECTOR ADDRESS"


2) And that leads me to wonder... What does VECTOR ADDRESS mean or do?


3) And finally... Can I re-locate any function to be wherever I want in .prm file? I mean, can I put my_func at address 0xC582 be doing:VECTOR ADDRESS 0xC582 my_func


Thanks for reading, I hope you can "feed" my curiousity!