diff --git a/boards/xtensa/up_squared_adsp/bootloader/CMakeLists.txt b/boards/xtensa/up_squared_adsp/bootloader/CMakeLists.txt index e11ee03262fe..a2023cffe5ee 100644 --- a/boards/xtensa/up_squared_adsp/bootloader/CMakeLists.txt +++ b/boards/xtensa/up_squared_adsp/bootloader/CMakeLists.txt @@ -39,3 +39,7 @@ target_compile_options(bootloader PUBLIC -fno-inline-functions -mlongcalls -mtex target_link_libraries(bootloader PUBLIC -Wl,--no-check-sections -ucall_user_start -Wl,-static -nostdlib) target_link_libraries(bootloader PRIVATE -lhal -L${zephyr_sdk}/xtensa/intel_apl_adsp/xtensa-zephyr-elf/lib) target_link_libraries(bootloader PRIVATE -T${BOARD_DIR}/bootloader/boot_ldr.x) + +if(CONFIG_XTENSA_HAL) + target_link_libraries(bootloader PRIVATE XTENSA_HAL) +endif() diff --git a/boards/xtensa/up_squared_adsp/bootloader/boot_ldr.x b/boards/xtensa/up_squared_adsp/bootloader/boot_ldr.x index 94e669f86b11..2e07635c37c2 100644 --- a/boards/xtensa/up_squared_adsp/bootloader/boot_ldr.x +++ b/boards/xtensa/up_squared_adsp/bootloader/boot_ldr.x @@ -153,6 +153,7 @@ SECTIONS __stack = 0xBE000000 + (1 * 0x1000); __wnd0 = ((((((0xBE000000 + 0x8000) + 0x2000) + 0x800) + 0x800) + 0x1000) + 0x2000); __wnd0_size = (0x1000 + 0x1000); + .comment 0 : { *(.comment) } .debug 0 : { *(.debug) } .line 0 : { *(.line) } .debug_srcinfo 0 : { *(.debug_srcinfo) } @@ -170,6 +171,8 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } + .debug_ranges 0 : { *(.debug_ranges) } + .xtensa.info 0 : { *(.xtensa.info) } .xt.insn 0 : { KEEP (*(.xt.insn)) diff --git a/boards/xtensa/up_squared_adsp/bootloader/boot_loader.c b/boards/xtensa/up_squared_adsp/bootloader/boot_loader.c index 767616f2ee8f..ceaa48293fe0 100644 --- a/boards/xtensa/up_squared_adsp/bootloader/boot_loader.c +++ b/boards/xtensa/up_squared_adsp/bootloader/boot_loader.c @@ -24,7 +24,7 @@ extern void _ResetVector(); static inline void idelay(int n) { while (n--) { - asm volatile("nop"); + __asm__ volatile("nop"); } }