Skip to content

Commit 3b1ef9d

Browse files
twcook86danielinux
authored andcommitted
Address copilot pr comments.
1 parent 304aee5 commit 3b1ef9d

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

docs/Targets.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,6 @@ Booting version: 0x1
20162016
lpc55s69 init
20172017
boot: ver=0x1 state=0xFF
20182018
update: ver=0x0 state=0xFF
2019-
Hello from firmware version 1
20202019
Calling wolfBoot_success()
20212020
boot: ver=0x1 state=0x00
20222021
update: ver=0x0 state=0xFF
@@ -2048,7 +2047,6 @@ Booting version: 0x1
20482047
lpc55s69 init
20492048
boot: ver=0x1 state=0x00
20502049
update: ver=0x2 state=0xFF
2051-
Hello from firmware version 1
20522050
Update detected, version: 0x2
20532051
Triggering update...
20542052
boot: ver=0x1 state=0x00
@@ -2226,7 +2224,6 @@ Booting version: 0x2
22262224
lpc55s69 init
22272225
boot: ver=0x2 state=0x10
22282226
update: ver=0x1 state=0xFF
2229-
Hello from firmware version 2
22302227
Calling wolfBoot_success()
22312228
boot: ver=0x2 state=0x00
22322229
update: ver=0x1 state=0xFF

hal/lpc55s69-ns.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MEMORY
22
{
3-
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = @BOOTLOADER_PARTITION_SIZE@
3+
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = @WOLFBOOT_PARTITION_BOOT_ADDRESS@
44
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 32K
55
}
66

hal/lpc55s69.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,10 @@ void hal_init(void)
8484
// BOARD_BootClockPLL150M();
8585
#ifdef DEBUG_UART
8686
uart_init();
87+
uart_write("lpc55s69 init\n", 14);
8788
#endif
8889
#endif
8990

90-
uart_write("lpc55s69 init\n", 14);
91-
9291
#if defined(__WOLFBOOT) || !defined(TZEN)
9392
memset(&pflash, 0, sizeof(pflash));
9493
FLASH_Init(&pflash);
@@ -195,6 +194,7 @@ int hal_trng_get_entropy(unsigned char *out, unsigned int len)
195194
#define IOCON_PIO_OPENDRAIN_DI 0x00u /*!<@brief Open drain is disabled */
196195
#define IOCON_PIO_SLEW_STANDARD 0x00u /*!<@brief Standard mode, output slew rate control is enabled */
197196

197+
#ifdef DEBUG_UART
198198
void uart_init(void)
199199
{
200200
CLOCK_EnableClock(kCLOCK_Iocon);
@@ -262,3 +262,4 @@ void uart_write(const char *buf, unsigned int sz)
262262
sz -= line_sz + 1U;
263263
}
264264
}
265+
#endif

include/wolfboot/wolfboot.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ extern "C" {
489489
#define IMG_STATE_NEW 0x00
490490
#define IMG_STATE_UPDATING 0x8F
491491
#define IMG_STATE_TESTING 0xEF
492-
#define IMG_STATE_FINAL_FLAGS 0xCF
492+
#define IMG_STATE_FINAL_FLAGS 0xBF
493493
#define IMG_STATE_SUCCESS 0xFF
494494
#define FLASH_BYTE_ERASED 0x00
495495
#define FLASH_WORD_ERASED 0x00000000UL

test-app/app_lpc55s69.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,16 @@ void main(void)
110110

111111
check_parts(&boot_ver, &update_ver, &boot_state, &update_state);
112112

113-
wolfBoot_printf("Hello from firmware version %d\n", boot_ver);
114-
115113
if (
116114
boot_ver != 0 &&
117115
(boot_state == IMG_STATE_TESTING || boot_state == IMG_STATE_NEW)
118116
)
119117
{
120-
wolfBoot_printf("Calling wolfBoot_success()\n");
121118
#ifdef WOLFCRYPT_SECURE_MODE
119+
wolfBoot_printf("Calling wolfBoot_nsc_success()\n");
122120
wolfBoot_nsc_success();
123121
#else
122+
wolfBoot_printf("Calling wolfBoot_success()\n");
124123
wolfBoot_success();
125124
#endif
126125
check_parts(&boot_ver, &update_ver, &boot_state, &update_state);

0 commit comments

Comments
 (0)