Vector table mapping

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DaSm_1109836
Level 2
Level 2
First like given 10 replies posted 10 sign-ins

I have followed the instructions in the following  link to stop the remapping of the vector table to RAM from FLASH. (By default, PSOC Creator remaps the vector table.) 

I need to do this because I have a requirement of performing a CRC checksum on the entirety of User Flash, including the first 192 bytes (the vector table). After following the instructions in the link, I can now perform a CRC check on the entirety of FLASH successfully, but there are 2 major issues that I need to solve, and any help would be appreciated.

https://community.infineon.com/t5/Knowledge-Base-Articles/Procedure-to-Fetch-Contents-from-Every-Fla...

1) This change to the code is made to "CM0Start.c". However, if one performs a clean and build, those changes are overwritten. I need to make this a permanent solution however, preferably in some project settings file, a custom C file or custom linker script.

2) When I follow the instructions as shown in the link, as soon as I enable global interrupts, the code enters the exception handler in CM0Start.c shown below. This does not happen when I allow the mapping of the vector table to RAM.

CY_NORETURN
CY_ISR(IntDefaultHandler)
{
/***************************************************************************
* We must not get here. If we do, a serious problem occurs, so go into
* an infinite loop.
***************************************************************************/

#if defined(__GNUC__)
if (errno == ENOMEM)
{
#ifdef CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK
CyBoot_IntDefaultHandler_Enomem_Exception_Callback();
#endif /* CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK */

while(1)
{
/* Out Of Heap Space
* This can be increased in the System tab of the Design Wide Resources.
*/
}
}
else
#endif
{
#ifdef CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK
CyBoot_IntDefaultHandler_Exception_EntryCallback();
#endif /* CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK */

while(1)
{

}
}
}

 

0 Likes
2 Replies
Gautami_12
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @DaSm_1109836 ,

Can you please let us know which version of ModusToolBox you are using and which device you are using to run this project?

Warm Regards,
Gautami J

0 Likes
Gautami_12
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @DaSm_1109836  ,

The thread was locked due to inactivity for long time, you can continue the discussion on the topic by opening a new thread with reference to the locked one. The continuous discussion in an inactive thread may mostly be unattended by community users.

Thanks and Regards,
Gautami J
Cypress Semiconductor Corporation
An Infineon Technologies Company

0 Likes