Skip to content

Commit ef4966c

Browse files
committed
Address copilot pr comments.
1 parent 1bfd5b1 commit ef4966c

5 files changed

Lines changed: 7 additions & 10 deletions

File tree

docs/Targets.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,6 @@ Booting version: 0x1
18111811
lpc55s69 init
18121812
boot: ver=0x1 state=0xFF
18131813
update: ver=0x0 state=0xFF
1814-
Hello from firmware version 1
18151814
Calling wolfBoot_success()
18161815
boot: ver=0x1 state=0x00
18171816
update: ver=0x0 state=0xFF
@@ -1843,7 +1842,6 @@ Booting version: 0x1
18431842
lpc55s69 init
18441843
boot: ver=0x1 state=0x00
18451844
update: ver=0x2 state=0xFF
1846-
Hello from firmware version 1
18471845
Update detected, version: 0x2
18481846
Triggering update...
18491847
boot: ver=0x1 state=0x00
@@ -2021,7 +2019,6 @@ Booting version: 0x2
20212019
lpc55s69 init
20222020
boot: ver=0x2 state=0x10
20232021
update: ver=0x1 state=0xFF
2024-
Hello from firmware version 2
20252022
Calling wolfBoot_success()
20262023
boot: ver=0x2 state=0x00
20272024
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
@@ -477,7 +477,7 @@ extern "C" {
477477
#define IMG_STATE_NEW 0x00
478478
#define IMG_STATE_UPDATING 0x8F
479479
#define IMG_STATE_TESTING 0xEF
480-
#define IMG_STATE_FINAL_FLAGS 0xCF
480+
#define IMG_STATE_FINAL_FLAGS 0xBF
481481
#define IMG_STATE_SUCCESS 0xFF
482482
#define FLASH_BYTE_ERASED 0x00
483483
#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)