/* * Copyright (c) 2022 YuLong Yao * SPDX-License-Identifier: Apache-2.0 */ #include #include #include /* initial ecc memory */ void z_arm_platform_init(void) { register unsigned r0 __asm("r0") = DT_REG_ADDR(DT_CHOSEN(zephyr_sram)); register unsigned r1 __asm("r1") = DT_REG_ADDR(DT_CHOSEN(zephyr_sram)) + DT_REG_SIZE(DT_CHOSEN(zephyr_sram)); for (; r0 < r1; r0 += 4) { *(unsigned int *)r0 = 0; } } static int gd32a50x_soc_init(void) { SystemInit(); return 0; } SYS_INIT(gd32a50x_soc_init, PRE_KERNEL_1, 0);