GD32F350 跳转IAP有读保护,看内存是没有安全防护的

[复制链接]
6687|8
 楼主| lixinzhunag 发表于 2025-1-6 16:41 | 显示全部楼层 |阅读模式
 楼主| lixinzhunag 发表于 2025-1-6 16:42 | 显示全部楼层

GD32F350 跳转IAP有读保护,看内存是没有安全防护的

 楼主| lixinzhunag 发表于 2025-1-6 17:01 | 显示全部楼层

GD32F350 跳转IAP有读保护,看内存是没有安全防护的

static void CheckIspMode(void)
{
    // enable peripheral clock of RTC
    RCU_REG_VAL(RCU_RTC) |= BIT(RCU_BIT_POS(RCU_RTC));

    if(RTC_BKP0 == INTO_IAP)
    {
        // enable peripheral clocks of RTC and PMU
        RCU_REG_VAL(RCU_PMU) |= BIT(RCU_BIT_POS(RCU_PMU));
        // enable backup domain write
        PMU_CTL |= PMU_CTL_BKPWEN;

        RTC_BKP0 = 0;

        __disable_irq();
        __set_PRIMASK(1);

        // 加个延时, 万一出现问题允许刚复位的时候SWD连接进来
        for (volatile int i = 0; i < 2000000; i++) {
            __NOP();
        }

        register void (*SysMemBootJump)(void);
        register uint32_t SysMemBootJumpAddr = *(uint32_t *)(0x1FFF0000 + 4);

        // 初始化堆栈指针
        __set_MSP(*(__IO uint32_t*)0x1FFF0000);

        SysMemBootJump = (void (*)(void))SysMemBootJumpAddr;
        // 跳转到系统存储器
        SysMemBootJump();

        while(1);
    }
}
zchong 发表于 2025-1-7 08:53 | 显示全部楼层
What are you talking about?
 楼主| lixinzhunag 发表于 2025-1-7 09:12 | 显示全部楼层
GigaDevice MCU ISP Programmer  使用这个软件进行下载的时候,出现读保护。
94651677c7ebdd6979.png
 楼主| lixinzhunag 发表于 2025-1-7 09:13 | 显示全部楼层
点击移除,会出现移除失败
xionghaoyun 发表于 2025-1-7 17:26 | 显示全部楼层
你勾选了下载保护
 楼主| lixinzhunag 发表于 2025-1-7 21:23 | 显示全部楼层
xionghaoyun 发表于 2025-1-7 17:26
你勾选了下载保护

没有勾选, 我读内存也是没有开启保护, 不知道怎么回事
17101797897 发表于 2025-1-10 14:56 | 显示全部楼层

GD32F350 跳转IAP有读保护,看内存是没有安全防护的

感谢分享
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

7

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部