mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
bootloader: Kconfig files in bootloader_components is now part of menuconfig
It is now possible to configure the options (Kconfig) of bootloader components directly from the menuconfig
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
menu "Bootloader welcome message"
|
||||
|
||||
config EXAMPLE_BOOTLOADER_WELCOME_MESSAGE
|
||||
string "Bootloader welcome message"
|
||||
default "Custom bootloader message defined in the KConfig file."
|
||||
help
|
||||
Message to print by the custom bootloader when booting up.
|
||||
endmenu
|
@@ -4,6 +4,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <stdbool.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_log.h"
|
||||
#include "bootloader_init.h"
|
||||
#include "bootloader_utility.h"
|
||||
@@ -41,7 +42,7 @@ void __attribute__((noreturn)) call_start_cpu0(void)
|
||||
}
|
||||
|
||||
// 2.1 Print a custom message!
|
||||
esp_rom_printf("[%s] Custom bootloader has been initialized correctly.\n", TAG);
|
||||
esp_rom_printf("[%s] %s\n", TAG, CONFIG_EXAMPLE_BOOTLOADER_WELCOME_MESSAGE);
|
||||
|
||||
// 3. Load the app image for booting
|
||||
bootloader_utility_load_boot_image(&bs, boot_index);
|
||||
|
@@ -10,7 +10,10 @@ def test_custom_bootloader_impl_example(env, _): # type: ignore
|
||||
dut.start_app()
|
||||
|
||||
# Expect to read a message from the custom bootloader
|
||||
dut.expect('Custom bootloader has been initialized correctly.')
|
||||
# This message is defined in the Kconfig file, retrieve it while deleting
|
||||
# leading and trailing quotes (")
|
||||
welcome_message = dut.app.get_sdkconfig()['CONFIG_EXAMPLE_BOOTLOADER_WELCOME_MESSAGE'].strip("\"")
|
||||
dut.expect(welcome_message)
|
||||
|
||||
# Expect to read a message from the user application
|
||||
dut.expect('Application started!')
|
||||
|
Reference in New Issue
Block a user