File tree Expand file tree Collapse file tree 6 files changed +37
-9
lines changed
bootutil/include/bootutil/crypto Expand file tree Collapse file tree 6 files changed +37
-9
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,7 @@ static inline void bootutil_aes_ctr_init(bootutil_aes_ctr_context *ctx)
8787
8888static inline void bootutil_aes_ctr_drop (bootutil_aes_ctr_context * ctx )
8989{
90- /* XXX: config defines MBEDTLS_PLATFORM_NO_STD_FUNCTIONS so no need to free */
91- /* (void)mbedtls_aes_free(ctx); */
92- (void )ctx ;
90+ mbedtls_aes_free (ctx );
9391}
9492
9593static inline int bootutil_aes_ctr_set_key (bootutil_aes_ctr_context * ctx , const uint8_t * k )
Original file line number Diff line number Diff line change @@ -45,9 +45,7 @@ static inline void bootutil_aes_kw_init(bootutil_aes_kw_context *ctx)
4545
4646static inline void bootutil_aes_kw_drop (bootutil_aes_kw_context * ctx )
4747{
48- /* XXX: config defines MBEDTLS_PLATFORM_NO_STD_FUNCTIONS so no need to free */
49- /* (void)mbedtls_aes_free(ctx); */
50- (void )ctx ;
48+ mbedtls_nist_kw_free (ctx );
5149}
5250
5351static inline int bootutil_aes_kw_set_unwrap_key (bootutil_aes_kw_context * ctx , const uint8_t * k , uint32_t klen )
Original file line number Diff line number Diff line change @@ -134,9 +134,7 @@ static inline int bootutil_sha_init(bootutil_sha_context *ctx)
134134
135135static inline int bootutil_sha_drop (bootutil_sha_context * ctx )
136136{
137- /* XXX: config defines MBEDTLS_PLATFORM_NO_STD_FUNCTIONS so no need to free */
138- /* (void)mbedtls_sha256_free(ctx); */
139- (void )ctx ;
137+ mbedtls_sha256_free (ctx );
140138 return 0 ;
141139}
142140
Original file line number Diff line number Diff line change @@ -748,6 +748,12 @@ config BOOT_USB_DFU_DETECT_DELAY
748748
749749endif # BOOT_USB_DFU_GPIO
750750
751+ config BOOT_USB_DFU_NO_APPLICATION
752+ bool "Stay in bootloader if no application"
753+ help
754+ Allows for entering USB DFU recovery mode if there is no bootable
755+ application that the bootloader can jump to.
756+
751757config BOOT_USE_BENCH
752758 bool "Enable benchmark code"
753759 default n
Original file line number Diff line number Diff line change @@ -566,6 +566,14 @@ int main(void)
566566 * recovery mode
567567 */
568568 boot_serial_enter ();
569+ #elif defined(CONFIG_BOOT_USB_DFU_NO_APPLICATION )
570+ rc = usb_enable (NULL );
571+ if (rc && rc != - EALREADY ) {
572+ BOOT_LOG_ERR ("Cannot enable USB" );
573+ } else {
574+ BOOT_LOG_INF ("Waiting for USB DFU" );
575+ wait_for_usb_dfu (K_FOREVER );
576+ }
569577#endif
570578
571579 FIH_PANIC ;
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ CONFIG_BOOT_MAX_IMG_SECTORS=512
5+ CONFIG_BOOT_UPGRADE_ONLY=y
6+ CONFIG_BOOT_VALIDATE_SLOT0=n
7+ CONFIG_BOOT_SIGNATURE_TYPE_NONE=y
8+ CONFIG_BOOT_BANNER=n
9+
10+ CONFIG_UART_CONSOLE=n
11+ CONFIG_CONSOLE=n
12+ CONFIG_SERIAL=n
13+
14+ CONFIG_MCUBOOT_LOG_LEVEL_OFF=y
15+ CONFIG_LOG_DEFAULT_LEVEL=0
16+ CONFIG_DEBUG=n
17+
18+ CONFIG_XIP=n
19+ CONFIG_HEAP_MEM_POOL_SIZE=4096
20+ CONFIG_MINIMAL_LIBC=y
You can’t perform that action at this time.
0 commit comments