-
Notifications
You must be signed in to change notification settings - Fork 139
Updated benchmark scripts to run on rpi + stm32h563 #682
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
Open
danielinux
wants to merge
1
commit into
wolfSSL:master
Choose a base branch
from
danielinux:update-benchmark-h5
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| ARCH?=ARM | ||
| TZEN?=0 | ||
| TARGET?=stm32h5 | ||
| SIGN?=ECC256 | ||
| HASH?=SHA256 | ||
| DEBUG?=0 | ||
| VTOR?=1 | ||
| CORTEX_M0?=0 | ||
| CORTEX_M33?=1 | ||
| NO_ASM?=0 | ||
| NO_MPU=1 | ||
| EXT_FLASH?=0 | ||
| SPI_FLASH?=0 | ||
| ALLOW_DOWNGRADE?=0 | ||
| NVM_FLASH_WRITEONCE?=1 | ||
| WOLFBOOT_VERSION?=1 | ||
| V?=0 | ||
| SPMATH?=1 | ||
| RAM_CODE?=0 | ||
| DUALBANK_SWAP?=0 | ||
| WOLFBOOT_PARTITION_SIZE?=0xA0000 | ||
| #Double sector size to fit header in ML-DSA-87 | ||
| WOLFBOOT_SECTOR_SIZE?=0x4000 | ||
| WOLFBOOT_KEYVAULT_ADDRESS?=0x0C040000 | ||
| WOLFBOOT_KEYVAULT_SIZE?=0x1C000 | ||
| WOLFBOOT_NSC_ADDRESS?=0x0C05C000 | ||
| WOLFBOOT_NSC_SIZE?=0x4000 | ||
| WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x08060000 | ||
| WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x08100000 | ||
| WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x081A0000 | ||
| FLAGS_HOME=0 | ||
| DISABLE_BACKUP=0 | ||
| IMAGE_HEADER_SIZE?=1024 | ||
| ARMORED=1 |
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
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
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
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 |
|---|---|---|
|
|
@@ -31,7 +31,9 @@ | |
| #include "hal/stm32h5.h" | ||
| #include "uart_drv.h" | ||
| #include "wolfboot/wolfboot.h" | ||
| #ifndef WOLFBOOT_NO_SIGN | ||
| #include "keystore.h" | ||
| #endif | ||
| #include "target.h" | ||
|
|
||
| #ifdef WOLFBOOT_TPM | ||
|
|
@@ -76,9 +78,20 @@ static int uart_poll(void); | |
| #define LED_BOOT_PIN (4) /* PG4 - Nucleo - Red Led */ | ||
| #define LED_USR_PIN (0) /* PB0 - Nucleo - Green Led */ | ||
| #define LED_EXTRA_PIN (4) /* PF4 - Nucleo - Orange Led */ | ||
| #define BOOT_TIME_PIN (13) /* PA13 - scope trigger */ | ||
|
|
||
| #ifdef WOLFBOOT_TEST_FILLER | ||
| #define FILLER_SIZE (64 * 1024) | ||
| static volatile uint8_t filler_data[FILLER_SIZE] = { 0x01, 0x02, 0x03 }; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it need 0x01, 0x02, 0x03? Meaning is zero init not allowed? I see 0xAA is filled below, so wondering why the init. |
||
| #endif | ||
|
|
||
| #define NVIC_USART3_IRQN (60) | ||
|
|
||
| #ifndef GPIOA_MODER | ||
| #define GPIOA_MODER (*(volatile uint32_t *)(GPIOA_BASE + 0x00)) | ||
| #define GPIOA_PUPDR (*(volatile uint32_t *)(GPIOA_BASE + 0x0C)) | ||
| #define GPIOA_BSRR (*(volatile uint32_t *)(GPIOA_BASE + 0x18)) | ||
| #endif | ||
|
|
||
| /* SysTick */ | ||
| static uint32_t cpu_freq = 250000000; | ||
|
|
@@ -119,6 +132,21 @@ static void boot_led_on(void) | |
| GPIOG_BSRR |= (1 << (pin)); | ||
| } | ||
|
|
||
| void boot_time_pin_on_early(void) | ||
| { | ||
| uint32_t reg; | ||
| uint32_t pin = BOOT_TIME_PIN; | ||
|
|
||
| RCC_AHB2ENR_CLOCK_ER |= GPIOA_AHB2ENR1_CLOCK_ER; | ||
| /* Delay after an RCC peripheral clock enabling */ | ||
| reg = RCC_AHB2ENR_CLOCK_ER; | ||
|
|
||
| reg = GPIOA_MODER & ~(0x03 << (pin * 2)); | ||
| GPIOA_MODER = reg | (1 << (pin * 2)); | ||
| GPIOA_PUPDR &= ~(0x03 << (pin * 2)); | ||
| GPIOA_BSRR |= (1 << (pin)); | ||
| } | ||
|
|
||
| static void boot_led_off(void) | ||
| { | ||
| GPIOG_BSRR |= (1 << (LED_BOOT_PIN + 16)); | ||
|
|
@@ -542,6 +570,7 @@ static int cmd_info(const char *args) | |
| printf("No image in update partition.\r\n"); | ||
| } | ||
|
|
||
| #ifndef WOLFBOOT_NO_SIGN | ||
| printf("\r\n"); | ||
| printf("Bootloader OTP keystore information\r\n"); | ||
| printf("====================================\r\n"); | ||
|
|
@@ -559,6 +588,10 @@ static int cmd_info(const char *args) | |
| printf(" ====================================\r\n "); | ||
| print_hex(keybuf, size, 0); | ||
| } | ||
| #else | ||
| printf("\r\n"); | ||
| printf("Signing disabled (SIGN=NONE)\r\n"); | ||
| #endif | ||
| return 0; | ||
| } | ||
|
|
||
|
|
@@ -1295,6 +1328,10 @@ void main(void) | |
| /* Turn on boot LED */ | ||
| boot_led_on(); | ||
|
|
||
| #ifdef WOLFBOOT_TEST_FILLER | ||
| filler_data[FILLER_SIZE - 1] = 0xAA; | ||
| #endif | ||
|
|
||
| /* Enable SysTick */ | ||
| systick_enable(); | ||
|
|
||
|
|
||
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent need 4 more spaces.