File tree Expand file tree Collapse file tree 5 files changed +33
-3
lines changed
Expand file tree Collapse file tree 5 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -781,5 +781,9 @@ ifeq ($(DEBUG_UART),1)
781781 CFLAGS+ =-DDEBUG_UART
782782endif
783783
784+ ifeq ($(NXP_CUSTOM_DCD ) ,1)
785+ CFLAGS+ =-DNXP_CUSTOM_DCD
786+ endif
787+
784788CFLAGS+ =-DWOLFBOOT_ARCH_$(ARCH )
785789CFLAGS+ =-DTARGET_$(TARGET )
Original file line number Diff line number Diff line change @@ -1164,6 +1164,20 @@ You can also get the SDK and CMSIS bundles using these repositories:
11641164* https://github.com/nxp-mcuxpresso/CMSIS_5
11651165Use MCUXSDK=1 with this option, since the pack paths are different.
11661166
1167+ ### Custom Device Configuration Data (DCD)
1168+
1169+ On iMX-RT10xx it is possible to load a custom DCD section from an external
1170+ source file. A customized DCD section should be declared within the ` .dcd_data `
1171+ section, e.g.:
1172+
1173+
1174+ ` const uint8_t __attribute__((section(".dcd_data"))) dcd_data[] = { /* ... */ }; `
1175+
1176+
1177+ If an external ` .dcd_data ` section is provided, the option ` NXP_CUSTOM_DCD=1 ` must
1178+ be added to the configuration.
1179+
1180+
11671181### Testing Update
11681182
11691183First make the update partition, pre-triggered for update
Original file line number Diff line number Diff line change @@ -568,14 +568,23 @@ const BOOT_DATA_T __attribute__((section(".boot_data"))) boot_data = {
568568 0xFFFFFFFF /* empty - extra data word */
569569};
570570
571- const uint8_t dcd_data [ 1 ] = { 0 };
571+
572572extern void isr_reset (void );
573+ extern const uint32_t __dcd_data_start ;
574+ const uint32_t dcd_data_addr = (uint32_t ) & __dcd_data_start ;
575+
576+ #ifndef NXP_CUSTOM_DCD
577+ /* If a DCD section is populated, it should be mapped to the .dcd_data section.
578+ * By default, provide an empty section.
579+ */
580+ const uint8_t __attribute__((section (".dcd_data" ))) dcd_data [sizeof (uint32_t )] = { 0 };
581+ #endif
573582
574583const ivt __attribute__((section (".image_vt" ))) image_vector_table = {
575584 IVT_HEADER , /* IVT Header */
576585 (uint32_t )isr_reset , /* Image Entry Function */
577586 IVT_RSVD , /* Reserved = 0 */
578- (uint32_t )dcd_data , /* Address where DCD information is stored */
587+ (uint32_t )dcd_data_addr , /* Address where DCD information is stored */
579588 (uint32_t )& boot_data , /* Address where BOOT Data Structure is stored */
580589 (uint32_t )& image_vector_table , /* Pointer to IVT Self (absolute address */
581590 (uint32_t )CSF_ADDRESS , /* Address where CSF file is stored */
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ SECTIONS
1515 . = ORIGIN (FLASH) + 0x1000 ;
1616 KEEP (*(.image_vt ))
1717 KEEP (*(.boot_data ))
18+ __dcd_data_start = .;
1819 KEEP (*(.dcd_data ))
1920 . = ORIGIN (FLASH) + 0x2000 ;
2021 KEEP (*(.isr_vector ))
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ ifeq ($(ARCH),)
1010 MCUXPRESSO_DRIVERS? =$(MCUXPRESSO ) /devices/MK64F12
1111 MCUXPRESSO_CMSIS? =$(PWD ) /CMSIS_5/CMSIS
1212 FREEDOM_E_SDK? =$(HOME ) /src/freedom-e-sdk
13+ NXP_CUSTOM_DCD =0
1314 STM32CUBE? =$(HOME ) /STM32Cube/Repository/STM32Cube_FW_WB_V1.3.0
1415 CYPRESS_PDL? =$(HOME ) /src/psoc6pdl
1516 CYPRESS_TARGET_LIB? =$(HOME ) /src/TARGET_CY8CKIT-062S2-43012
@@ -95,4 +96,5 @@ CONFIG_VARS:= ARCH TARGET SIGN HASH MCUXSDK MCUXPRESSO MCUXPRESSO_CPU MCUXPRESSO
9596 LMS_LEVELS LMS_HEIGHT LMS_WINTERNITZ \
9697 WOLFBOOT_UNIVERSAL_KEYSTORE \
9798 XMSS_PARAMS \
98- ELF
99+ ELF \
100+ NXP_CUSTOM_DCD
You can’t perform that action at this time.
0 commit comments