-
Notifications
You must be signed in to change notification settings - Fork 147
Nordic nrf54l port (with and without TrustZone) #724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6e69d1a
Nordic nrf54l port (with and without TrustZone)
mattia-moffa bc93c28
Disable DELTA_UPDATES by default
mattia-moffa 0520b36
Address Copilot remarks
mattia-moffa f1608f7
Address more copilot remarks
mattia-moffa fbebd5a
Add github workflow
mattia-moffa a77956c
Don't always define DEBUG_UART; fix typo
mattia-moffa 87dec69
Fix non-tz build again
mattia-moffa 64718de
Fix test-app TZEN
mattia-moffa a344cbb
Add uart signatures to header for cleanliness
mattia-moffa 40230be
Output firmware version as ASCII
mattia-moffa ec8a3a3
Spacing changes
mattia-moffa 752879d
Remove unused include
mattia-moffa ca720b4
Fix header comments
mattia-moffa 344c551
Allow UART_FLASH without DEBUG_UART
mattia-moffa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -395,6 +395,7 @@ if(NOT DEFINED ARM_TARGETS) | |
| nrf52840 | ||
| nrf5340 | ||
| nrf5340_net | ||
| nrf54l | ||
| rp2350 | ||
| sama5d3 | ||
| same51 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| ARCH?=ARM | ||
| TZEN?=1 | ||
| TARGET?=nrf54l | ||
| SIGN?=ECC384 | ||
| HASH?=SHA384 | ||
| WOLFBOOT_VERSION?=1 | ||
| VTOR?=1 | ||
| CORTEX_M0?=0 | ||
| CORTEX_M33?=1 | ||
| NO_ASM?=0 | ||
| NO_MPU=1 | ||
| ALLOW_DOWNGRADE?=0 | ||
| NVM_FLASH_WRITEONCE?=0 | ||
| DELTA_UPDATES?=0 | ||
|
|
||
| SPMATH?=1 | ||
| RAM_CODE?=1 | ||
|
|
||
| DUALBANK_SWAP?=0 | ||
| FLAGS_HOME=0 | ||
| DISABLE_BACKUP=0 | ||
| EXT_FLASH?=0 | ||
| SPI_FLASH?=0 | ||
| QSPI_FLASH?=0 | ||
| UART_FLASH?=0 | ||
|
|
||
| WOLFCRYPT_TZ?=1 | ||
| WOLFCRYPT_TZ_PKCS11?=1 | ||
|
|
||
| # 4096 sector size (the RRAM doesn't have an intrinsic page size) | ||
| WOLFBOOT_SECTOR_SIZE?=0x1000 | ||
|
|
||
| # Flash layout | ||
| # | ||
| # 0x00000000 - 0x0004EFFF wolfBoot (316 KB) secure | ||
| # 0x0004F000 - 0x00064FFF Keyvault (88 KB) secure | ||
| # 0x00065000 - 0x00065FFF NSC region (4 KB) non-secure callable | ||
| # 0x00066000 - 0x000F0FFF Boot partition (556 KB) non-secure | ||
| # 0x000F1000 - 0x0017BFFF Update partition (556 KB) secure | ||
| # 0x0017C000 - 0x0017CFFF Swap area (4 KB) secure | ||
| # | ||
| # The update partition is meant to be written to via wolfBoot's NSC veneers | ||
|
|
||
| WOLFBOOT_KEYVAULT_ADDRESS?=0x4F000 | ||
| WOLFBOOT_KEYVAULT_SIZE?=0x16000 | ||
|
|
||
| WOLFBOOT_NSC_ADDRESS?=0x65000 | ||
| WOLFBOOT_NSC_SIZE?=0x1000 | ||
|
|
||
| WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x66000 | ||
| WOLFBOOT_PARTITION_SIZE?=0x8B000 | ||
|
|
||
| WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xF1000 | ||
| WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x17C000 | ||
|
|
||
| V?=0 | ||
| DEBUG?=0 | ||
| DEBUG_UART?=1 | ||
| USE_GCC=1 | ||
| OPTIMIZATION_LEVEL=2 | ||
|
|
||
| # Use larger block size for swapping sectors (performance improvement) | ||
| CFLAGS_EXTRA+=-DFLASHBUFFER_SIZE=0x1000 | ||
|
|
||
| #CFLAGS_EXTRA+=-DDEBUG_FLASH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| ARCH?=ARM | ||
| TZEN?=0 | ||
| TARGET?=nrf54l | ||
| SIGN?=ECC384 | ||
| HASH?=SHA384 | ||
| WOLFBOOT_VERSION?=1 | ||
| VTOR?=1 | ||
| CORTEX_M0?=0 | ||
| CORTEX_M33?=1 | ||
| NO_ASM?=0 | ||
| NO_MPU=1 | ||
| ALLOW_DOWNGRADE?=0 | ||
| NVM_FLASH_WRITEONCE?=0 | ||
| DELTA_UPDATES?=0 | ||
|
|
||
| SPMATH?=1 | ||
| RAM_CODE?=1 | ||
|
|
||
| DUALBANK_SWAP?=0 | ||
| FLAGS_HOME=0 | ||
| DISABLE_BACKUP=0 | ||
| EXT_FLASH?=0 | ||
| SPI_FLASH?=0 | ||
| QSPI_FLASH?=0 | ||
| UART_FLASH?=0 | ||
|
|
||
| # 4096 sector size (the RRAM doesn't have an intrinsic page size) | ||
| WOLFBOOT_SECTOR_SIZE?=0x1000 | ||
|
|
||
| # Reserve the first 64KB of internal flash for wolfBoot itself | ||
| WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x10000 | ||
|
|
||
| # Application partition spans the remainder of the 1524K internal flash | ||
| # (1524K - 64K - 4K) / 2 = 728K = 0xB6000 | ||
| WOLFBOOT_PARTITION_SIZE?=0xB6000 | ||
|
|
||
| # Flash offset for application update image | ||
| # (64K + 728K) = 792K = 0xC6000 | ||
| WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xC6000 | ||
|
|
||
| # Flash offset for swap area | ||
| # (1524K - 4K) = 1520K = 0x17C000 | ||
| WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x17C000 | ||
|
|
||
| V?=0 | ||
| DEBUG?=0 | ||
| DEBUG_UART?=1 | ||
| USE_GCC=1 | ||
| OPTIMIZATION_LEVEL=2 | ||
|
|
||
| # Use larger block size for swapping sectors (performance improvement) | ||
| CFLAGS_EXTRA+=-DFLASHBUFFER_SIZE=0x1000 | ||
|
|
||
| # SPI flash hookup for the DK radio shield | ||
| #CFLAGS_EXTRA+=-DSPI_CS_PORT=0 -DSPI_CS_PIN=25 | ||
| #CFLAGS_EXTRA+=-DSPI_SCK_PORT=0 -DSPI_SCK_PIN=29 | ||
| #CFLAGS_EXTRA+=-DSPI_MOSI_PORT=0 -DSPI_MOSI_PIN=28 | ||
| #CFLAGS_EXTRA+=-DSPI_MISO_PORT=0 -DSPI_MISO_PIN=27 | ||
|
|
||
| #CFLAGS_EXTRA+=-DDEBUG_FLASH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| MEMORY | ||
| { | ||
| FLASH (rx) : ORIGIN = @ARCH_FLASH_OFFSET@, LENGTH = @BOOTLOADER_PARTITION_SIZE@ | ||
| RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 256K | ||
| } | ||
|
|
||
| SECTIONS | ||
| { | ||
| .text : | ||
| { | ||
| _start_text = .; | ||
| KEEP(*(.isr_vector)) | ||
| *(.boot*) | ||
| *(.text*) | ||
| *(.rodata*) | ||
| *(.init*) | ||
| *(.fini*) | ||
| . = ALIGN(4); | ||
| _end_text = .; | ||
| } > FLASH | ||
|
|
||
| .edidx : | ||
| { | ||
| . = ALIGN(4); | ||
| *(.ARM.exidx*) | ||
| } > FLASH | ||
|
|
||
| _stored_data = .; | ||
|
|
||
| .data : AT (_stored_data) | ||
| { | ||
| _start_data = .; | ||
| KEEP(*(.data*)) | ||
| . = ALIGN(4); | ||
| _end_data = .; | ||
| } > RAM | ||
|
|
||
| .bss (NOLOAD) : | ||
| { | ||
| _start_bss = .; | ||
| __bss_start__ = .; | ||
| *(.bss*) | ||
| *(COMMON) | ||
| . = ALIGN(4); | ||
| _end_bss = .; | ||
| __bss_end__ = .; | ||
| _end = .; | ||
| } > RAM | ||
| . = ALIGN(4); | ||
| } | ||
|
|
||
| END_STACK = ORIGIN(RAM) + LENGTH(RAM); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.