2022-06-19 17:00:38 -04:00
|
|
|
# =============================================================================
|
|
|
|
# Parameter Configuration
|
|
|
|
# =============================================================================
|
|
|
|
|
2020-01-20 06:25:51 -05:00
|
|
|
BOARD ?= TEENSY40
|
|
|
|
BOARD_DIR ?= boards/$(BOARD)
|
|
|
|
BUILD ?= build-$(BOARD)
|
2021-05-17 06:31:11 -04:00
|
|
|
PORT ?= /dev/ttyACM0
|
2020-01-20 06:25:51 -05:00
|
|
|
CROSS_COMPILE ?= arm-none-eabi-
|
2022-06-19 17:00:38 -04:00
|
|
|
GIT_SUBMODULES = lib/tinyusb lib/nxp_driver lib/lwip lib/mbedtls
|
2020-01-20 06:25:51 -05:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# MicroPython feature configurations
|
|
|
|
FROZEN_MANIFEST ?= boards/manifest.py
|
|
|
|
MICROPY_VFS_LFS2 ?= 1
|
|
|
|
MICROPY_VFS_FAT ?= 1
|
2020-01-20 06:25:51 -05:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# qstr definitions (must come before including py.mk)
|
|
|
|
QSTR_DEFS = qstrdefsport.h
|
|
|
|
QSTR_GLOBAL_DEPENDENCIES = $(BOARD_DIR)/mpconfigboard.h
|
2021-08-20 15:41:58 -04:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# Generation scripts
|
|
|
|
MAKE_PINS = boards/make-pins.py
|
|
|
|
MAKE_FLEXRAM_LD = boards/make-flexram-config.py
|
2021-08-20 15:41:58 -04:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# Include py make environment
|
|
|
|
include ../../py/mkenv.mk
|
2021-08-20 15:41:58 -04:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# Include micropython configuration board makefile
|
|
|
|
ifeq ($(wildcard $(BOARD_DIR)/.),)
|
|
|
|
$(error Invalid BOARD specified: $(BOARD_DIR))
|
2021-08-20 15:41:58 -04:00
|
|
|
endif
|
2022-06-19 17:00:38 -04:00
|
|
|
include $(BOARD_DIR)/mpconfigboard.mk
|
2021-05-07 03:42:26 -04:00
|
|
|
|
2020-01-20 06:25:51 -05:00
|
|
|
# Include py core make definitions
|
|
|
|
include $(TOP)/py/py.mk
|
2022-06-17 12:11:30 -04:00
|
|
|
include $(TOP)/extmod/extmod.mk
|
2020-01-20 06:25:51 -05:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# Set SDK directory based on MCU_SERIES
|
2020-01-20 06:25:51 -05:00
|
|
|
MCU_DIR = lib/nxp_driver/sdk/devices/$(MCU_SERIES)
|
2022-06-19 17:00:38 -04:00
|
|
|
|
|
|
|
# Select linker scripts based on MCU_SERIES
|
2021-08-20 15:41:58 -04:00
|
|
|
LD_FILES = boards/$(MCU_SERIES).ld boards/common.ld
|
2020-01-20 06:25:51 -05:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# Parameter configurations for generation
|
2020-08-21 10:03:21 -04:00
|
|
|
AF_FILE = boards/$(MCU_SERIES)_af.csv
|
2022-06-19 17:00:38 -04:00
|
|
|
BOARD_PINS = $(BOARD_DIR)/pins.csv
|
2020-08-21 10:03:21 -04:00
|
|
|
PREFIX_FILE = boards/mimxrt_prefix.c
|
2022-06-19 17:00:38 -04:00
|
|
|
GEN_FLEXRAM_CONFIG_SRC = $(BUILD)/flexram_config.s
|
2020-08-21 10:03:21 -04:00
|
|
|
GEN_PINS_AF_CONST = $(HEADER_BUILD)/pins_af_const.h
|
|
|
|
GEN_PINS_AF_PY = $(BUILD)/pins_af.py
|
2022-06-19 17:00:38 -04:00
|
|
|
GEN_PINS_HDR = $(HEADER_BUILD)/pins.h
|
|
|
|
GEN_PINS_QSTR = $(BUILD)/pins_qstr.h
|
|
|
|
GEN_PINS_SRC = $(BUILD)/pins_gen.c
|
2020-08-21 10:03:21 -04:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# =============================================================================
|
|
|
|
# Includes
|
|
|
|
# =============================================================================
|
2020-01-20 06:25:51 -05:00
|
|
|
|
|
|
|
INC += -I$(BOARD_DIR)
|
2021-08-01 05:20:39 -04:00
|
|
|
INC += -I$(BUILD)
|
|
|
|
INC += -I$(TOP)
|
2020-01-20 06:25:51 -05:00
|
|
|
INC += -I$(TOP)/$(MCU_DIR)
|
|
|
|
INC += -I$(TOP)/$(MCU_DIR)/drivers
|
2021-08-01 05:20:39 -04:00
|
|
|
INC += -I$(TOP)/lib/cmsis/inc
|
|
|
|
INC += -I$(TOP)/lib/oofatfs
|
2020-01-20 06:25:51 -05:00
|
|
|
INC += -I$(TOP)/lib/tinyusb/hw
|
|
|
|
INC += -I$(TOP)/lib/tinyusb/hw/bsp/teensy_40
|
2021-08-01 05:20:39 -04:00
|
|
|
INC += -I$(TOP)/lib/tinyusb/src
|
2022-06-19 17:00:38 -04:00
|
|
|
INC += -I.
|
|
|
|
INC += -Ihal
|
2020-01-20 06:25:51 -05:00
|
|
|
|
2021-07-03 12:39:17 -04:00
|
|
|
# All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
|
|
|
|
ifeq ($(MICROPY_PY_LWIP), 1)
|
|
|
|
INC += -Ilwip_inc
|
|
|
|
INC += -Ihal/phy
|
|
|
|
endif
|
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# =============================================================================
|
|
|
|
# Sources
|
|
|
|
# =============================================================================
|
|
|
|
|
2020-01-20 06:25:51 -05:00
|
|
|
# TinyUSB Stack source
|
|
|
|
SRC_TINYUSB_C += \
|
|
|
|
lib/tinyusb/src/class/cdc/cdc_device.c \
|
|
|
|
lib/tinyusb/src/class/dfu/dfu_rt_device.c \
|
|
|
|
lib/tinyusb/src/class/hid/hid_device.c \
|
|
|
|
lib/tinyusb/src/class/midi/midi_device.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
lib/tinyusb/src/class/msc/msc_device.c \
|
2020-01-20 06:25:51 -05:00
|
|
|
lib/tinyusb/src/class/usbtmc/usbtmc_device.c \
|
|
|
|
lib/tinyusb/src/class/vendor/vendor_device.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
lib/tinyusb/src/common/tusb_fifo.c \
|
|
|
|
lib/tinyusb/src/device/usbd.c \
|
|
|
|
lib/tinyusb/src/device/usbd_control.c \
|
|
|
|
lib/tinyusb/src/portable/nxp/transdimension/dcd_transdimension.c \
|
|
|
|
lib/tinyusb/src/tusb.c
|
2020-01-20 06:25:51 -05:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
|
|
|
|
ifeq ($(MICROPY_PY_LWIP), 1)
|
|
|
|
SRC_MOD := $(filter-out %/mbedtls/library/error.c, $(SRC_MOD))
|
|
|
|
SRC_ETH_C += \
|
|
|
|
$(MCU_DIR)/drivers/fsl_enet.c \
|
|
|
|
hal/phy/device/phydp83825/fsl_phydp83825.c \
|
|
|
|
hal/phy/device/phydp83848/fsl_phydp83848.c \
|
|
|
|
hal/phy/device/phyksz8081/fsl_phyksz8081.c \
|
|
|
|
hal/phy/device/phylan8720/fsl_phylan8720.c \
|
|
|
|
hal/phy/mdio/enet/fsl_enet_mdio.c \
|
|
|
|
lib/mbedtls_errors/mp_mbedtls_errors.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
# NXP SDK sources
|
2021-04-24 15:34:07 -04:00
|
|
|
SRC_HAL_IMX_C += \
|
|
|
|
$(MCU_DIR)/drivers/fsl_adc.c \
|
2021-06-09 04:47:18 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_cache.c \
|
2020-01-20 06:25:51 -05:00
|
|
|
$(MCU_DIR)/drivers/fsl_clock.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_common.c \
|
2021-06-09 04:47:18 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_dmamux.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_edma.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_flexram.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_flexspi.c \
|
2020-01-20 06:25:51 -05:00
|
|
|
$(MCU_DIR)/drivers/fsl_gpio.c \
|
2021-05-15 23:27:54 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_gpt.c \
|
2021-06-19 16:09:40 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_lpi2c.c \
|
2021-06-09 04:47:18 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_lpspi.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_lpspi_edma.c \
|
2020-01-20 06:25:51 -05:00
|
|
|
$(MCU_DIR)/drivers/fsl_lpuart.c \
|
2021-05-18 11:27:00 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_pit.c \
|
mimxrt: Support PWM using the FLEXPWM and QTMR modules.
Frequency range 15Hz/18Hz to > 1 MHz, with decreasing resolution of the
duty cycle. The basic API is supported as documentated, except that
keyword parameters are accepted for both the instatiaton and the
PWM.init() call.
Extensions: support PWM for channel pairs. Channel pairs are declared by
supplying 2-element tuples for the pins. The two channels of a pair must
be the A/B channel of a FLEXPWM module. These form than a complementary
pair.
Additional supported keyword arguments:
- center=value Defines the center position of a pulse within the pulse
cycle. The align keyword is actually shortcut for center.
- sync=True|False: If set to True, the channels will be synchronized to a
submodule 0 channel, which has already to be enabled.
- align=PWM.MIDDLE | PMW.BEGIN | PWM.END. It defines, whether synchronized
channels are Center-Aligned or Edge-aligned. The channels must be either
complementary a channel pair or a group of synchronized channels. It may
as well be applied to a single channel, but withiout any benefit.
- invert= 0..3. Controls ouput inversion of the pins. Bit 0 controls the
first pin, bit 1 the second.
- deadtime=time_ns time of complementary channels for delaying the rising
slope.
- xor=0|1|2 xor causes the output of channel A and B to be xored. If
applied to a X channel, it shows the value oif A ^ B. If applied to an A
or B channel, both channel show the xored signal for xor=1. For xor=2,
the xored signal is split between channels A and B. See also the
Reference Manual, chapter about double pulses. The behavior of xor=2 can
also be achieved using the center method for locating a pulse within a
clock period.
The output is enabled for board pins only.
CPU pins may still be used for FLEXPWM, e.g. as sync source, but the signal
will not be routed to the output. That applies only to FLEXPWM pins. The
use of QTMR pins which are not board pins will be rejected.
As part of this commit, the _WFE() statement is removed from
ticks_delay_us64() to prevent PWM glitching during calls to sleep().
2021-07-26 06:48:25 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_pwm.c \
|
2021-11-29 12:50:34 -05:00
|
|
|
$(MCU_DIR)/drivers/fsl_sai.c \
|
mimxrt/machine_rtc: Add the RTC class to the machine module.
Initial version, using the LP RTC clock. It provides setting the date and
time with rtc.init() or rtc.datetime(), and reading the date and time with
rtc.datetime() or rtc.now(). The method weekday() reports the weekday of
the current date. It starts with 0 for Monday.
The tuple order for datetime() and now() matches the CPython sequence:
(year, month, day, hour, minute, second, microsecond, TZ). TZ is ignored
and reported as None. Microsecond is provided at a best effort.
If a battery is not supplied, the default boot date/time is 1970/1/1 0:0:0.
With a battery, the clock continues to run even when the board is not
powered. The clock is quite precise. If not, using rtc.calibration() may
help.
2021-05-20 10:16:25 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_snvs_lp.c \
|
2021-05-07 09:21:09 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_trng.c \
|
2021-09-12 10:44:24 -04:00
|
|
|
$(MCU_DIR)/drivers/fsl_wdog.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
$(MCU_DIR)/system_$(MCU_SERIES).c \
|
|
|
|
$(MCU_DIR)/xip/fsl_flexspi_nor_boot.c \
|
|
|
|
|
2021-08-20 15:41:58 -04:00
|
|
|
ifeq ($(MICROPY_HW_SDRAM_AVAIL), 1)
|
|
|
|
SRC_HAL_IMX_C += $(MCU_DIR)/drivers/fsl_semc.c
|
|
|
|
endif
|
|
|
|
|
2021-08-01 05:20:39 -04:00
|
|
|
ifeq ($(MICROPY_PY_MACHINE_SDCARD),1)
|
|
|
|
SRC_HAL_IMX_C += $(MCU_DIR)/drivers/fsl_usdhc.c
|
|
|
|
endif
|
2020-01-20 06:25:51 -05:00
|
|
|
|
mimxrt: Support PWM using the FLEXPWM and QTMR modules.
Frequency range 15Hz/18Hz to > 1 MHz, with decreasing resolution of the
duty cycle. The basic API is supported as documentated, except that
keyword parameters are accepted for both the instatiaton and the
PWM.init() call.
Extensions: support PWM for channel pairs. Channel pairs are declared by
supplying 2-element tuples for the pins. The two channels of a pair must
be the A/B channel of a FLEXPWM module. These form than a complementary
pair.
Additional supported keyword arguments:
- center=value Defines the center position of a pulse within the pulse
cycle. The align keyword is actually shortcut for center.
- sync=True|False: If set to True, the channels will be synchronized to a
submodule 0 channel, which has already to be enabled.
- align=PWM.MIDDLE | PMW.BEGIN | PWM.END. It defines, whether synchronized
channels are Center-Aligned or Edge-aligned. The channels must be either
complementary a channel pair or a group of synchronized channels. It may
as well be applied to a single channel, but withiout any benefit.
- invert= 0..3. Controls ouput inversion of the pins. Bit 0 controls the
first pin, bit 1 the second.
- deadtime=time_ns time of complementary channels for delaying the rising
slope.
- xor=0|1|2 xor causes the output of channel A and B to be xored. If
applied to a X channel, it shows the value oif A ^ B. If applied to an A
or B channel, both channel show the xored signal for xor=1. For xor=2,
the xored signal is split between channels A and B. See also the
Reference Manual, chapter about double pulses. The behavior of xor=2 can
also be achieved using the center method for locating a pulse within a
clock period.
The output is enabled for board pins only.
CPU pins may still be used for FLEXPWM, e.g. as sync source, but the signal
will not be routed to the output. That applies only to FLEXPWM pins. The
use of QTMR pins which are not board pins will be rejected.
As part of this commit, the _WFE() statement is removed from
ticks_delay_us64() to prevent PWM glitching during calls to sleep().
2021-07-26 06:48:25 -04:00
|
|
|
ifeq ($(MCU_SERIES),$(filter $(MCU_SERIES), MIMXRT1015 MIMXRT1021 MIMXRT1052 MIMXRT1062 MIMXRT1064))
|
|
|
|
SRC_HAL_IMX_C += \
|
|
|
|
$(MCU_DIR)/drivers/fsl_qtmr.c
|
|
|
|
endif
|
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# C source files
|
2021-07-20 02:18:18 -04:00
|
|
|
SRC_C += \
|
2020-01-20 06:25:51 -05:00
|
|
|
board_init.c \
|
2022-01-01 08:00:37 -05:00
|
|
|
boards/$(MCU_SERIES)_clock_config.c \
|
2021-11-29 12:50:34 -05:00
|
|
|
dma_manager.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
drivers/bus/softspi.c \
|
2021-06-19 05:00:55 -04:00
|
|
|
drivers/dht/dht.c \
|
2021-07-03 12:39:17 -04:00
|
|
|
eth.c \
|
|
|
|
extmod/modnetwork.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
extmod/modonewire.c \
|
2021-07-03 12:39:17 -04:00
|
|
|
extmod/modusocket.c \
|
|
|
|
extmod/uos_dupterm.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
fatfs_port.c \
|
mimxrt: Support PWM using the FLEXPWM and QTMR modules.
Frequency range 15Hz/18Hz to > 1 MHz, with decreasing resolution of the
duty cycle. The basic API is supported as documentated, except that
keyword parameters are accepted for both the instatiaton and the
PWM.init() call.
Extensions: support PWM for channel pairs. Channel pairs are declared by
supplying 2-element tuples for the pins. The two channels of a pair must
be the A/B channel of a FLEXPWM module. These form than a complementary
pair.
Additional supported keyword arguments:
- center=value Defines the center position of a pulse within the pulse
cycle. The align keyword is actually shortcut for center.
- sync=True|False: If set to True, the channels will be synchronized to a
submodule 0 channel, which has already to be enabled.
- align=PWM.MIDDLE | PMW.BEGIN | PWM.END. It defines, whether synchronized
channels are Center-Aligned or Edge-aligned. The channels must be either
complementary a channel pair or a group of synchronized channels. It may
as well be applied to a single channel, but withiout any benefit.
- invert= 0..3. Controls ouput inversion of the pins. Bit 0 controls the
first pin, bit 1 the second.
- deadtime=time_ns time of complementary channels for delaying the rising
slope.
- xor=0|1|2 xor causes the output of channel A and B to be xored. If
applied to a X channel, it shows the value oif A ^ B. If applied to an A
or B channel, both channel show the xored signal for xor=1. For xor=2,
the xored signal is split between channels A and B. See also the
Reference Manual, chapter about double pulses. The behavior of xor=2 can
also be achieved using the center method for locating a pulse within a
clock period.
The output is enabled for board pins only.
CPU pins may still be used for FLEXPWM, e.g. as sync source, but the signal
will not be routed to the output. That applies only to FLEXPWM pins. The
use of QTMR pins which are not board pins will be rejected.
As part of this commit, the _WFE() statement is removed from
ticks_delay_us64() to prevent PWM glitching during calls to sleep().
2021-07-26 06:48:25 -04:00
|
|
|
hal/pwm_backport.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
led.c \
|
2021-04-24 15:34:07 -04:00
|
|
|
machine_adc.c \
|
2021-08-19 16:00:38 -04:00
|
|
|
machine_bitstream.c \
|
2021-06-19 16:09:40 -04:00
|
|
|
machine_i2c.c \
|
2021-11-29 12:50:34 -05:00
|
|
|
machine_i2s.c \
|
2020-04-12 16:00:06 -04:00
|
|
|
machine_led.c \
|
2020-08-21 10:03:21 -04:00
|
|
|
machine_pin.c \
|
mimxrt/machine_rtc: Add the RTC class to the machine module.
Initial version, using the LP RTC clock. It provides setting the date and
time with rtc.init() or rtc.datetime(), and reading the date and time with
rtc.datetime() or rtc.now(). The method weekday() reports the weekday of
the current date. It starts with 0 for Monday.
The tuple order for datetime() and now() matches the CPython sequence:
(year, month, day, hour, minute, second, microsecond, TZ). TZ is ignored
and reported as None. Microsecond is provided at a best effort.
If a battery is not supplied, the default boot date/time is 1970/1/1 0:0:0.
With a battery, the clock continues to run even when the board is not
powered. The clock is quite precise. If not, using rtc.calibration() may
help.
2021-05-20 10:16:25 -04:00
|
|
|
machine_rtc.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
machine_sdcard.c \
|
2021-06-09 04:47:18 -04:00
|
|
|
machine_spi.c \
|
2021-05-18 11:27:00 -04:00
|
|
|
machine_timer.c \
|
2021-05-30 12:18:33 -04:00
|
|
|
machine_uart.c \
|
2021-09-12 10:44:24 -04:00
|
|
|
machine_wdt.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
main.c \
|
2021-07-03 12:39:17 -04:00
|
|
|
mbedtls/mbedtls_port.c \
|
2021-05-07 09:21:09 -04:00
|
|
|
mimxrt_flash.c \
|
2021-08-20 15:41:58 -04:00
|
|
|
mimxrt_sdram.c \
|
2020-01-20 06:25:51 -05:00
|
|
|
modmachine.c \
|
2021-05-07 09:21:09 -04:00
|
|
|
modmimxrt.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
modutime.c \
|
2020-01-20 06:25:51 -05:00
|
|
|
mphalport.c \
|
2021-07-03 12:39:17 -04:00
|
|
|
mpnetworkport.c \
|
|
|
|
network_lan.c \
|
|
|
|
pendsv.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
pin.c \
|
|
|
|
sdcard.c \
|
2021-07-09 00:19:15 -04:00
|
|
|
shared/libc/printf.c \
|
|
|
|
shared/libc/string0.c \
|
2022-06-19 17:00:38 -04:00
|
|
|
shared/netutils/dhcpserver.c \
|
2021-07-03 12:39:17 -04:00
|
|
|
shared/netutils/netutils.c \
|
|
|
|
shared/netutils/trace.c \
|
2021-07-09 00:19:15 -04:00
|
|
|
shared/readline/readline.c \
|
|
|
|
shared/runtime/gchelper_native.c \
|
2022-03-27 02:50:34 -04:00
|
|
|
shared/runtime/interrupt_char.c \
|
2021-07-09 00:19:15 -04:00
|
|
|
shared/runtime/mpirq.c \
|
|
|
|
shared/runtime/pyexec.c \
|
|
|
|
shared/runtime/stdout_helpers.c \
|
|
|
|
shared/runtime/sys_stdio_mphal.c \
|
|
|
|
shared/timeutils/timeutils.c \
|
2021-07-03 12:39:17 -04:00
|
|
|
systick.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
ticks.c \
|
|
|
|
tusb_port.c \
|
2020-01-20 06:25:51 -05:00
|
|
|
$(SRC_TINYUSB_C) \
|
2021-04-24 15:34:07 -04:00
|
|
|
$(SRC_HAL_IMX_C) \
|
2021-07-03 12:39:17 -04:00
|
|
|
$(SRC_ETH_C) \
|
|
|
|
|
2022-01-25 15:13:37 -05:00
|
|
|
ifeq ($(MICROPY_HW_FLASH_TYPE), qspi_nor)
|
|
|
|
SRC_C += hal/flexspi_nor_flash.c
|
|
|
|
|
2021-12-17 10:29:26 -05:00
|
|
|
ifeq ($(MICROPY_HW_BOARD_FLASH_FILES), 1)
|
2022-01-25 15:13:37 -05:00
|
|
|
SRC_C += $(BOARD_DIR)/qspi_nor_flash_config.c
|
|
|
|
else
|
|
|
|
SRC_C += hal/qspi_nor_flash_config.c
|
2022-06-19 17:00:38 -04:00
|
|
|
endif # qspi_nor
|
2022-01-25 15:13:37 -05:00
|
|
|
#
|
|
|
|
else ifeq ($(MICROPY_HW_FLASH_TYPE), hyperflash)
|
|
|
|
SRC_C += hal/flexspi_hyper_flash.c
|
2021-12-17 10:29:26 -05:00
|
|
|
|
2022-01-25 15:13:37 -05:00
|
|
|
ifeq ($(MICROPY_HW_BOARD_FLASH_FILES), 1)
|
|
|
|
SRC_C += $(BOARD_DIR)/qspi_hyper_flash_config.c
|
2021-12-17 10:29:26 -05:00
|
|
|
else
|
2022-01-25 15:13:37 -05:00
|
|
|
SRC_C += hal/qspi_hyper_flash_config.c
|
2022-06-19 17:00:38 -04:00
|
|
|
endif # hyperflash
|
2022-01-25 15:13:37 -05:00
|
|
|
#
|
|
|
|
else
|
|
|
|
$(error Error: Unknown board flash type $(MICROPY_HW_FLASH_TYPE))
|
2021-08-20 15:41:58 -04:00
|
|
|
endif
|
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# Math library source files
|
2021-05-26 05:29:34 -04:00
|
|
|
ifeq ($(MICROPY_FLOAT_IMPL),double)
|
|
|
|
LIBM_SRC_C += $(addprefix lib/libm_dbl/,\
|
|
|
|
__cos.c \
|
|
|
|
__expo2.c \
|
|
|
|
__fpclassify.c \
|
|
|
|
__rem_pio2.c \
|
|
|
|
__rem_pio2_large.c \
|
|
|
|
__signbit.c \
|
|
|
|
__sin.c \
|
|
|
|
__tan.c \
|
|
|
|
acos.c \
|
|
|
|
acosh.c \
|
|
|
|
asin.c \
|
|
|
|
asinh.c \
|
|
|
|
atan.c \
|
|
|
|
atan2.c \
|
|
|
|
atanh.c \
|
|
|
|
ceil.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
copysign.c \
|
2021-05-26 05:29:34 -04:00
|
|
|
cos.c \
|
|
|
|
cosh.c \
|
|
|
|
erf.c \
|
|
|
|
exp.c \
|
|
|
|
expm1.c \
|
|
|
|
floor.c \
|
|
|
|
fmod.c \
|
|
|
|
frexp.c \
|
|
|
|
ldexp.c \
|
|
|
|
lgamma.c \
|
|
|
|
log.c \
|
|
|
|
log10.c \
|
|
|
|
log1p.c \
|
|
|
|
modf.c \
|
|
|
|
nearbyint.c \
|
|
|
|
pow.c \
|
|
|
|
rint.c \
|
|
|
|
round.c \
|
|
|
|
scalbn.c \
|
|
|
|
sin.c \
|
|
|
|
sinh.c \
|
|
|
|
tan.c \
|
|
|
|
tanh.c \
|
|
|
|
tgamma.c \
|
|
|
|
trunc.c \
|
|
|
|
)
|
|
|
|
ifeq ($(SUPPORTS_HARDWARE_FP_DOUBLE),1)
|
|
|
|
LIBM_SRC_C += lib/libm_dbl/thumb_vfp_sqrt.c
|
|
|
|
else
|
|
|
|
LIBM_SRC_C += lib/libm_dbl/sqrt.c
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
LIBM_SRC_C += $(addprefix lib/libm/,\
|
|
|
|
acoshf.c \
|
|
|
|
asinfacosf.c \
|
|
|
|
asinhf.c \
|
|
|
|
atan2f.c \
|
|
|
|
atanf.c \
|
|
|
|
atanhf.c \
|
|
|
|
ef_rem_pio2.c \
|
|
|
|
erf_lgamma.c \
|
|
|
|
fmodf.c \
|
|
|
|
kf_cos.c \
|
|
|
|
kf_rem_pio2.c \
|
|
|
|
kf_sin.c \
|
|
|
|
kf_tan.c \
|
|
|
|
log1pf.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
math.c \
|
2021-05-26 05:29:34 -04:00
|
|
|
nearbyintf.c \
|
|
|
|
roundf.c \
|
|
|
|
sf_cos.c \
|
|
|
|
sf_erf.c \
|
|
|
|
sf_frexp.c \
|
|
|
|
sf_ldexp.c \
|
|
|
|
sf_modf.c \
|
|
|
|
sf_sin.c \
|
|
|
|
sf_tan.c \
|
|
|
|
wf_lgamma.c \
|
|
|
|
wf_tgamma.c \
|
|
|
|
)
|
|
|
|
ifeq ($(SUPPORTS_HARDWARE_FP_SINGLE),1)
|
|
|
|
LIBM_SRC_C += lib/libm/thumb_vfp_sqrtf.c
|
|
|
|
else
|
|
|
|
LIBM_SRC_C += lib/libm/ef_sqrt.c
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# Reset variables
|
|
|
|
SUPPORTS_HARDWARE_FP_SINGLE = 0
|
|
|
|
SUPPORTS_HARDWARE_FP_DOUBLE = 0
|
2021-05-26 05:29:34 -04:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# Assembly source files
|
2021-08-20 15:41:58 -04:00
|
|
|
SRC_SS = \
|
|
|
|
$(MCU_DIR)/gcc/startup_$(MCU_SERIES).S \
|
|
|
|
hal/resethandler_MIMXRT10xx.S
|
2020-01-20 06:25:51 -05:00
|
|
|
|
2021-08-01 05:20:39 -04:00
|
|
|
SRC_S += shared/runtime/gchelper_m3.s \
|
2020-01-20 06:25:51 -05:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# =============================================================================
|
|
|
|
# QSTR Sources
|
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
# All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
|
|
|
|
ifeq ($(MICROPY_PY_LWIP), 1)
|
|
|
|
SRC_QSTR += \
|
|
|
|
extmod/modlwip.c \
|
|
|
|
extmod/modnetwork.c \
|
|
|
|
extmod/modusocket.c \
|
|
|
|
extmod/moduwebsocket.c \
|
|
|
|
network_lan.c
|
|
|
|
endif
|
|
|
|
|
2020-01-20 06:25:51 -05:00
|
|
|
# List of sources for qstr extraction
|
2020-04-12 16:00:06 -04:00
|
|
|
SRC_QSTR += \
|
2021-08-01 05:20:39 -04:00
|
|
|
extmod/modonewire.c \
|
2021-07-03 12:39:17 -04:00
|
|
|
extmod/uos_dupterm.c \
|
2021-04-24 15:34:07 -04:00
|
|
|
machine_adc.c \
|
2021-11-29 12:50:34 -05:00
|
|
|
machine_i2s.c \
|
2020-04-12 16:00:06 -04:00
|
|
|
machine_led.c \
|
2020-08-21 10:03:21 -04:00
|
|
|
machine_pin.c \
|
mimxrt: Support PWM using the FLEXPWM and QTMR modules.
Frequency range 15Hz/18Hz to > 1 MHz, with decreasing resolution of the
duty cycle. The basic API is supported as documentated, except that
keyword parameters are accepted for both the instatiaton and the
PWM.init() call.
Extensions: support PWM for channel pairs. Channel pairs are declared by
supplying 2-element tuples for the pins. The two channels of a pair must
be the A/B channel of a FLEXPWM module. These form than a complementary
pair.
Additional supported keyword arguments:
- center=value Defines the center position of a pulse within the pulse
cycle. The align keyword is actually shortcut for center.
- sync=True|False: If set to True, the channels will be synchronized to a
submodule 0 channel, which has already to be enabled.
- align=PWM.MIDDLE | PMW.BEGIN | PWM.END. It defines, whether synchronized
channels are Center-Aligned or Edge-aligned. The channels must be either
complementary a channel pair or a group of synchronized channels. It may
as well be applied to a single channel, but withiout any benefit.
- invert= 0..3. Controls ouput inversion of the pins. Bit 0 controls the
first pin, bit 1 the second.
- deadtime=time_ns time of complementary channels for delaying the rising
slope.
- xor=0|1|2 xor causes the output of channel A and B to be xored. If
applied to a X channel, it shows the value oif A ^ B. If applied to an A
or B channel, both channel show the xored signal for xor=1. For xor=2,
the xored signal is split between channels A and B. See also the
Reference Manual, chapter about double pulses. The behavior of xor=2 can
also be achieved using the center method for locating a pulse within a
clock period.
The output is enabled for board pins only.
CPU pins may still be used for FLEXPWM, e.g. as sync source, but the signal
will not be routed to the output. That applies only to FLEXPWM pins. The
use of QTMR pins which are not board pins will be rejected.
As part of this commit, the _WFE() statement is removed from
ticks_delay_us64() to prevent PWM glitching during calls to sleep().
2021-07-26 06:48:25 -04:00
|
|
|
machine_pwm.c \
|
mimxrt/machine_rtc: Add the RTC class to the machine module.
Initial version, using the LP RTC clock. It provides setting the date and
time with rtc.init() or rtc.datetime(), and reading the date and time with
rtc.datetime() or rtc.now(). The method weekday() reports the weekday of
the current date. It starts with 0 for Monday.
The tuple order for datetime() and now() matches the CPython sequence:
(year, month, day, hour, minute, second, microsecond, TZ). TZ is ignored
and reported as None. Microsecond is provided at a best effort.
If a battery is not supplied, the default boot date/time is 1970/1/1 0:0:0.
With a battery, the clock continues to run even when the board is not
powered. The clock is quite precise. If not, using rtc.calibration() may
help.
2021-05-20 10:16:25 -04:00
|
|
|
machine_rtc.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
machine_sdcard.c \
|
2021-06-09 04:47:18 -04:00
|
|
|
machine_spi.c \
|
2021-05-18 11:27:00 -04:00
|
|
|
machine_timer.c \
|
2021-05-30 12:18:33 -04:00
|
|
|
machine_uart.c \
|
2021-09-12 10:44:24 -04:00
|
|
|
machine_wdt.c \
|
2021-05-07 09:21:09 -04:00
|
|
|
mimxrt_flash.c \
|
2020-04-12 16:00:06 -04:00
|
|
|
modmachine.c \
|
2021-05-07 09:21:09 -04:00
|
|
|
modmimxrt.c \
|
2021-08-01 05:20:39 -04:00
|
|
|
modutime.c \
|
2020-04-12 16:00:06 -04:00
|
|
|
pin.c \
|
2021-07-09 00:19:15 -04:00
|
|
|
shared/runtime/mpirq.c \
|
|
|
|
shared/runtime/sys_stdio_mphal.c \
|
2022-06-19 17:00:38 -04:00
|
|
|
$(GEN_PINS_SRC)
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
# Compiler Flags
|
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
ifeq ($(DEBUG),1)
|
|
|
|
CFLAGS += -Og -ggdb
|
|
|
|
else
|
|
|
|
CFLAGS += -Os -DNDEBUG
|
|
|
|
endif
|
|
|
|
|
2022-06-22 14:39:23 -04:00
|
|
|
# Set default values for optional variables
|
|
|
|
MICROPY_HW_SDRAM_AVAIL ?= 0
|
|
|
|
MICROPY_HW_SDRAM_SIZE ?= 0
|
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# Configure default compiler flags
|
|
|
|
CFLAGS += \
|
|
|
|
$(INC) \
|
|
|
|
-D__START=main \
|
|
|
|
-D__STARTUP_CLEAR_BSS \
|
|
|
|
-D__STARTUP_INITIALIZE_RAMFUNCTION \
|
|
|
|
-DBOARD_$(BOARD) \
|
|
|
|
-DBOARD_FLASH_SIZE=$(MICROPY_HW_FLASH_SIZE) \
|
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX \
|
|
|
|
-DCLOCK_CONFIG_H='<boards/$(MCU_SERIES)_clock_config.h>' \
|
|
|
|
-DCPU_$(MCU_SERIES) \
|
|
|
|
-DCPU_$(MCU_VARIANT) \
|
|
|
|
-DCPU_HEADER_H='<$(MCU_SERIES).h>' \
|
|
|
|
-DFSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1 \
|
|
|
|
-DI2C_RETRY_TIMES=1000000 \
|
|
|
|
-DMICROPY_HW_FLASH_SIZE=$(MICROPY_HW_FLASH_SIZE) \
|
2022-06-22 14:39:23 -04:00
|
|
|
-DMICROPY_HW_SDRAM_AVAIL=$(MICROPY_HW_SDRAM_AVAIL) \
|
|
|
|
-DMICROPY_HW_SDRAM_SIZE=$(MICROPY_HW_SDRAM_SIZE) \
|
2022-06-19 17:00:38 -04:00
|
|
|
-DSPI_RETRY_TIMES=1000000 \
|
|
|
|
-DUART_RETRY_TIMES=1000000 \
|
|
|
|
-DXIP_BOOT_HEADER_ENABLE=1 \
|
|
|
|
-DXIP_EXTERNAL_FLASH=1 \
|
|
|
|
-fdata-sections \
|
|
|
|
-ffunction-sections \
|
|
|
|
-mcpu=cortex-m7 \
|
|
|
|
-mthumb \
|
|
|
|
-mtune=cortex-m7 \
|
|
|
|
-nostdlib \
|
|
|
|
-std=c99 \
|
|
|
|
-Wall \
|
|
|
|
-Wdouble-promotion \
|
|
|
|
-Werror \
|
|
|
|
-Wfloat-conversion \
|
|
|
|
-Wno-error=unused-parameter
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_HW_FLASH_TYPE), qspi_nor)
|
|
|
|
CFLAGS += -DBOARD_FLASH_OPS_HEADER_H=\"hal/flexspi_nor_flash.h\"
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_HW_BOARD_FLASH_FILES), 1)
|
|
|
|
CFLAGS += -DBOARD_FLASH_CONFIG_HEADER_H=\"$(BOARD)_flexspi_flash_config.h\"
|
|
|
|
else
|
|
|
|
CFLAGS += -DBOARD_FLASH_CONFIG_HEADER_H=\"hal/flexspi_flash_config.h\"
|
|
|
|
endif # qspi_nor
|
|
|
|
#
|
|
|
|
else ifeq ($(MICROPY_HW_FLASH_TYPE), hyperflash)
|
|
|
|
CFLAGS += -DBOARD_FLASH_OPS_HEADER_H=\"hal/flexspi_hyper_flash.h\"
|
|
|
|
|
|
|
|
ifeq ($(MICROPY_HW_BOARD_FLASH_FILES), 1)
|
|
|
|
CFLAGS += -DBOARD_FLASH_CONFIG_HEADER_H=\"$(BOARD)_flexspi_flash_config.h\"
|
|
|
|
else
|
|
|
|
CFLAGS += -DBOARD_FLASH_CONFIG_HEADER_H=\"hal/flexspi_flash_config.h\"
|
|
|
|
endif # hyperflash
|
|
|
|
#
|
|
|
|
else
|
|
|
|
$(error Error: Unknown board flash type $(MICROPY_HW_FLASH_TYPE))
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Configure floating point support
|
|
|
|
ifeq ($(MICROPY_FLOAT_IMPL),double)
|
|
|
|
CFLAGS += \
|
|
|
|
-DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_DOUBLE \
|
|
|
|
-mfloat-abi=hard \
|
|
|
|
-mfpu=fpv5-d16
|
|
|
|
else
|
|
|
|
ifeq ($(MICROPY_FLOAT_IMPL),none)
|
|
|
|
CFLAGS += -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_NONE
|
|
|
|
else
|
|
|
|
CFLAGS += \
|
|
|
|
-DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_FLOAT \
|
|
|
|
-fsingle-precision-constant \
|
|
|
|
-mfloat-abi=softfp \
|
|
|
|
-mfpu=fpv5-sp-d16
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Configure feature specific compiler flags
|
|
|
|
ifeq ($(MICROPY_PY_MACHINE_SDCARD),1)
|
|
|
|
CFLAGS += -DMICROPY_PY_MACHINE_SDCARD=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
# All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
|
|
|
|
ifeq ($(MICROPY_PY_LWIP), 1)
|
|
|
|
CFLAGS += \
|
|
|
|
-DFSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE=1 \
|
|
|
|
-DMBEDTLS_CONFIG_FILE='"mbedtls/mbedtls_config.h"'
|
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS += $(CFLAGS_MOD) $(CFLAGS_EXTRA)
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
# Linker Flags
|
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
LDFLAGS = \
|
|
|
|
--cref \
|
|
|
|
--gc-sections \
|
|
|
|
--print-memory-usage \
|
|
|
|
-Map=$@.map
|
|
|
|
|
|
|
|
# LDDEFINES are used for link time adaptation of linker scripts, utilizing
|
|
|
|
# the C preprocessor. Therefore keep LDDEFINES separated from LDFLAGS!
|
|
|
|
|
|
|
|
LDDEFINES = \
|
|
|
|
-DMICROPY_HW_FLASH_TYPE=$(MICROPY_HW_FLASH_TYPE) \
|
|
|
|
-DMICROPY_HW_FLASH_SIZE=$(MICROPY_HW_FLASH_SIZE)
|
|
|
|
|
|
|
|
ifdef MICROPY_HW_FLASH_RESERVED
|
|
|
|
LDDEFINES += -DMICROPY_HW_FLASH_RESERVED=$(MICROPY_HW_FLASH_RESERVED)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MICROPY_HW_SDRAM_AVAIL
|
|
|
|
LDDEFINES += \
|
|
|
|
-DMICROPY_HW_SDRAM_AVAIL=$(MICROPY_HW_SDRAM_AVAIL) \
|
|
|
|
-DMICROPY_HW_SDRAM_SIZE=$(MICROPY_HW_SDRAM_SIZE)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
# Library and Object files
|
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
LIBS = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
|
|
|
|
LIBM_O = $(addprefix $(BUILD)/, $(LIBM_SRC_C:.c=.o))
|
|
|
|
|
|
|
|
# Too many warnings in libm_dbl, disable for now.
|
|
|
|
ifeq ($(MICROPY_FLOAT_IMPL),double)
|
|
|
|
$(LIBM_O): CFLAGS := $(filter-out -Wdouble-promotion -Wfloat-conversion, $(CFLAGS))
|
|
|
|
endif
|
|
|
|
|
2020-01-20 06:25:51 -05:00
|
|
|
|
|
|
|
OBJ += $(PY_O)
|
2021-05-26 05:29:34 -04:00
|
|
|
OBJ += $(LIBM_O)
|
2020-01-20 06:25:51 -05:00
|
|
|
OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
|
|
|
OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
|
|
|
|
OBJ += $(addprefix $(BUILD)/, $(SRC_SS:.S=.o))
|
2021-05-07 09:21:09 -04:00
|
|
|
OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o))
|
2020-08-21 10:03:21 -04:00
|
|
|
OBJ += $(BUILD)/pins_gen.o
|
2020-01-20 06:25:51 -05:00
|
|
|
|
|
|
|
# Workaround for bug in older gcc, warning on "static usbd_device_t _usbd_dev = { 0 };"
|
|
|
|
$(BUILD)/lib/tinyusb/src/device/usbd.o: CFLAGS += -Wno-missing-braces
|
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# =============================================================================
|
|
|
|
# Build targets
|
|
|
|
# =============================================================================
|
|
|
|
|
2021-06-23 15:18:45 -04:00
|
|
|
all: $(BUILD)/firmware.hex $(BUILD)/firmware.bin
|
2020-01-20 06:25:51 -05:00
|
|
|
|
2022-06-19 17:00:38 -04:00
|
|
|
# Process linker scripts with C preprocessor to exchange LDDEFINES and
|
|
|
|
# aggregate output of preprocessor in a single linker script `link.ld`
|
2020-01-20 06:25:51 -05:00
|
|
|
$(BUILD)/firmware.elf: $(OBJ)
|
2021-08-20 15:41:58 -04:00
|
|
|
$(ECHO) "PREPROCESS LINK $@"
|
|
|
|
$(Q)$(CC) -E -x c $(LDDEFINES) $(LD_FILES) | grep -v '^#' > $(BUILD)/link.ld
|
2020-01-20 06:25:51 -05:00
|
|
|
$(ECHO) "LINK $@"
|
2021-08-20 15:41:58 -04:00
|
|
|
$(Q)$(LD) -T$(BUILD)/link.ld $(LDFLAGS) -o $@ $^ $(LIBS)
|
2020-01-20 06:25:51 -05:00
|
|
|
$(Q)$(SIZE) $@
|
|
|
|
|
|
|
|
$(BUILD)/firmware.bin: $(BUILD)/firmware.elf
|
|
|
|
$(Q)$(OBJCOPY) -O binary $^ $@
|
|
|
|
|
|
|
|
$(BUILD)/firmware.hex: $(BUILD)/firmware.elf
|
|
|
|
$(Q)$(OBJCOPY) -O ihex -R .eeprom $< $@
|
|
|
|
|
2021-08-20 15:41:58 -04:00
|
|
|
# Making OBJ use an order-only dependency on the generated pins.h file
|
2020-08-21 10:03:21 -04:00
|
|
|
# has the side effect of making the pins.h file before we actually compile
|
|
|
|
# any of the objects. The normal dependency generation will deal with the
|
|
|
|
# case when pins.h is modified. But when it doesn't exist, we don't know
|
|
|
|
# which source files might need it.
|
2021-08-20 15:41:58 -04:00
|
|
|
$(OBJ): | $(GEN_PINS_HDR) $(GEN_FLEXRAM_CONFIG_SRC)
|
2020-08-21 10:03:21 -04:00
|
|
|
|
|
|
|
# With conditional pins, we may need to regenerate qstrdefs.h when config
|
|
|
|
# options change.
|
|
|
|
$(HEADER_BUILD)/qstrdefs.generated.h: $(BOARD_DIR)/mpconfigboard.h
|
|
|
|
|
2021-08-20 15:41:58 -04:00
|
|
|
$(GEN_FLEXRAM_CONFIG_SRC):
|
|
|
|
$(ECHO) "Create $@"
|
|
|
|
$(Q)$(PYTHON) $(MAKE_FLEXRAM_LD) -d $(TOP)/$(MCU_DIR)/$(MCU_SERIES).h \
|
|
|
|
-f $(TOP)/$(MCU_DIR)/$(MCU_SERIES)_features.h -l boards/$(MCU_SERIES).ld -c $(MCU_SERIES) > $(GEN_FLEXRAM_CONFIG_SRC)
|
|
|
|
|
|
|
|
|
2020-08-21 10:03:21 -04:00
|
|
|
# Use a pattern rule here so that make will only call make-pins.py once to make
|
|
|
|
# both pins_gen.c and pins.h
|
|
|
|
$(BUILD)/%_gen.c $(HEADER_BUILD)/%.h: $(BOARD_PINS) $(MAKE_PINS) $(AF_FILE) $(PREFIX_FILE) | $(HEADER_BUILD)
|
|
|
|
$(ECHO) "Create $@"
|
|
|
|
$(Q)$(PYTHON) $(MAKE_PINS) --board $(BOARD_PINS) --af $(AF_FILE)\
|
2021-08-01 05:20:39 -04:00
|
|
|
--iomux $(abspath $(TOP)/$(MCU_DIR)/drivers/fsl_iomuxc.h) \
|
2020-08-21 10:03:21 -04:00
|
|
|
--prefix $(PREFIX_FILE) --hdr $(GEN_PINS_HDR) > $(GEN_PINS_SRC)
|
|
|
|
|
|
|
|
$(BUILD)/pins_gen.o: $(BUILD)/pins_gen.c
|
|
|
|
$(call compile_c)
|
|
|
|
|
2020-01-20 06:25:51 -05:00
|
|
|
include $(TOP)/py/mkrules.mk
|