Hello Champs
We have a very old codes which is using TMS470_414 tool chain. This codes is download via 3rd Part JTAG to internal SRAM. So The codes do verify the key function to make sure that it is good after downloading.
My question is: how can I know the value of the key function since we may need modify the key function for other usage. I know the data value of the function is either at obj or final .out file. But how to retrieve so that I can manually calculate the checksum.
Below is the pseudo codes
static void program_data_flash(void)
{
Code section
}
#pragma FUNC_EXT_CALLED(program_data_flash_end);
static void program_data_flash_end(void){}
#pragma TASK (main)
void main(void)
{
// Check that the program_data_flash() is valid and run it if it is
checksum = 0;
src_ptr = (Uint8*)&program_data_flash;
while (src_ptr < (Uint8*)program_data_flash_end)
{
checksum += *src_ptr++;
}
if (checksum == PROGRAM_DATA_FLASH)
{
program_data_flash();
}
else
{
//*((Uint32*)0x19808) = checksum;
failed();
}
}
Regards
Yihe