I am working with a MC9S12XEP100 CAN bootloader project. After compiled the project I found the bootloader used two function, _COPY and _CASE_CHECKED_BYTE. These two functions are generated from rtshc12.c.o (ansixbi.lib). Because my bootloader uses these two functions. I can't erase the NON_BANKED segment, where these two functions located. Or my bootloader will die. That means I can't update the NON_BANKED segment.
I want to ask is there any way to avoid my bootloader using these two functions. In order to let me update NON_BANKED segment as well as user application.
Here's some segment of my project.
void CanStatusAck(UINT8 sta)
TxMsg.ID = UpLoadID;
TxMsg.DtLen = 1;
TxData = sta;
/*It looks like the _COPY function is called there*/
UINT8 CanTxFrame(CanMsg_t msg)
unsigned char send_buf, sp;
if(msg.DtLen > 8)
send_buf = 0;
CAN0TXIDR0 = (unsigned char)(msg.ID>>3);
CAN0TXIDR1 = (unsigned char)(msg.ID<<5);
for(sp = 0; sp < msg.DtLen; sp++)
*((&CAN0TXDSR0)+sp) = msg.data[sp];
CAN0TXDLR = msg.DtLen;
CAN0TFLG = send_buf;