diff --git a/core/embed/projects/bootloader/workflow/wf_host_control.c b/core/embed/projects/bootloader/workflow/wf_host_control.c index f815b7e14b..8fadfc66ab 100644 --- a/core/embed/projects/bootloader/workflow/wf_host_control.c +++ b/core/embed/projects/bootloader/workflow/wf_host_control.c @@ -42,9 +42,7 @@ workflow_result_t workflow_host_control(const vendor_header *const vhdr, const image_header *const hdr, void (*redraw_wait_screen)(void)) { wire_iface_t usb_iface = {0}; - wire_iface_t ble_iface = {0}; protob_io_t protob_usb_iface = {0}; - protob_io_t protob_ble_iface = {0}; redraw_wait_screen(); @@ -53,10 +51,16 @@ workflow_result_t workflow_host_control(const vendor_header *const vhdr, usb_iface_init(&usb_iface, (vhdr == NULL && hdr == NULL) ? sectrue : secfalse); - ble_iface_init(&ble_iface); protob_init(&protob_usb_iface, &usb_iface); + + #ifdef USE_BLE + wire_iface_t ble_iface = {0}; + protob_io_t protob_ble_iface = {0}; + ble_iface_init(&ble_iface); protob_init(&protob_ble_iface, &ble_iface); + #endif + workflow_result_t result = WF_ERROR_FATAL; diff --git a/core/embed/rust/src/ui/api/bootloader_c.rs b/core/embed/rust/src/ui/api/bootloader_c.rs index 0dcf61a100..04afd7e2b3 100644 --- a/core/embed/rust/src/ui/api/bootloader_c.rs +++ b/core/embed/rust/src/ui/api/bootloader_c.rs @@ -145,6 +145,7 @@ extern "C" fn screen_wipe_fail() { ModelUI::screen_wipe_fail() } +#[cfg(feature = "ble")] #[no_mangle] extern "C" fn screen_confirm_pairing(code: *const cty::c_char, initial_setup: bool) -> u32 { let code = unwrap!(unsafe { from_c_array(code, 6) }); diff --git a/core/embed/rust/src/ui/layout_bolt/bootloader/mod.rs b/core/embed/rust/src/ui/layout_bolt/bootloader/mod.rs index 92324ab0af..741f6821a5 100644 --- a/core/embed/rust/src/ui/layout_bolt/bootloader/mod.rs +++ b/core/embed/rust/src/ui/layout_bolt/bootloader/mod.rs @@ -21,9 +21,9 @@ use super::{ self, bootloader::{ button_bld, button_bld_menu, button_confirm, button_wipe_cancel, button_wipe_confirm, - BLD_BG, BLD_FG, BLD_TITLE_COLOR, BLD_WIPE_COLOR, CHECK24, CHECK40, DOWNLOAD32, FIRE32, - FIRE40, RESULT_FW_INSTALL, RESULT_INITIAL, RESULT_WIPE, TEXT_BOLD, TEXT_NORMAL, - TEXT_WIPE_BOLD, TEXT_WIPE_NORMAL, WARNING40, WELCOME_COLOR, X24, + BLD_BG, BLD_FG, BLD_TITLE_COLOR, BLD_WARN_COLOR, BLD_WIPE_COLOR, CHECK24, CHECK40, + DOWNLOAD32, FIRE32, FIRE40, RESULT_FW_INSTALL, RESULT_INITIAL, RESULT_WIPE, TEXT_BOLD, + TEXT_NORMAL, TEXT_WIPE_BOLD, TEXT_WIPE_NORMAL, WARNING40, WELCOME_COLOR, X24, }, FG, }, @@ -41,7 +41,8 @@ use crate::ui::{ use ufmt::uwrite; -use super::theme::bootloader::{button_confirm_initial, button_initial, BLD_WARN_COLOR}; +#[cfg(feature = "ble")] +use super::theme::bootloader::{button_confirm_initial, button_initial}; use intro::Intro; use menu::Menu;