WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
boot_init.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2021-2021. All rights reserved.
3 * Description: Common Boot for Standard Application Core
4 *
5 * Create: 2021-03-09
6 */
7
8#ifndef _BOOT_INIT_H_
9#define _BOOT_INIT_H_
10
11#include <stddef.h>
12
13#define FLASH_HEAD_ADDR 0x200000
14#define FLASH_MEM_SIZE 0x00400000
15
16#define FLASH_START 0x200000
17#define FLASH_LEN 0x800000 /* 8M */
18
19#define KERNEL_START_ADDR 0x90110000
20
21#define BOOT_HEAD_ADDR 0x200000
22#define LOAD_BOOT_ADDR 0xA20000
23
24#define BOOT_PORTING_RESET_REG 0x40002110
25#define BOOT_PORTING_RESET_VALUE 0x4
26
27#define RESET_COUNT_REG 0x40000008
28#define STATUS_DEBUG_REG_ADDR 0x44000014 // gp reg0
29
30#define HIBURN_CODELOADER_UART UART_BUS_0
31#define HIBURN_UART_TX CHIP_FIXED_TX_PIN // 当前驱动没有用到,只有检查
32#define HIBURN_UART_RX CHIP_FIXED_RX_PIN // 当前驱动没有用到,只有检查
33#define UART_ROMBOOT_INT_TIMEOUT_DEFAULT 32
34
35#define FLASHBOOT_MAX_SIZE 0x10000
36#define SRAM_START_ADDR 0x00100000 /* SRAM 起始地址 */
37#define LOADY_MAX_ADDR 0x1000000 /* loady 命令可存储的最大地址(不包括该地址) */
38
39#define RAM_MIN_ADDR BOOT_RAM_MIN /* SRAM 可设置的最小起始地址 */
40#define RAM_MAX_ADDR BOOT_RAM_MAX
41
42#define LOAD_MAX_RAM_ADDR (RAM_MAX_ADDR - 0x40)
43#define LOAD_MIN_SIZE 0x0 /* 0x40(sha256 header len) + 0x20(hash len) + 0x10(tail len) */
44#define LOAD_MAX_SIZE 0x1000000 /* 16M */
45
46#define RESET_DELAY_MS 100
47
48#define REPET_TIMES_2 2
49#define REPET_TIMES_3 3
50#define REBOOT_MAX_CNT 15
51#define BOOT_STEP 13
52
53typedef union {
54 struct {
55 uint32_t fota_fix_app_cnt : 4; /* fota修复app计数使用 */
56 uint32_t reset_cnt : 4; /* boot阶段软复位次数记录 */
57 uint32_t resv : 24;
58 } bits;
59
60 uint32_t u32;
62
63void start_fastboot(void);
64void irq_handler(void);
65
66#endif
void start_fastboot(void)
void irq_handler(void)
Definition boot_init.h:53
uint32_t reset_cnt
Definition boot_init.h:56
uint32_t resv
Definition boot_init.h:57
uint32_t u32
Definition boot_init.h:60
uint32_t fota_fix_app_cnt
Definition boot_init.h:55