mirror of https://github.com/wolfSSL/wolfBoot.git
Added GitHub action build tests for NXP parts (iMX RT, Kinetis and LPC).
parent
802ebdce1d
commit
6ea1a1e4a5
|
|
@ -0,0 +1,61 @@
|
|||
name: Wolfboot Reusable Build Workflow for MCUXpresso SDK
|
||||
|
||||
on:
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
arch:
|
||||
required: true
|
||||
type: string
|
||||
config-file:
|
||||
required: true
|
||||
type: string
|
||||
make-args:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
repository: nxp-mcuxpresso/mcux-sdk
|
||||
path: mcux-sdk
|
||||
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
repository: nxp-mcuxpresso/CMSIS_5
|
||||
path: CMSIS_5
|
||||
|
||||
- name: Workaround for sources.list
|
||||
run: sudo sed -i 's|http://azure.archive.ubuntu.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/sources.list
|
||||
|
||||
- name: Update repository
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install cross compilers
|
||||
run: |
|
||||
sudo apt-get install -y gcc-arm-none-eabi
|
||||
|
||||
- name: make distclean
|
||||
run: |
|
||||
make distclean
|
||||
|
||||
- name: Select config
|
||||
run: |
|
||||
cp ${{inputs.config-file}} .config && make include/target.h
|
||||
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot
|
||||
run: |
|
||||
make MCUXSDK=1 MCUXPRESSO="$GITHUB_WORKSPACE/mcux-sdk" MCUXPRESSO_CMSIS="$GITHUB_WORKSPACE/CMSIS_5/CMSIS" ${{inputs.make-args}} V=1
|
||||
|
|
@ -48,7 +48,7 @@ jobs:
|
|||
|
||||
- name: Build tools
|
||||
run: |
|
||||
make keytools
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -36,19 +36,15 @@ jobs:
|
|||
|
||||
- name: make clean
|
||||
run: |
|
||||
make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
|
||||
- name: Install wolfSSL
|
||||
run: |
|
||||
sudo apt-get install --no-install-recommends -y -q make libwolfssl-dev
|
||||
make distclean
|
||||
|
||||
- name: Select config
|
||||
run: |
|
||||
cp ${{inputs.config-file}} .config && make include/target.h
|
||||
|
||||
- name: Build key tools
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -22,15 +22,35 @@ jobs:
|
|||
# arch: riscv
|
||||
# config-file: ./config/examples/hifive.config
|
||||
|
||||
# TODO: imx-rt1050.config
|
||||
# TODO: imx-rt1060.config
|
||||
imx_rt1050_test:
|
||||
uses: ./.github/workflows/test-build-mcux-sdk.yml
|
||||
with:
|
||||
arch: arm
|
||||
config-file: ./config/examples/imx-rt1050.config
|
||||
|
||||
# TODO: kinetis-k82f.config requires the KSDK
|
||||
# kinetis_k82f_test:
|
||||
# uses: ./.github/workflows/test-build.yml
|
||||
# with:
|
||||
# arch: arm
|
||||
# config-file: ./config/examples/kinetis-k82f.config
|
||||
imx_rt1060_test:
|
||||
uses: ./.github/workflows/test-build-mcux-sdk.yml
|
||||
with:
|
||||
arch: arm
|
||||
config-file: ./config/examples/imx-rt1060.config
|
||||
|
||||
imx_rt1064_test:
|
||||
uses: ./.github/workflows/test-build-mcux-sdk.yml
|
||||
with:
|
||||
arch: arm
|
||||
config-file: ./config/examples/imx-rt1064.config
|
||||
|
||||
kinetis_k64f_test:
|
||||
uses: ./.github/workflows/test-build-mcux-sdk.yml
|
||||
with:
|
||||
arch: arm
|
||||
config-file: ./config/examples/kinetis-k64f.config
|
||||
|
||||
kinetis_k82f_test:
|
||||
uses: ./.github/workflows/test-build-mcux-sdk.yml
|
||||
with:
|
||||
arch: arm
|
||||
config-file: ./config/examples/kinetis-k82f.config
|
||||
|
||||
library_test:
|
||||
uses: ./.github/workflows/test-build.yml
|
||||
|
|
@ -38,12 +58,11 @@ jobs:
|
|||
arch: host
|
||||
config-file: ./config/examples/library.config
|
||||
|
||||
# TODO: lpc54606j512.config requires MCUXPRESSO files
|
||||
# lpc54606j512_test
|
||||
# uses: ./.github/workflows/test-build.yml
|
||||
# with:
|
||||
# arch: arm
|
||||
# config-file: ./config/examples/lpc54606j512.config
|
||||
lpc54606j512_test:
|
||||
uses: ./.github/workflows/test-build-mcux-sdk.yml
|
||||
with:
|
||||
arch: arm
|
||||
config-file: ./config/examples/lpc54606j512.config
|
||||
|
||||
nrf52840_test:
|
||||
uses: ./.github/workflows/test-build.yml
|
||||
|
|
|
|||
|
|
@ -16,28 +16,18 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Workaround for sources.list
|
||||
run: sudo sed -i 's|http://azure.archive.ubuntu.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/sources.list
|
||||
|
||||
- name: Update repository
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install wolfSSL
|
||||
run: |
|
||||
sudo apt-get install --no-install-recommends -y -q make libwolfssl-dev
|
||||
|
||||
# ECC
|
||||
- name: make clean
|
||||
run: |
|
||||
make distclean && make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
make distclean
|
||||
|
||||
- name: Select config
|
||||
run: |
|
||||
cp config/examples/sim-ecc.config .config && make include/target.h
|
||||
|
||||
- name: Build key tools
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot
|
||||
run: |
|
||||
|
|
@ -67,18 +57,19 @@ jobs:
|
|||
run: |
|
||||
./tools/keytools/sign --ecc256 --sha256 --manual-sign test-app/image.elf public-key.der 1 test-app/image_v1.sig
|
||||
|
||||
|
||||
# ED25519
|
||||
- name: make clean
|
||||
run: |
|
||||
make distclean && make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
make distclean
|
||||
|
||||
- name: Select config
|
||||
run: |
|
||||
cp config/examples/sim.config .config && make include/target.h
|
||||
|
||||
- name: Build key tools
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot
|
||||
run: |
|
||||
|
|
@ -108,18 +99,19 @@ jobs:
|
|||
run: |
|
||||
./tools/keytools/sign --ed25519 --sha256 --manual-sign test-app/image.elf public-key.der 1 test-app/image_v1.sig
|
||||
|
||||
|
||||
# RSA
|
||||
- name: make clean
|
||||
run: |
|
||||
make distclean && make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
make distclean
|
||||
|
||||
- name: Select config
|
||||
run: |
|
||||
cp config/examples/sim-rsa.config .config && make include/target.h
|
||||
|
||||
- name: Build key tools
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -17,19 +17,15 @@ jobs:
|
|||
|
||||
- name: make clean
|
||||
run: |
|
||||
make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
make distclean
|
||||
|
||||
- name: Select config
|
||||
run: |
|
||||
cp config/examples/sim.config .config
|
||||
|
||||
- name: Build key tools
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
|
||||
- name: Build bin assemble
|
||||
run: |
|
||||
make -C tools/bin-assemble
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot.elf
|
||||
run: |
|
||||
|
|
@ -55,23 +51,19 @@ jobs:
|
|||
run: |
|
||||
tools/scripts/sim-update-powerfail-resume.sh
|
||||
|
||||
# TEST with NVM_WRITEONCE enabled
|
||||
|
||||
# TEST with NVM_WRITEONCE enabled
|
||||
- name: make clean
|
||||
run: |
|
||||
make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
make distclean
|
||||
|
||||
- name: Select config with NVM_WRITEONCE
|
||||
run: |
|
||||
cp config/examples/sim-nvm-writeonce.config .config
|
||||
|
||||
- name: Build key tools
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
|
||||
- name: Build bin assemble
|
||||
run: |
|
||||
make -C tools/bin-assemble
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot.elf
|
||||
run: |
|
||||
|
|
@ -97,89 +89,95 @@ jobs:
|
|||
run: |
|
||||
tools/scripts/sim-update-powerfail-resume.sh
|
||||
|
||||
# TEST with NVM_WRITEONCE AND FLAGS_HOME enabled
|
||||
|
||||
# TEST with NVM_WRITEONCE AND FLAGS_HOME enabled
|
||||
- name: make clean
|
||||
run: |
|
||||
make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
make distclean
|
||||
|
||||
- name: Select config with NVM_WRITEONCE and FLAGS_HOME
|
||||
run: |
|
||||
cp config/examples/sim-nvm-writeonce-flags-home.config .config
|
||||
- name: Build key tools
|
||||
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
- name: Build bin assemble
|
||||
run: |
|
||||
make -C tools/bin-assemble
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot.elf
|
||||
run: |
|
||||
make clean && make test-sim-internal-flash-with-update
|
||||
|
||||
- name: Run sunny day update test (NVM_WRITEONCE FLAGS_HOME)
|
||||
run: |
|
||||
tools/scripts/sim-sunnyday-update.sh
|
||||
|
||||
- name: Rebuild wolfboot.elf
|
||||
run: |
|
||||
make clean && make test-sim-internal-flash-with-update
|
||||
|
||||
- name: Run update-revert test (NVM_WRITEONCE FLAGS_HOME)
|
||||
run: |
|
||||
tools/scripts/sim-update-fallback.sh
|
||||
|
||||
- name: Rebuild wolfboot.elf
|
||||
run: |
|
||||
make clean && make test-sim-internal-flash-with-update
|
||||
|
||||
- name: Run update-revert test with power failures (NVM_WRITEONCE FLAGS_HOME)
|
||||
run: |
|
||||
tools/scripts/sim-update-powerfail-resume.sh
|
||||
|
||||
# TEST with NVM_WRITEONCE AND FLAGS_HOME AND FLAGS_INVERT enabled
|
||||
|
||||
# TEST with NVM_WRITEONCE AND FLAGS_HOME AND FLAGS_INVERT enabled
|
||||
- name: make clean
|
||||
run: |
|
||||
make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
make distclean
|
||||
|
||||
- name: Select config with NVM_WRITEONCE and FLAGS_HOME and FLAGS_INVERT
|
||||
run: |
|
||||
cp config/examples/sim-nvm-writeonce-flags-home-invert.config .config
|
||||
- name: Build key tools
|
||||
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
- name: Build bin assemble
|
||||
run: |
|
||||
make -C tools/bin-assemble
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot.elf
|
||||
run: |
|
||||
make clean && make test-sim-external-flash-with-update
|
||||
|
||||
- name: Run sunny day update test (NVM_WRITEONCE FLAGS_HOME FLAGS_INVERT)
|
||||
run: |
|
||||
tools/scripts/sim-sunnyday-update.sh
|
||||
|
||||
- name: Rebuild wolfboot.elf
|
||||
run: |
|
||||
make clean && make test-sim-external-flash-with-update
|
||||
|
||||
- name: Run update-revert test (NVM_WRITEONCE FLAGS_HOME)
|
||||
run: |
|
||||
tools/scripts/sim-update-fallback.sh
|
||||
|
||||
- name: Rebuild wolfboot.elf
|
||||
run: |
|
||||
make clean && make test-sim-external-flash-with-update
|
||||
|
||||
- name: Run update-revert test with power failures (NVM_WRITEONCE FLAGS_HOME FLAGS_INVERT)
|
||||
run: |
|
||||
tools/scripts/sim-update-powerfail-resume.sh
|
||||
|
||||
# TEST with DELTA updates
|
||||
|
||||
# TEST with DELTA updates
|
||||
- name: make clean
|
||||
run: |
|
||||
make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
make distclean
|
||||
|
||||
- name: Select config with DELTA updates
|
||||
run: |
|
||||
cp config/examples/sim-delta-update.config .config
|
||||
|
||||
- name: Build key tools
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
|
||||
- name: Build bin assemble
|
||||
run: |
|
||||
make -C tools/bin-assemble
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot.elf
|
||||
run: |
|
||||
|
|
@ -207,22 +205,17 @@ jobs:
|
|||
|
||||
|
||||
# TEST with encryption (aes128)
|
||||
|
||||
- name: make clean
|
||||
run: |
|
||||
make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
make distclean
|
||||
|
||||
- name: Select config with encrypted updates
|
||||
run: |
|
||||
cp config/examples/sim-encrypt-update.config .config
|
||||
|
||||
- name: Build key tools
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
|
||||
- name: Build bin assemble
|
||||
run: |
|
||||
make -C tools/bin-assemble
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot.elf
|
||||
run: |
|
||||
|
|
@ -249,22 +242,16 @@ jobs:
|
|||
tools/scripts/sim-update-powerfail-resume.sh
|
||||
|
||||
# TEST with encryption (aes128) and delta updates
|
||||
|
||||
- name: make clean
|
||||
run: |
|
||||
make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
|
||||
make distclean
|
||||
- name: Select config with encrypted updates
|
||||
run: |
|
||||
cp config/examples/sim-encrypt-delta-update.config .config
|
||||
|
||||
- name: Build key tools
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
|
||||
- name: Build bin assemble
|
||||
run: |
|
||||
make -C tools/bin-assemble
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot.elf
|
||||
run: |
|
||||
|
|
@ -290,35 +277,40 @@ jobs:
|
|||
run: |
|
||||
tools/scripts/sim-update-powerfail-resume.sh
|
||||
|
||||
# TEST with encryption (aes128) and NVM_WRITEONCE
|
||||
|
||||
# TEST with encryption (aes128) and NVM_WRITEONCE
|
||||
- name: make clean
|
||||
run: |
|
||||
make keysclean && make -C tools/keytools clean && rm -f include/target.h
|
||||
make distclean
|
||||
|
||||
- name: Select config with encrypted updates
|
||||
run: |
|
||||
cp config/examples/sim-encrypt-nvm-writeonce-update.config .config
|
||||
- name: Build key tools
|
||||
|
||||
- name: Build tools
|
||||
run: |
|
||||
make -C tools/keytools
|
||||
- name: Build bin assemble
|
||||
run: |
|
||||
make -C tools/bin-assemble
|
||||
make -C tools/keytools && make -C tools/bin-assemble
|
||||
|
||||
- name: Build wolfboot.elf
|
||||
run: |
|
||||
make clean && make test-sim-external-flash-with-enc-update
|
||||
|
||||
- name: Run sunny day update test (AES128 NVM_WRITEONCE)
|
||||
run: |
|
||||
tools/scripts/sim-sunnyday-update.sh
|
||||
|
||||
- name: Rebuild wolfboot.elf
|
||||
run: |
|
||||
make clean && make test-sim-external-flash-with-enc-update
|
||||
|
||||
- name: Run update-revert test (AES128 NVM_WRITEONCE)
|
||||
run: |
|
||||
tools/scripts/sim-update-fallback.sh
|
||||
|
||||
- name: Rebuild wolfboot.elf
|
||||
run: |
|
||||
make clean && make test-sim-external-flash-with-enc-update
|
||||
|
||||
- name: Run update-revert test with power failures (AES128 NVM_WRITEONCE)
|
||||
run: |
|
||||
tools/scripts/sim-update-powerfail-resume.sh
|
||||
|
|
|
|||
8
Makefile
8
Makefile
|
|
@ -20,6 +20,7 @@ LSCRIPT_IN:=hal/$(TARGET).ld
|
|||
V?=0
|
||||
DEBUG?=0
|
||||
DEBUG_UART?=0
|
||||
LIBS=
|
||||
|
||||
OBJS:= \
|
||||
./hal/$(TARGET).o \
|
||||
|
|
@ -207,11 +208,11 @@ factory_wstage1.bin: $(BINASSEMBLE) stage1/loader_stage1.bin wolfboot.bin $(BOOT
|
|||
wolfboot_stage1.bin: wolfboot.bin stage1/loader_stage1.bin
|
||||
$(Q) cp stage1/loader_stage1.bin wolfboot_stage1.bin
|
||||
|
||||
wolfboot.elf: include/target.h $(LSCRIPT) $(OBJS) $(BINASSEMBLE) FORCE
|
||||
wolfboot.elf: include/target.h $(LSCRIPT) $(OBJS) $(LIBS) $(BINASSEMBLE) FORCE
|
||||
$(Q)(test $(SIGN) = NONE) || (grep -q $(SIGN) src/keystore.c) || (echo "Key mismatch: please run 'make distclean' to remove all keys if you want to change algorithm" && false)
|
||||
@echo "\t[LD] $@"
|
||||
@echo $(OBJS)
|
||||
$(Q)$(LD) $(LDFLAGS) $(LSCRIPT_FLAGS) $(LD_START_GROUP) $(OBJS) $(LD_END_GROUP) -o $@
|
||||
@echo $(OBJS) $(LIBS)
|
||||
$(Q)$(LD) $(LDFLAGS) $(LSCRIPT_FLAGS) $(LD_START_GROUP) $(OBJS) $(LIBS) $(LD_END_GROUP) -o $@
|
||||
|
||||
$(LSCRIPT): $(LSCRIPT_IN) FORCE
|
||||
@(test $(LSCRIPT_IN) != NONE) || (echo "Error: no linker script" \
|
||||
|
|
@ -254,6 +255,7 @@ clean:
|
|||
$(Q)rm -f lib/wolfssl/wolfcrypt/src/*.o lib/wolfTPM/src/*.o
|
||||
$(Q)rm -f wolfboot.bin wolfboot.elf wolfboot.map test-update.rom wolfboot.hex
|
||||
$(Q)rm -f $(MACHINE_OBJ) $(MAIN_TARGET) $(LSCRIPT)
|
||||
$(Q)rm -f $(OBJS)
|
||||
$(Q)$(MAKE) -C test-app -s clean
|
||||
$(Q)$(MAKE) -C tools/check_config -s clean
|
||||
$(Q)$(MAKE) -C stage1 -s clean
|
||||
|
|
|
|||
178
arch.mk
178
arch.mk
|
|
@ -249,13 +249,47 @@ ifeq ($(ARCH),PPC)
|
|||
endif
|
||||
|
||||
ifeq ($(TARGET),kinetis)
|
||||
CFLAGS+= -I$(MCUXPRESSO_DRIVERS)/drivers -I$(MCUXPRESSO_DRIVERS) -DCPU_$(MCUXPRESSO_CPU) -I$(MCUXPRESSO_CMSIS)/Include -DDEBUG_CONSOLE_ASSERT_DISABLE=1
|
||||
OBJS+= $(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_flash.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_cache.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_controller.o
|
||||
CFLAGS+=\
|
||||
-I$(MCUXPRESSO_DRIVERS) \
|
||||
-I$(MCUXPRESSO_DRIVERS)/drivers \
|
||||
-I$(MCUXPRESSO)/drivers \
|
||||
-I$(MCUXPRESSO)/drivers/common \
|
||||
-I$(MCUXPRESSO_CMSIS)/Include \
|
||||
-I$(MCUXPRESSO_CMSIS)/Core/Include
|
||||
CFLAGS+=\
|
||||
-DCPU_$(MCUXPRESSO_CPU) -DDEBUG_CONSOLE_ASSERT_DISABLE=1 -DNVM_FLASH_WRITEONCE=1
|
||||
OBJS+=\
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o
|
||||
|
||||
ifeq ($(MCUXSDK),1)
|
||||
CFLAGS+=\
|
||||
-I$(MCUXPRESSO)/drivers/flash \
|
||||
-I$(MCUXPRESSO)/drivers/sysmpu \
|
||||
-I$(MCUXPRESSO)/drivers/ltc \
|
||||
-I$(MCUXPRESSO)/drivers/port \
|
||||
-I$(MCUXPRESSO)/drivers/gpio
|
||||
|
||||
OBJS+=\
|
||||
$(MCUXPRESSO)/drivers/flash/fsl_ftfx_flash.o \
|
||||
$(MCUXPRESSO)/drivers/flash/fsl_ftfx_cache.o \
|
||||
$(MCUXPRESSO)/drivers/flash/fsl_ftfx_controller.o
|
||||
else
|
||||
OBJS+=\
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_flash.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_cache.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_controller.o
|
||||
endif
|
||||
|
||||
## The following lines can be used to enable HW acceleration
|
||||
ifeq ($(MCUXPRESSO_CPU),MK82FN256VLL15)
|
||||
ifeq ($(PKA),1)
|
||||
PKA_EXTRA_CFLAGS+=-DFREESCALE_LTC_ECC -DFREESCALE_USE_LTC -DFREESCALE_LTC_TFM
|
||||
PKA_EXTRA_OBJS+=./lib/wolfssl/wolfcrypt/src/port/nxp/ksdk_port.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_ltc.o
|
||||
PKA_EXTRA_CFLAGS+=-DFREESCALE_USE_LTC
|
||||
PKA_EXTRA_OBJS+=./lib/wolfssl/wolfcrypt/src/port/nxp/ksdk_port.o
|
||||
ifeq ($(MCUXSDK),1)
|
||||
PKA_EXTRA_OBJS+=$(MCUXPRESSO)/drivers/ltc/fsl_ltc.o
|
||||
else
|
||||
PKA_EXTRA_OBJS+=$(MCUXPRESSO_DRIVERS)/drivers/fsl_ltc.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
@ -263,24 +297,46 @@ endif
|
|||
ifeq ($(TARGET),imx_rt)
|
||||
CORTEX_M7=1
|
||||
CFLAGS+=\
|
||||
-I$(MCUXPRESSO_DRIVERS)/drivers \
|
||||
-I$(MCUXPRESSO_DRIVERS) \
|
||||
-I$(MCUXPRESSO_DRIVERS)/utilities/debug_console/ \
|
||||
-I$(MCUXPRESSO_DRIVERS)/utilities/str/ \
|
||||
-I$(MCUXPRESSO)/components/uart/ \
|
||||
-I$(MCUXPRESSO_DRIVERS)/drivers \
|
||||
-I$(MCUXPRESSO)/drivers \
|
||||
-I$(MCUXPRESSO)/drivers/common \
|
||||
-I$(MCUXPRESSO)/drivers/flexspi \
|
||||
-I$(MCUXPRESSO)/drivers/lpuart \
|
||||
-I$(MCUXPRESSO)/drivers/igpio \
|
||||
-I$(MCUXPRESSO)/components/uart \
|
||||
-I$(MCUXPRESSO)/components/flash/nor \
|
||||
-I$(MCUXPRESSO)/components/flash/nor/flexspi \
|
||||
-I$(MCUXPRESSO)/components/serial_manager/ \
|
||||
-I$(MCUXPRESSO)/components/serial_manager \
|
||||
-I$(MCUXPRESSO_DRIVERS)/project_template \
|
||||
-I$(MCUXPRESSO_CMSIS)/Include \
|
||||
-I$(MCUXPRESSO_CMSIS)/Core/Include \
|
||||
-I$(MCUXPRESSO_CMSIS)/Core/Include
|
||||
CFLAGS+=\
|
||||
-DCPU_$(MCUXPRESSO_CPU) \
|
||||
-DDEBUG_CONSOLE_ASSERT_DISABLE=1 -I$(MCUXPRESSO_DRIVERS)/project_template/ \
|
||||
-DDEBUG_CONSOLE_ASSERT_DISABLE=1 \
|
||||
-DXIP_EXTERNAL_FLASH=1 -DDEBUG_CONSOLE_ASSERT_DISABLE=1 -DPRINTF_ADVANCED_ENABLE=1 \
|
||||
-DSCANF_ADVANCED_ENABLE=1 -DSERIAL_PORT_TYPE_UART=1 -DNDEBUG=1
|
||||
|
||||
OBJS+= $(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_flexspi.o
|
||||
ifeq ($(DEBUG_UART),1)
|
||||
OBJS+= $(MCUXPRESSO_DRIVERS)/drivers/fsl_lpuart.o
|
||||
ifeq ($(MCUXSDK),1)
|
||||
CFLAGS+=\
|
||||
-I$(MCUXPRESSO)/utilities/str \
|
||||
-I$(MCUXPRESSO)/utilities/debug_console
|
||||
OBJS+=\
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o \
|
||||
$(MCUXPRESSO)/drivers/flexspi/fsl_flexspi.o
|
||||
ifeq ($(DEBUG_UART),1)
|
||||
OBJS+= $(MCUXPRESSO)/drivers/lpuart/fsl_lpuart.o
|
||||
endif
|
||||
else
|
||||
CFLAGS+=\
|
||||
-I$(MCUXPRESSO_DRIVERS)/utilities/str \
|
||||
-I$(MCUXPRESSO_DRIVERS)/utilities/debug_console
|
||||
OBJS+=\
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_flexspi.o
|
||||
ifeq ($(DEBUG_UART),1)
|
||||
OBJS+= $(MCUXPRESSO_DRIVERS)/drivers/fsl_lpuart.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(MCUXPRESSO_CPU),MIMXRT1064DVL6A)
|
||||
|
|
@ -299,7 +355,11 @@ ifeq ($(TARGET),imx_rt)
|
|||
endif
|
||||
|
||||
ifeq ($(PKA),1)
|
||||
PKA_EXTRA_OBJS+= $(MCUXPRESSO_DRIVERS)/drivers/fsl_dcp.o
|
||||
ifeq ($(MCUXSDK),1)
|
||||
PKA_EXTRA_OBJS+= $(MCUXPRESSO)/drivers/fsl_dcp.o
|
||||
else
|
||||
PKA_EXTRA_OBJS+= $(MCUXPRESSO_DRIVERS)/drivers/fsl_dcp.o
|
||||
endif
|
||||
PKA_EXTRA_OBJS+=./lib/wolfssl/wolfcrypt/src/port/nxp/dcp_port.o
|
||||
PKA_EXTRA_CFLAGS+=-DWOLFSSL_IMXRT_DCP
|
||||
endif
|
||||
|
|
@ -392,40 +452,70 @@ ifeq ($(TARGET),ti_hercules)
|
|||
endif
|
||||
|
||||
ifeq ($(TARGET),lpc)
|
||||
CFLAGS+=-I$(MCUXPRESSO_DRIVERS)/drivers -I$(MCUXPRESSO_DRIVERS) -DCPU_$(MCUXPRESSO_CPU) -I$(MCUXPRESSO_CMSIS)/Include -DDEBUG_CONSOLE_ASSERT_DISABLE=1
|
||||
OBJS+=$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_flashiap.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_power.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_reset.o
|
||||
OBJS+=$(MCUXPRESSO_DRIVERS)/mcuxpresso/libpower_softabi.a $(MCUXPRESSO_DRIVERS)/drivers/fsl_common.o
|
||||
OBJS+=$(MCUXPRESSO_DRIVERS)/drivers/fsl_usart.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_flexcomm.o
|
||||
CFLAGS+=\
|
||||
-I$(MCUXPRESSO_DRIVERS) \
|
||||
-I$(MCUXPRESSO_DRIVERS)/drivers \
|
||||
-I$(MCUXPRESSO)/drivers \
|
||||
-I$(MCUXPRESSO)/drivers/common \
|
||||
-I$(MCUXPRESSO_CMSIS)/Include \
|
||||
-I$(MCUXPRESSO_CMSIS)/Core/Include
|
||||
CFLAGS+=\
|
||||
-DCPU_$(MCUXPRESSO_CPU) -DDEBUG_CONSOLE_ASSERT_DISABLE=1
|
||||
OBJS+=\
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_power.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_reset.o
|
||||
LIBS+=\
|
||||
$(MCUXPRESSO_DRIVERS)/mcuxpresso/libpower_softabi.a
|
||||
ifeq ($(MCUXSDK),1)
|
||||
CFLAGS+=\
|
||||
-I$(MCUXPRESSO)/drivers/flashiap
|
||||
OBJS+=\
|
||||
$(MCUXPRESSO)/drivers/common/fsl_common.o \
|
||||
$(MCUXPRESSO)/drivers/common/fsl_common_arm.o \
|
||||
$(MCUXPRESSO)/drivers/flashiap/fsl_flashiap.o \
|
||||
$(MCUXPRESSO)/drivers/flexcomm/fsl_usart.o \
|
||||
$(MCUXPRESSO)/drivers/flexcomm/fsl_flexcomm.o
|
||||
else
|
||||
OBJS+=\
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_common.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_flashiap.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_usart.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_flexcomm.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET),psoc6)
|
||||
CORTEX_M0=1
|
||||
OBJS+= $(CYPRESS_PDL)/drivers/source/cy_flash.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_ipc_pipe.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_ipc_sema.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_ipc_drv.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_device.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_sysclk.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_sysint.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_syslib.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_ble_clk.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_wdt.o \
|
||||
$(CYPRESS_PDL)/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_gcc.o \
|
||||
$(CYPRESS_PDL)/devices/templates/COMPONENT_MTB/COMPONENT_CM0P/system_psoc6_cm0plus.o
|
||||
PSOC6_CRYPTO_OBJS=./lib/wolfssl/wolfcrypt/src/port/cypress/psoc6_crypto.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_vu.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_domain_params.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_nist_p.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_ecdsa.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_sha_v2.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_sha_v1.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_mem_v2.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_mem_v1.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_hw.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_hw_v1.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto.o
|
||||
OBJS+=\
|
||||
$(CYPRESS_PDL)/drivers/source/cy_flash.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_ipc_pipe.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_ipc_sema.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_ipc_drv.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_device.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_sysclk.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_sysint.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_syslib.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_ble_clk.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_wdt.o \
|
||||
$(CYPRESS_PDL)/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_gcc.o \
|
||||
$(CYPRESS_PDL)/devices/templates/COMPONENT_MTB/COMPONENT_CM0P/system_psoc6_cm0plus.o
|
||||
PSOC6_CRYPTO_OBJS=\
|
||||
./lib/wolfssl/wolfcrypt/src/port/cypress/psoc6_crypto.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_vu.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_domain_params.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_nist_p.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_ecdsa.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_sha_v2.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_sha_v1.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_mem_v2.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_mem_v1.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_hw.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_hw_v1.o \
|
||||
$(CYPRESS_PDL)/drivers/source/cy_crypto.o
|
||||
|
||||
CFLAGS+=-I$(CYPRESS_PDL)/drivers/include/ \
|
||||
CFLAGS+=\
|
||||
-I$(CYPRESS_PDL)/drivers/include \
|
||||
-I$(CYPRESS_PDL)/devices/include \
|
||||
-I$(CYPRESS_PDL)/cmsis/include \
|
||||
-I$(CYPRESS_TARGET_LIB) \
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@ ARCH?=ARM
|
|||
TARGET?=imx_rt
|
||||
SIGN?=ECC256
|
||||
HASH?=SHA256
|
||||
MCUXSDK?=0
|
||||
MCUXPRESSO?=$(PWD)/../SDK_2_14_0_EVKB-IMXRT1050
|
||||
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
|
||||
MCUXPRESSO_CPU?=MIMXRT1052DVJ6B
|
||||
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MIMXRT1052
|
||||
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
|
||||
DEBUG?=0
|
||||
VTOR?=1
|
||||
CORTEX_M0?=0
|
||||
|
|
@ -27,3 +28,8 @@ WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x60010000
|
|||
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x60030000
|
||||
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x60050000
|
||||
WOLFBOOT_SMALL_STACK?=1
|
||||
|
||||
# Flash Options
|
||||
CFLAGS_EXTRA+=-DCONFIG_HYPERFLASH
|
||||
#CFLAGS_EXTRA+=-DCONFIG_FLASH_IS25WP064A
|
||||
#CFLAGS_EXTRA+=-DCONFIG_FLASH_W25Q64JV
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@ ARCH?=ARM
|
|||
TARGET?=imx_rt
|
||||
SIGN?=ECC256
|
||||
HASH?=SHA256
|
||||
MCUXSDK?=0
|
||||
MCUXPRESSO?=$(PWD)/../SDK-2.11.0_EVK-MIMXRT1060
|
||||
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
|
||||
MCUXPRESSO_CPU?=MIMXRT1062DVL6A
|
||||
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MIMXRT1062
|
||||
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
|
||||
DEBUG?=0
|
||||
VTOR?=1
|
||||
CORTEX_M0?=0
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@ ARCH?=ARM
|
|||
TARGET?=imx_rt
|
||||
SIGN?=ECC256
|
||||
HASH?=SHA256
|
||||
MCUXSDK?=0
|
||||
MCUXPRESSO?=$(PWD)/../SDK-2.11.0_EVK-MIMXRT1060
|
||||
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
|
||||
MCUXPRESSO_CPU?=MIMXRT1064DVL6A
|
||||
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MIMXRT1064
|
||||
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
|
||||
DEBUG?=0
|
||||
VTOR?=1
|
||||
CORTEX_M0?=0
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
ARCH?=ARM
|
||||
TARGET?=kinetis
|
||||
SIGN?=ECC256
|
||||
HASH?=SHA256
|
||||
MCUXSDK?=0
|
||||
MCUXPRESSO?=$(PWD)/../FRDM-K64F
|
||||
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
|
||||
MCUXPRESSO_CPU?=MK64FN1M0VLL12
|
||||
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MK64F12
|
||||
DEBUG?=0
|
||||
VTOR?=1
|
||||
CORTEX_M0?=0
|
||||
NO_ASM?=0
|
||||
EXT_FLASH?=0
|
||||
SPI_FLASH?=0
|
||||
ALLOW_DOWNGRADE?=0
|
||||
NVM_FLASH_WRITEONCE?=1
|
||||
WOLFBOOT_VERSION?=0
|
||||
V?=0
|
||||
SPMATH?=1
|
||||
RAM_CODE?=0
|
||||
DUALBANK_SWAP?=0
|
||||
PKA?=1
|
||||
WOLFBOOT_PARTITION_SIZE?=0x7A000
|
||||
WOLFBOOT_SECTOR_SIZE?=0x1000
|
||||
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xA000
|
||||
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x84000
|
||||
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xff000
|
||||
|
|
@ -2,10 +2,11 @@ ARCH?=ARM
|
|||
TARGET?=kinetis
|
||||
SIGN?=ECC256
|
||||
HASH?=SHA256
|
||||
MCUXPRESSO?=$(HOME)/src/FRDM-K82F
|
||||
MCUXSDK?=0
|
||||
MCUXPRESSO?=$(PWD)/../FRDM-K82F
|
||||
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
|
||||
MCUXPRESSO_CPU?=MK82FN256VLL15
|
||||
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MK82F25615
|
||||
MCUXPRESSO_CMSIS?=$(HOME)/src/FRDM-K64F/CMSIS
|
||||
DEBUG?=0
|
||||
VTOR?=1
|
||||
CORTEX_M0?=0
|
||||
|
|
@ -16,7 +17,7 @@ ALLOW_DOWNGRADE?=0
|
|||
NVM_FLASH_WRITEONCE?=1
|
||||
WOLFBOOT_VERSION?=0
|
||||
V?=0
|
||||
SPMATH?=1
|
||||
SPMATH?=0
|
||||
RAM_CODE?=0
|
||||
DUALBANK_SWAP?=0
|
||||
PKA?=1
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
ARCH?=ARM
|
||||
TARGET?=lpc
|
||||
SIGN?=ECC256
|
||||
MCUXPRESSO?=$(HOME)/src/LPC54606J512
|
||||
MCUXSDK?=0
|
||||
MCUXPRESSO?=$(PWD)/../FRDM-K64F
|
||||
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
|
||||
MCUXPRESSO_CPU?=LPC54606J512BD208
|
||||
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/LPC54606
|
||||
MCUXPRESSO_CMSIS?=$(HOME)/src/LPC54606J512/CMSIS
|
||||
DEBUG?=0
|
||||
HASH?=SHA256
|
||||
VTOR?=1
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@ ARCH?=ARM
|
|||
TARGET?=stm32f4
|
||||
SIGN?=ECC256
|
||||
HASH?=SHA256
|
||||
MCUXPRESSO?=/home/dan/src/FRDM-K64F
|
||||
MCUXPRESSO_CPU?=MK64FN1M0VLL12
|
||||
MCUXPRESSO_DRIVERS?=/home/dan/src/FRDM-K64F/devices/MK64F12
|
||||
MCUXPRESSO_CMSIS?=/home/dan/src/FRDM-K64F/CMSIS
|
||||
STM32CUBE?=/home/dan/STM32Cube/Repository/STM32Cube_FW_WB_V1.3.0
|
||||
DEBUG?=1
|
||||
VTOR?=1
|
||||
|
|
|
|||
|
|
@ -1047,7 +1047,7 @@ A package can be obtained from the [MCUXpresso SDK Builder](https://mcuxpresso.n
|
|||
|
||||
Set the wolfBoot `MCUXPRESSO` configuration variable to the path where the SDK package is extracted, then build wolfBoot normally by running `make`.
|
||||
|
||||
wolfBoot support for iMX-RT1060/iMX-RT1050 has been tested using MCUXpresso SDK version 2.11.1. Support for the iMX-RT1064 has been tested using MCUXpresso SDK version 2.13.0
|
||||
wolfBoot support for iMX-RT1060/iMX-RT1050 has been tested using MCUXpresso SDK version 2.14.0. Support for the iMX-RT1064 has been tested using MCUXpresso SDK version 2.13.0
|
||||
|
||||
DCP support (hardware acceleration for SHA256 operations) can be enabled by using PKA=1 in the configuration file.
|
||||
|
||||
|
|
@ -1055,6 +1055,11 @@ Firmware can be directly uploaded to the target by copying `factory.bin` to the
|
|||
|
||||
The RT1050 EVKB board comes wired to use the 64MB HyperFlash. If you'd like to use QSPI there is a rework that can be performed (see AN12183). The default onboard QSPI 8MB ISSI IS25WP064A (`CONFIG_FLASH_IS25WP064A`). To use a Winbond W25Q64JV define `CONFIG_FLASH_W25Q64JV`.
|
||||
|
||||
You can also get the SDK and CMSIS bundles using these repositories:
|
||||
* https://github.com/nxp-mcuxpresso/mcux-sdk
|
||||
* https://github.com/nxp-mcuxpresso/CMSIS_5
|
||||
Use MCUXSDK=1 with this option, since the pack paths are different.
|
||||
|
||||
### Testing Update
|
||||
|
||||
```sh
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ const flexspi_nor_config_t __attribute__((section(".flash_config"))) qspiflash_c
|
|||
/* ISSI IS25WP064A (on EVKB with rework see AN12183) */
|
||||
#define WRITE_STATUS_CMD 0x1
|
||||
#define QE_ENABLE 0x40 /* S6 */
|
||||
#else
|
||||
#elif !defined(CONFIG_HYPERFLASH)
|
||||
/* Hyperflash - Default on RT1050-EVKB */
|
||||
#define CONFIG_HYPERFLASH
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -321,8 +321,8 @@ int RAMFUNCTION hal_flash_write(uint32_t address, const uint8_t *data, int len)
|
|||
uint32_t address_align = address - (address & 0x07);
|
||||
uint32_t start_off = address - address_align;
|
||||
int i;
|
||||
memcpy(aligned_dword, address_align, 8);
|
||||
for (i = start_off; ((i < 8) && (i < len + start_off)); i++)
|
||||
memcpy(aligned_dword, (void*)address_align, 8);
|
||||
for (i = start_off; ((i < 8) && (i < len + (int)start_off)); i++)
|
||||
aligned_dword[i] = data[w++];
|
||||
if (memcmp(aligned_dword, empty_dword, 8) != 0) {
|
||||
ret = FLASH_Program(&pflash, address_align, aligned_dword, 8);
|
||||
|
|
@ -333,7 +333,7 @@ int RAMFUNCTION hal_flash_write(uint32_t address, const uint8_t *data, int len)
|
|||
len -= i;
|
||||
} else {
|
||||
uint32_t len_align = len - (len & 0x07);
|
||||
ret = FLASH_Program(&pflash, address, data + w, len_align);
|
||||
ret = FLASH_Program(&pflash, address, (uint8_t*)data + w, len_align);
|
||||
if (ret != kStatus_FTFx_Success)
|
||||
return -1;
|
||||
len -= len_align;
|
||||
|
|
|
|||
|
|
@ -80,11 +80,10 @@ extern int tolower(int c);
|
|||
|
||||
/* Kinetis LTC support */
|
||||
# ifdef FREESCALE_USE_LTC
|
||||
# define LTC_MAX_ECC_BITS (256)
|
||||
# define LTC_MAX_INT_BYTES (128)
|
||||
# ifndef LTC_BASE
|
||||
# define LTC_BASE ((LTC_Type *)LTC0_BASE)
|
||||
# endif
|
||||
# define FREESCALE_COMMON
|
||||
# define FSL_HW_CRYPTO_MANUAL_SELECTION
|
||||
# define FREESCALE_LTC_ECC
|
||||
# define FREESCALE_LTC_TFM
|
||||
# endif
|
||||
|
||||
/* SP MATH */
|
||||
|
|
|
|||
|
|
@ -153,47 +153,70 @@ else
|
|||
endif
|
||||
|
||||
ifeq ($(TARGET),kinetis)
|
||||
CFLAGS+= -I$(MCUXPRESSO_DRIVERS)/drivers -I$(MCUXPRESSO_DRIVERS) -DCPU_$(MCUXPRESSO_CPU) -I$(MCUXPRESSO_CMSIS)/Include -DDEBUG_CONSOLE_ASSERT_DISABLE=1 -DNVM_FLASH_WRITEONCE=1
|
||||
APP_OBJS+= $(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_flash.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_cache.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_controller.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_gpio.o
|
||||
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o
|
||||
ifeq ($(MCUXSDK),1)
|
||||
APP_OBJS+=\
|
||||
$(MCUXPRESSO)/drivers/flash/fsl_ftfx_flash.o \
|
||||
$(MCUXPRESSO)/drivers/flash/fsl_ftfx_cache.o \
|
||||
$(MCUXPRESSO)/drivers/flash/fsl_ftfx_controller.o
|
||||
else
|
||||
APP_OBJS+=\
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_flash.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_cache.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_ftfx_controller.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET),imx_rt)
|
||||
CFLAGS+=-I$(MCUXPRESSO_DRIVERS)/drivers -I$(MCUXPRESSO_DRIVERS) -DCPU_$(MCUXPRESSO_CPU) -I$(MCUXPRESSO_CMSIS)/Include -DDEBUG_CONSOLE_ASSERT_DISABLE=1 -DXIP_EXTERNAL_FLASH=1 \
|
||||
-I$(MCUXPRESSO_DRIVERS)/utilities/debug_console/ -I$(MCUXPRESSO)/components/serial_manager \
|
||||
-I$(MCUXPRESSO)/components/uart/ -I$(MCUXPRESSO_DRIVERS)/utilities/str/ \
|
||||
-I$(MCUXPRESSO)/components/flash/nor \
|
||||
-I$(MCUXPRESSO)/components/flash/nor/flexspi \
|
||||
-DPRINTF_ADVANCED_ENABLE=1 -DSCANF_ADVANCED_ENABLE=1 -DSERIAL_PORT_TYPE_UART=1 -DNDEBUG=1
|
||||
LDFLAGS+=-mcpu=cortex-m7 -Wall --specs=nosys.specs -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker -Map=output.map -static -lm -lc -lnosys
|
||||
LDFLAGS+=\
|
||||
-mcpu=cortex-m7 -Wall --specs=nosys.specs -fno-common -ffunction-sections -fdata-sections \
|
||||
-ffreestanding -fno-builtin -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z \
|
||||
-Xlinker muldefs -Xlinker -Map=output.map -static -lm -lc -lnosys
|
||||
LSCRIPT_TEMPLATE=imx_rt.ld
|
||||
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/drivers/fsl_gpio.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_common.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_common_arm.o \
|
||||
imx_rt_clock_config.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_flexspi.o \
|
||||
$(MCUXPRESSO_DRIVERS)/utilities/str/fsl_str.o \
|
||||
$(MCUXPRESSO)/components/uart/fsl_adapter_lpuart.o \
|
||||
$(MCUXPRESSO)/components/serial_manager/fsl_component_serial_manager.o \
|
||||
$(MCUXPRESSO)/components/lists/fsl_component_generic_list.o \
|
||||
$(MCUXPRESSO)/components/serial_manager/fsl_component_serial_port_uart.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_lpuart.o \
|
||||
$(MCUXPRESSO)/components/flash/nor/flexspi/fsl_flexspi_nor_flash.o \
|
||||
$(MCUXPRESSO_DRIVERS)/utilities/debug_console/fsl_debug_console.o
|
||||
APP_OBJS+=\
|
||||
imx_rt_clock_config.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o \
|
||||
$(MCUXPRESSO)/components/uart/fsl_adapter_lpuart.o \
|
||||
$(MCUXPRESSO)/components/serial_manager/fsl_component_serial_manager.o \
|
||||
$(MCUXPRESSO)/components/lists/fsl_component_generic_list.o \
|
||||
$(MCUXPRESSO)/components/serial_manager/fsl_component_serial_port_uart.o \
|
||||
$(MCUXPRESSO)/components/flash/nor/flexspi/fsl_flexspi_nor_flash.o
|
||||
ifeq ($(MCUXSDK),1)
|
||||
APP_OBJS+=\
|
||||
$(MCUXPRESSO)/drivers/igpio/fsl_gpio.o \
|
||||
$(MCUXPRESSO)/drivers/common/fsl_common.o \
|
||||
$(MCUXPRESSO)/drivers/common/fsl_common_arm.o \
|
||||
$(MCUXPRESSO)/drivers/flexspi/fsl_flexspi.o \
|
||||
$(MCUXPRESSO)/utilities/str/fsl_str.o \
|
||||
$(MCUXPRESSO)/drivers/lpuart/fsl_lpuart.o \
|
||||
$(MCUXPRESSO)/utilities/debug_console/fsl_debug_console.o
|
||||
else
|
||||
APP_OBJS+=\
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_gpio.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_common.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_common_arm.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_flexspi.o \
|
||||
$(MCUXPRESSO_DRIVERS)/utilities/str/fsl_str.o \
|
||||
$(MCUXPRESSO_DRIVERS)/drivers/fsl_lpuart.o \
|
||||
$(MCUXPRESSO_DRIVERS)/utilities/debug_console/fsl_debug_console.o
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(MCUXPRESSO_CPU),MIMXRT1052DVJ6B)
|
||||
CFLAGS+=-I$(MCUXPRESSO_DRIVERS)/project_template/ -I$(MCUXPRESSO)/boards/evkmimxrt1050/xip/
|
||||
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/system_MIMXRT1052.o
|
||||
else
|
||||
ifeq ($(MCUXPRESSO_CPU),MIMXRT1062DVL6A)
|
||||
CFLAGS+=-I$(MCUXPRESSO_DRIVERS)/project_template/ -I$(MCUXPRESSO)/boards/evkmimxrt1060/xip/
|
||||
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/system_MIMXRT1062.o
|
||||
endif
|
||||
ifeq ($(MCUXPRESSO_CPU),MIMXRT1064DVL6A)
|
||||
CFLAGS+=-I$(MCUXPRESSO_DRIVERS)/project_template/ -I$(MCUXPRESSO)/boards/evkmimxrt1064/xip/
|
||||
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/system_MIMXRT1064.o
|
||||
endif
|
||||
ifeq ($(MCUXPRESSO_CPU),MIMXRT1052DVJ6B)
|
||||
CFLAGS+=-I$(MCUXPRESSO_DRIVERS)/project_template/ \
|
||||
-I$(MCUXPRESSO)/boards/evkmimxrt1050/xip/
|
||||
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/system_MIMXRT1052.o
|
||||
else
|
||||
ifeq ($(MCUXPRESSO_CPU),MIMXRT1062DVL6A)
|
||||
CFLAGS+=-I$(MCUXPRESSO_DRIVERS)/project_template/ \
|
||||
-I$(MCUXPRESSO)/boards/evkmimxrt1060/xip/
|
||||
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/system_MIMXRT1062.o
|
||||
endif
|
||||
ifeq ($(MCUXPRESSO_CPU),MIMXRT1064DVL6A)
|
||||
CFLAGS+=-I$(MCUXPRESSO_DRIVERS)/project_template/ \
|
||||
-I$(MCUXPRESSO)/boards/evkmimxrt1064/xip/
|
||||
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/system_MIMXRT1064.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET),stm32g0)
|
||||
|
|
@ -280,7 +303,7 @@ standalone: image.bin
|
|||
$(Q)$(CC) $(CFLAGS) -c $(OUTPUT_FLAG) $@ $^
|
||||
|
||||
clean:
|
||||
$(Q)rm -f *.bin *.elf tags *.o $(LSCRIPT)
|
||||
$(Q)rm -f *.bin *.elf tags *.o $(LSCRIPT) $(APP_OBJS)
|
||||
|
||||
$(LSCRIPT): $(LSCRIPT_TEMPLATE) FORCE
|
||||
$(Q)printf "%d" $(WOLFBOOT_PARTITION_BOOT_ADDRESS) > .wolfboot-offset
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ ifeq ($(ARCH),)
|
|||
TARGET?=stm32f4
|
||||
SIGN?=ED25519
|
||||
HASH?=SHA256
|
||||
MCUXPRESSO?=$(HOME)/src/FRDM-K64F
|
||||
MCUXSDK?=1
|
||||
MCUXPRESSO?=$(PWD)/mcux-sdk
|
||||
MCUXPRESSO_CPU=MK64FN1M0VLL12
|
||||
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MK64F12
|
||||
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
|
||||
MCUXPRESSO_CMSIS?=$(PWD)/CMSIS_5/CMSIS
|
||||
FREEDOM_E_SDK?=$(HOME)/src/freedom-e-sdk
|
||||
STM32CUBE?=$(HOME)/STM32Cube/Repository/STM32Cube_FW_WB_V1.3.0
|
||||
CYPRESS_PDL?=$(HOME)/src/psoc6pdl
|
||||
|
|
@ -63,7 +64,7 @@ ifeq ($(ARCH),)
|
|||
FORCE_32BIT=0
|
||||
endif
|
||||
|
||||
CONFIG_VARS:= ARCH TARGET SIGN HASH MCUXPRESSO MCUXPRESSO_CPU MCUXPRESSO_DRIVERS \
|
||||
CONFIG_VARS:= ARCH TARGET SIGN HASH MCUXSDK MCUXPRESSO MCUXPRESSO_CPU MCUXPRESSO_DRIVERS \
|
||||
MCUXPRESSO_CMSIS FREEDOM_E_SDK STM32CUBE CYPRESS_PDL CYPRESS_CORE_LIB CYPRESS_TARGET_LIB DEBUG VTOR \
|
||||
CORTEX_M0 CORTEX_M7 CORTEX_M33 NO_ASM EXT_FLASH SPI_FLASH NO_XIP UART_FLASH ALLOW_DOWNGRADE NVM_FLASH_WRITEONCE \
|
||||
DISABLE_BACKUP WOLFBOOT_VERSION V NO_MPU ENCRYPT FLAGS_HOME FLAGS_INVERT \
|
||||
|
|
|
|||
Loading…
Reference in New Issue