Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get a run error "Fatal exception (28): LoadProhibited" while enable CONFIG_NEWLIB_LIBC=y #46093

Closed
sam131208 opened this issue May 28, 2022 · 1 comment · Fixed by #46106
Closed
Assignees
Labels
area: mcumgr bug The issue is a bug, or the PR is fixing a bug platform: ESP32 Espressif ESP32

Comments

@sam131208
Copy link

Describe the bug
Get a run error "Fatal exception (28): LoadProhibited" while enable CONFIG_NEWLIB_LIBC=y.

To Reproduce
Steps to reproduce the behavior:

  1. modify samples/subsys/mgmt/mcumgr/smp_svr/overlay-bt.conf , delete CONFIG_MCUMGR_SMP_SHELL=y, add CONFIG_NEWLIB_LIBC=y
  2. west build -b esp32 samples/subsys/mgmt/mcumgr/smp_svr -- -DOVERLAY_CONFIG=overlay-bt.conf
  3. west flash

Logs and console output
============ PuTTY log 2022.05.28 18:25:44 ============
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff8598,len:4908
ho 0 tail 12 room 4
load:0x40093000,len:13804
load:0x4009b800,len:5976
entry 0x40093448
[esp32] [INF] Enabling RNG early entropy source...
[esp32] [INF] *** Booting MCUboot build v1.7.0-485-ge86f575 ***
[esp32] [INF] Primary image: magic=good, swap_type=0x1, copy_done=0x3, image_ok=0x1
[esp32] [INF] Scratch: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
[esp32] [INF] Boot source: primary slot
[esp32] [INF] Swap type: none
[esp32] [INF] Disabling RNG early entropy source...
[esp32] [INF] br_image_off = 0x10000
[esp32] [INF] ih_hdr_size = 0x20
[esp32] [INF] Loading image 0 - slot 0 from flash, area id: 1
[esp32] [INF] DRAM segment: start=0x58a6, size=0x1dcc, vaddr=0x3ffbdb60
[esp32] [INF] IRAM segment: start=0x7674, size=0x187dc, vaddr=0x40080000
[esp32] [INF] start=0x4009052c
Fatal exception (28): LoadProhibited
epc1=0x40096f6f, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000

Under is the zephyr.map file:
0x0000000040096f64 0x11d /home/sam/zephyr-sdk-0.14.2/xtensa-espressif_esp32_zephyr-elf/xtensa-espressif_esp32_zephyr-elf/lib/./libc.a(lib_a-svfiprintf.o)
0x121 (size before relaxing)
0x0000000040096f64 __ssprint_r
fill 0x0000000040097081 0x3

Environment (please complete the following information):

  • OS: ubuntu
  • Toolchain: Zephyr SDK 0.14.2
  • zephyr ver 3.1 rc2
@sam131208 sam131208 added the bug The issue is a bug, or the PR is fixing a bug label May 28, 2022
@sylvioalves
Copy link
Collaborator

sylvioalves commented May 28, 2022

@sam131208 This error is happening due to a missing PR in zephyr's mcuboot: mcu-tools/mcuboot#1362
This should be already synced but it was not. I asked maintainers to take a look. This is same root cause for this: #45349.
So I will close this as duplicated, ok?
Would you try using upstream mcuboot instead?

nvlsianpu added a commit to nvlsianpu/zephyr that referenced this issue May 31, 2022
bring fix from mcu-tools/mcuboot:

- espressif:esp32: Move app entry point call back to
  iram_loader_seg region

fixes zephyrproject-rtos#45349
fixes zephyrproject-rtos#46093

Signed-off-by: Andrzej Puzdrowski <[email protected]>
carlescufi pushed a commit that referenced this issue Jun 5, 2022
bring fix from mcu-tools/mcuboot:

- espressif:esp32: Move app entry point call back to
  iram_loader_seg region

fixes #45349
fixes #46093

Signed-off-by: Andrzej Puzdrowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: mcumgr bug The issue is a bug, or the PR is fixing a bug platform: ESP32 Espressif ESP32
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants