Skip to content

Commit 2a3f33d

Browse files
committed
Compilation fix for MIMXRT reset
Only include `validate_bin_nvic` in projects with i.MX RT target
1 parent 34f4d24 commit 2a3f33d

File tree

6 files changed

+9
-0
lines changed

6 files changed

+9
-0
lines changed

records/board/mimxrt1020_evk_qspi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
common:
22
macros:
3+
- DAPLINK_MIMXRT_TARGET
34
- SOFT_RESET=VECTRESET
45
sources:
56
board:

records/board/mimxrt1050_evk_hyper.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
common:
22
macros:
3+
- DAPLINK_MIMXRT_TARGET
34
- SOFT_RESET=VECTRESET
45
sources:
56
board:

records/board/mimxrt1050_evk_qspi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
common:
22
macros:
3+
- DAPLINK_MIMXRT_TARGET
34
- SOFT_RESET=VECTRESET
45
sources:
56
board:

records/board/mimxrt1060_evk_qspi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
common:
22
macros:
3+
- DAPLINK_MIMXRT_TARGET
34
- SOFT_RESET=VECTRESET
45
- SWO_UART=1
56
sources:

records/board/mimxrt1170_evk_qspi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
common:
22
macros:
3+
- DAPLINK_MIMXRT_TARGET
34
- SOFT_RESET=VECTRESET
45
- SWO_UART=1
56
sources:

source/family/freescale/target_reset_mimxrt.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ static void prerun_target_config(void)
4646
target_set_state(RESET_RUN);
4747
}
4848

49+
#ifdef DAPLINK_MIMXRT_TARGET
4950
static uint8_t validate_bin_nvic(const uint8_t *buf)
5051
{
5152
if(buf[0] == 'F' && buf[1] == 'C' && buf[2] == 'F' && buf[3] == 'B')
@@ -61,12 +62,15 @@ static uint8_t validate_bin_nvic(const uint8_t *buf)
6162

6263
return 0;
6364
}
65+
#endif
6466

6567
const target_family_descriptor_t g_nxp_mimxrt = {
6668
.family_id = kNXP_Mimxrt_FamilyID,
6769
.default_reset_type = kSoftwareReset,
6870
.soft_reset_type = VECTRESET,
6971
.target_before_init_debug = target_before_init_debug,
7072
.prerun_target_config = prerun_target_config,
73+
#ifdef DAPLINK_MIMXRT_TARGET
7174
.validate_bin_nvic = validate_bin_nvic,
75+
#endif
7276
};

0 commit comments

Comments
 (0)