Custom board build error (GD32F470_EVAL)

I solved it. The damn SysTick_Handler is called!
image

The cause of problem is that the VTOR(Vector Table Offset Register) is not initialized in the SystemInit().
I added definition and the code in the system_gd324xx.c

/* Vector Table base offset */
#define VECT_TAB_OFFSET  0x00                      /* This value must be a multiple of 0x200. */

void SystemInit(void) 
{
  ...
    system_clock_config();

#ifdef VECT_TAB_SRAM
    nvic_vector_table_set(NVIC_VECTTAB_RAM, VECT_TAB_OFFSET);
#else
    nvic_vector_table_set(NVIC_VECTTAB_FLASH, VECT_TAB_OFFSET);
#endif
  ...
}
1 Like