On 12/8/2022 5:55 AM, David Sidrane wrote:
Is the NVIC_VTABLE repointed to the RAM vectors?
The RAM functions are like .bss: There is a storage area of code that that is copied into RAM only power up. But the symbols associated with the RAMFUNCs are defined by the linker script to be the address of the RAM destination, not the address of the FLASH copy-source storage area:
186 /* Copy any necessary code sections from FLASH to RAM. The correct 187 * destination in SRAM is geive by _sramfuncs and _eramfuncs. The 188 * temporary location is in flash after the data initialization code 189 * at _framfuncs. This should be done before sam_clockconfig() is 190 * called (in case it has some dependency on initialized C variables). 191 */ 192 193 #ifdef CONFIG_ARCH_RAMFUNCS 194 for (src = (const uint32_t *)_framfuncs, 195 dest = (uint32_t *)_sramfuncs; dest < (uint32_t *)_eramfuncs; 196 ) 197 { 198 *dest++ = *src++; 199 } 200 #endif