Callisto4Bootloader: drivers/bootloader_config.h Source File

Callisto4Bootloader

bootloader_config.h
Go to the documentation of this file.
1 /*
2 * Copyright 2017-2019 NXP
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7 #ifndef __BOOTLOADER_CONFIG_H__
8 #define __BOOTLOADER_CONFIG_H__
9
11 // Definitions
13
14 //
15 // Bootloader configuration options
16 //
17
19
20
21 #define BL_FEATURE_ROM_UART_PORT (1)
22
23 // UART ports
24 #if !defined(BL_CONFIG_LPUART_1)
25 #define BL_CONFIG_LPUART_1 (BL_FEATURE_ROM_UART_PORT)
26 #define BL_FEATURE_UART_RX_PULLUP (1)
27 #endif
28
29 #define BL_CONFIG_LPUART (BL_CONFIG_LPUART_1)
30
31 #define BL_FEATURE_UID_IN_FUSE (1)
32
33 #define BL_FEATURE_GEN_KEYBLOB (1)
34 #define BL_FEATURE_KEYBLOB_BK_SIZE (16)
35
36 // USB HS port
37 #if !defined(BL_CONFIG_HS_USB_HID)
38 #define BL_CONFIG_HS_USB_HID (1) // i.MX RT Series only supoort HS USB
39 #endif
40
41
42 #if !defined(BL_TARGET_FLASH) && !defined(BL_TARGET_RAM)
43 #define BL_TARGET_FLASH (0)
44 #endif
45
46 // Internal Flash features
47 #define BL_FEATURE_HAS_NO_INTERNAL_FLASH (1)
48
49 #if !BL_FEATURE_HAS_NO_INTERNAL_FLASH
50 #if defined(BL_TARGET_RAM)
51 #define BL_FEATURE_FLASH_SECURITY (0)
52 #else
53 #define BL_FEATURE_FLASH_SECURITY (1)
54 #endif
55 #define BL_FEATURE_ERASEALL_UNSECURE (0)
56 #define BL_FEATURE_FLASH_VERIFY_DISABLE (0)
57 #endif // !BL_FEATURE_HAS_NO_INTERNAL_FLASH
58
59 #define BL_FEATURE_HAS_NO_READ_SOURCE (1)
60
61 #define BL_FEATURE_MIN_PROFILE (0)
62
63 #if !defined(BL_TARGET_RAM)
64 #define BL_FEATURE_CRC_CHECK (1)
65 #endif
66
67 #define BL_FEATURE_UART_AUTOBAUD_IRQ (1)
68
69 #define BL_FEATURE_FLASH_CHECK_CUMULATIVE_WRITE (1)
70
71 #define BL_FEATURE_FLEXSPI_NOR_MODULE (0)
72
73 #define BL_FEATURE_HAS_FLEXSPI_NOR_ROMAPI (1)
74
75 #if BL_FEATURE_FLEXSPI_NOR_MODULE
76 #if defined(BL_FEATURE_FLEXSPI_NOR_SIP)
77 #define BL_FEATURE_FLEXSPI_NOR_MODULE_PERIPHERAL_INSTANCE (1)
78 #define BL_FLEXSPI_AMBA_BASE (0x70000000u)
79 #else
80 #define BL_FEATURE_FLEXSPI_NOR_MODULE_PERIPHERAL_INSTANCE (get_flexspinor_instance())
81 #define BL_FLEXSPI_AMBA_BASE (get_flexspinor_amba_base())
82 #endif
83 #define BL_FEATURE_FLEXSPI_NOR_MODULE_ERASE_VERIFY (1)
84 #define BL_FEATURE_FLEXSPI_ENCRYPT_PROGRAMMING (1)
85 #define BL_PROT_REGION_BLOCK_OFFSET(i) (0x400u * (i + 1))
86
87 #endif // BL_FEATURE_FLEXSPI_NOR_MODULE
88
89 #define BL_FEATURE_SEMC_NOR_MODULE (1)
90
91 // Memory expansion features
92 #define BL_FEATURE_EXPAND_MEMORY (1)
93
94 #define BL_FEATURE_SPINAND_MODULE (1)
95
96 #if BL_FEATURE_SPINAND_MODULE
97 #if (!BL_FEATURE_EXPAND_MEMORY) && (BL_FEATURE_SPINAND_MODULE)
98 #error "BL_FEATURE_EXPAND_MEMORY" must be enabled to enable the SPI NAND feature.
99 #endif
100 #define BL_FEATURE_SPINAND_MODULE_ERASE_VERIFY (1)
101 #define BL_FEATURE_SPINAND_MODULE_PERIPHERAL_FLEXSPI (1)
102 #define BL_FEATURE_SPINAND_MODULE_PERIPHERAL_INSTANCE (0)
103 #endif // BL_FEATURE_SPINAND_MODULE
104
105 #define BL_FEATURE_MMC_MODULE (1)
106 #if BL_FEATURE_MMC_MODULE
107 #define BL_FEATURE_MMC_MODULE_ERASE_VERIFY (1)
108 #define BL_FEATURE_MMC_MODULE_PERIPHERAL_INSTANCE (2)
109 #define BL_FEATURE_MMC_MODULE_ENABLE_PERMANENT_CONFIG (0)
110 #endif // BL_FEATURE_MMC_MODULE
111
112 #define BL_FEATURE_SD_MODULE (1)
113 #if BL_FEATURE_SD_MODULE
114 #define BL_FEATURE_SD_MODULE_ERASE_VERIFY (1)
115 #define BL_FEATURE_SD_MODULE_PERIPHERAL_INSTANCE (1)
116 #endif // BL_FEATURE_SD_MODULE
117
118 #define BL_FEATURE_SEMC_NAND_MODULE (1)
119
120 #if BL_FEATURE_FLEXSPI_NOR_MODULE || BL_FEATURE_SPINAND_MODULE || BL_FEATURE_EMMC_MODULE || BL_FEATURE_SD_MODULE || \
121 BL_FEATURE_SEMC_NAND_MODULE
122 #if !BL_FEATURE_EXPAND_MEMORY
123 #if defined(BL_FEATURE_EXPAND_MEMORY)
124 #undef BL_FEATURE_EXPAND_MEMORY
125 #endif
126 #define BL_FEATURE_EXPAND_MEMORY (1)
127 #warning "BL_FEATURE_EXPAND_MEMORY" is enabled automatically to support none-XIP memory devices.
128 #endif // #if !BL_FEATURE_EXPAND_MEMORY
129 #define BL_FEATURE_EXTERNAL_MEMORY_PROPERTY (1)
130 #endif
131
132 #define BL_FEATURE_SPI_NOR_EEPROM_MODULE (1)
133 #if BL_FEATURE_SPI_NOR_EEPROM_MODULE
134 #define BL_FEATURE_SPI_NOR_EEPROM_MODULE_ERASE_VERIFY (1)
135 #endif // BL_FEATURE_SPI_NOR_EEPROM_MODULE
136
137 #define BL_FEATURE_OCOTP_MODULE (FSL_FEATURE_SOC_OCOTP_COUNT)
138
139 #define BL_FEATURE_EXPAND_PACKET_SIZE (1)
140 #define BL_EXPANDED_FRAMING_PACKET_SIZE (512)
141 // Make sure that BL_EXPANDED_USB_HID_PACKET_SIZE < 1018
142 #define BL_EXPANDED_USB_HID_PACKET_SIZE (1012)
143
144 // Bootloader peripheral detection default timeout in milliseconds
145 // After coming out of reset the bootloader will spin in a peripheral detection
146 // loop for this amount of time. A zero value means no time out.
147 #if DEBUG
148 #define BL_DEFAULT_PERIPHERAL_DETECT_TIMEOUT 0
149 #else
150 #define BL_DEFAULT_PERIPHERAL_DETECT_TIMEOUT 5000
151 #endif // DEBUG
152
153 // The bootloader will check this address for the application vector table upon startup.
154 #if !defined(BL_APP_VECTOR_TABLE_ADDRESS)
155 #define BL_APP_VECTOR_TABLE_ADDRESS 0xa000
156 #endif
157
158 #endif // __BOOTLOADER_CONFIG_H__
159 // EOF