From 6080cc215cdaa9e9b45bde8da9fc371ea714a710 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Mon, 30 Sep 2024 13:58:32 +0200 Subject: [PATCH] [SAMA5D3] Add build test, expand Target.md --- .github/workflows/test-configs.yml | 7 ++++++ config/examples/sama5d3-sram.config | 23 ------------------- .../{sama5d3-ddr.config => sama5d3.config} | 0 docs/Targets.md | 11 ++++++++- 4 files changed, 17 insertions(+), 24 deletions(-) delete mode 100644 config/examples/sama5d3-sram.config rename config/examples/{sama5d3-ddr.config => sama5d3.config} (100%) diff --git a/.github/workflows/test-configs.yml b/.github/workflows/test-configs.yml index 1df9275be..4760abd5d 100644 --- a/.github/workflows/test-configs.yml +++ b/.github/workflows/test-configs.yml @@ -22,6 +22,13 @@ jobs: # arch: riscv # config-file: ./config/examples/hifive.config # + # + sama5d3_test: + uses: ./.github/workflows/test-build.yml + with: + arch: arm + config-file: ./config/examples/sama5d3.config + same51_test: uses: ./.github/workflows/test-build.yml with: diff --git a/config/examples/sama5d3-sram.config b/config/examples/sama5d3-sram.config deleted file mode 100644 index 4e062f379..000000000 --- a/config/examples/sama5d3-sram.config +++ /dev/null @@ -1,23 +0,0 @@ -ARCH?=ARM -TARGET?=sama5d3 -SIGN?=ECC256 -HASH?=SHA256 -DEBUG?=1 -VTOR?=1 -CORTEX_M0?=0 -NO_ASM?=0 -EXT_FLASH?=1 -NAND_FLASH?=1 -SPI_FLASH?=0 -V?=0 -SPMATH?=1 -WOLFBOOT_PARTITION_SIZE?=0x1000000 -WOLFBOOT_NO_PARTITIONS=0 -WOLFBOOT_SECTOR_SIZE?=0x1000 -WOLFBOOT_LOAD_ADDRESS=0x201000 -WOLFBOOT_LOAD_DTS_ADDRESS=0x281000 -WOLFBOOT_PARTITION_BOOT_ADDRESS=0x400000 -WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x800000 -WOLFBOOT_PARTITION_SWAP_ADDRESS=0x0 -NO_XIP=1 -IMAGE_HEADER_SIZE=2048 diff --git a/config/examples/sama5d3-ddr.config b/config/examples/sama5d3.config similarity index 100% rename from config/examples/sama5d3-ddr.config rename to config/examples/sama5d3.config diff --git a/docs/Targets.md b/docs/Targets.md index bf570c482..3c65c7615 100644 --- a/docs/Targets.md +++ b/docs/Targets.md @@ -1447,8 +1447,17 @@ Step 3: program `wolfboot.bin` to the beginning of the flash: ### Programming the test application into NAND flash -(TODO) +The application can be written to a second partition in nand, +e.g. at address "0x40000" +`sam-ba -p j-link -b sama5d3-xplained -t 5 -a nandflash -c write:test-app/image_v1_signed.bin:0x400000` + +With the example configuration, wolfBoot will evaluate two alternative images +at addresses 0x400000 and 0x800000, authenticate, load to DRAM and stage from +`LOAD_ADDRESS`. + +Ensure that the application is compiled to run from `LOAD_ADDRESS`. +Check `test-app/ARM-sama5d3.ld` for details. ## Microchip SAME51