From 0acc73344a38cb04eb014bbf68aba31135ceff47 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Wed, 12 Apr 2023 16:58:56 +0200 Subject: [PATCH] mimxrt: Fix the build for boards without ROM API. --- ports/mimxrt/Makefile | 4 ++-- ports/mimxrt/modmachine.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/mimxrt/Makefile b/ports/mimxrt/Makefile index abde70f12c..4e4fd17528 100644 --- a/ports/mimxrt/Makefile +++ b/ports/mimxrt/Makefile @@ -136,7 +136,6 @@ SRC_HAL_IMX_C += \ $(MCU_DIR)/drivers/fsl_lpuart.c \ $(MCU_DIR)/drivers/fsl_pit.c \ $(MCU_DIR)/drivers/fsl_pwm.c \ - $(MCU_DIR)/drivers/fsl_romapi.c \ $(MCU_DIR)/drivers/fsl_sai.c \ $(MCU_DIR)/drivers/fsl_snvs_lp.c \ $(MCU_DIR)/drivers/fsl_wdog.c \ @@ -153,7 +152,8 @@ endif ifeq ($(MCU_SERIES),$(filter $(MCU_SERIES), MIMXRT1015 MIMXRT1021 MIMXRT1052 MIMXRT1062 MIMXRT1064 MIMXRT1176)) SRC_HAL_IMX_C += \ - $(MCU_DIR)/drivers/fsl_qtmr.c + $(MCU_DIR)/drivers/fsl_qtmr.c \ + $(MCU_DIR)/drivers/fsl_romapi.c endif ifeq ($(MCU_SERIES), MIMXRT1176) diff --git a/ports/mimxrt/modmachine.c b/ports/mimxrt/modmachine.c index 5c897578d4..049499cb2e 100644 --- a/ports/mimxrt/modmachine.c +++ b/ports/mimxrt/modmachine.c @@ -38,7 +38,9 @@ #include "pin.h" #include "modmachine.h" #include "fsl_wdog.h" +#if FSL_FEATURE_BOOT_ROM_HAS_ROMAPI #include "fsl_romapi.h" +#endif #if MICROPY_PY_MACHINE