STM32H743的开发板移植了一个bootloader可以跳转到 0x08020000地址,打印以下内容后就卡死了
跳转代码
/*
Copyright (c) 2006-2018, RT-Thread Development Team
SPDX-License-Identifier: Apache-2.0
Change Logs:
Date Author Notes
2019-03-05 whj4674672 first version
/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#define IAP_FLASH_SIZE 0X20000
/ defined the LED0 pin: PB1 /
#define LED0_PIN GET_PIN(B, 1)
int main(void)
{
int count = 1;
/ set LED0 pin mode to output /
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (count++)
{
rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500);
rt_pin_write(LED0_PIN, PIN_LOW);
rt_thread_mdelay(500);
}
return RT_EOK;
}
#include "stm32h7xx.h"
static int vtor_config(void)
{
/ Vector Table Relocation in Internal QSPI_FLASH */
SCB->VTOR = FLASH_BASE | IAP_FLASH_SIZE;
return 0;
}
INIT_BOARD_EXPORT(vtor_config);
更多回帖