mirror of https://github.com/wolfSSL/wolfBoot.git
Added custom DCD for i.mx-RT10XX
parent
ee4a70f413
commit
0d614fc669
4
arch.mk
4
arch.mk
|
@ -781,5 +781,9 @@ ifeq ($(DEBUG_UART),1)
|
|||
CFLAGS+=-DDEBUG_UART
|
||||
endif
|
||||
|
||||
ifeq ($(NXP_CUSTOM_DCD),1)
|
||||
CFLAGS+=-DNXP_CUSTOM_DCD
|
||||
endif
|
||||
|
||||
CFLAGS+=-DWOLFBOOT_ARCH_$(ARCH)
|
||||
CFLAGS+=-DTARGET_$(TARGET)
|
||||
|
|
|
@ -1164,6 +1164,20 @@ You can also get the SDK and CMSIS bundles using these repositories:
|
|||
* https://github.com/nxp-mcuxpresso/CMSIS_5
|
||||
Use MCUXSDK=1 with this option, since the pack paths are different.
|
||||
|
||||
### Custom Device Configuration Data (DCD)
|
||||
|
||||
On iMX-RT10xx it is possible to load a custom DCD section from an external
|
||||
source file. A customized DCD section should be declared within the `.dcd_data`
|
||||
section, e.g.:
|
||||
|
||||
|
||||
`const uint8_t __attribute__((section(".dcd_data"))) dcd_data[] = { /* ... */ };`
|
||||
|
||||
|
||||
If an external `.dcd_data` section is provided, the option `NXP_CUSTOM_DCD=1` must
|
||||
be added to the configuration.
|
||||
|
||||
|
||||
### Testing Update
|
||||
|
||||
First make the update partition, pre-triggered for update
|
||||
|
|
13
hal/imx_rt.c
13
hal/imx_rt.c
|
@ -568,14 +568,23 @@ const BOOT_DATA_T __attribute__((section(".boot_data"))) boot_data = {
|
|||
0xFFFFFFFF /* empty - extra data word */
|
||||
};
|
||||
|
||||
const uint8_t dcd_data[1] = {0};
|
||||
|
||||
extern void isr_reset(void);
|
||||
extern const uint32_t __dcd_data_start;
|
||||
const uint32_t dcd_data_addr = (uint32_t) &__dcd_data_start;
|
||||
|
||||
#ifndef NXP_CUSTOM_DCD
|
||||
/* If a DCD section is populated, it should be mapped to the .dcd_data section.
|
||||
* By default, provide an empty section.
|
||||
*/
|
||||
const uint8_t __attribute__((section(".dcd_data"))) dcd_data[sizeof(uint32_t)] = { 0 };
|
||||
#endif
|
||||
|
||||
const ivt __attribute__((section(".image_vt"))) image_vector_table = {
|
||||
IVT_HEADER, /* IVT Header */
|
||||
(uint32_t)isr_reset, /* Image Entry Function */
|
||||
IVT_RSVD, /* Reserved = 0 */
|
||||
(uint32_t)dcd_data, /* Address where DCD information is stored */
|
||||
(uint32_t)dcd_data_addr, /* Address where DCD information is stored */
|
||||
(uint32_t)&boot_data, /* Address where BOOT Data Structure is stored */
|
||||
(uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */
|
||||
(uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */
|
||||
|
|
|
@ -15,6 +15,7 @@ SECTIONS
|
|||
. = ORIGIN(FLASH) + 0x1000;
|
||||
KEEP(*(.image_vt))
|
||||
KEEP(*(.boot_data))
|
||||
__dcd_data_start = .;
|
||||
KEEP(*(.dcd_data))
|
||||
. = ORIGIN(FLASH) + 0x2000;
|
||||
KEEP(*(.isr_vector))
|
||||
|
|
|
@ -10,6 +10,7 @@ ifeq ($(ARCH),)
|
|||
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MK64F12
|
||||
MCUXPRESSO_CMSIS?=$(PWD)/CMSIS_5/CMSIS
|
||||
FREEDOM_E_SDK?=$(HOME)/src/freedom-e-sdk
|
||||
NXP_CUSTOM_DCD=0
|
||||
STM32CUBE?=$(HOME)/STM32Cube/Repository/STM32Cube_FW_WB_V1.3.0
|
||||
CYPRESS_PDL?=$(HOME)/src/psoc6pdl
|
||||
CYPRESS_TARGET_LIB?=$(HOME)/src/TARGET_CY8CKIT-062S2-43012
|
||||
|
@ -95,4 +96,5 @@ CONFIG_VARS:= ARCH TARGET SIGN HASH MCUXSDK MCUXPRESSO MCUXPRESSO_CPU MCUXPRESSO
|
|||
LMS_LEVELS LMS_HEIGHT LMS_WINTERNITZ \
|
||||
WOLFBOOT_UNIVERSAL_KEYSTORE \
|
||||
XMSS_PARAMS \
|
||||
ELF
|
||||
ELF \
|
||||
NXP_CUSTOM_DCD
|
||||
|
|
Loading…
Reference in New Issue