Open rana-roy opened 1 month ago
Can you confirm that the same sample works without MCUboot first. There is possibility that there is something not properly de-initialized before control is passed to an application and was accidentally initialized while executing MCUboot.
I have assigned the issue to myself and set severity for low. If the scenario above will not confirm I will reassign the issue to platform maintainer and ask for re-evaluation of severity.
Can you confirm that the same sample works without MCUboot first.
Yes, both the things work properly when they are handled individually.
The ADC counts are proper when the sample is built without sysbuild. And, the MCUboot works when built with another sample code.
How other sample works with MCUboot does not matter. We need to figure out whether MCUboot affects this specific sample.
Can you build the ADC sample for MCUBoot without sysbuild and MCUboot separately, upload those to pre-erased board and check if that shows the same symptoms? To build application for MCUboot you need to set CONFIG_BOOTLOADER_MCUBOOT=y.
Can you build the ADC sample for MCUBoot without sysbuild and MCUboot separately, upload those to the pre-erased board, and check if that shows the same symptoms? To build the application for MCUboot you need to set CONFIG_BOOTLOADER_MCUBOOT=y.
Thank you for getting back to me so quickly. I followed the steps you suggested:
The behavior of the board is expected. I can get the ADC readings on the console.
https://github.com/zephyrproject-rtos/zephyr/pull/73480. Thank you for your support! You have mentioned the ESP32-S3 chip. But, I am facing an issue with the ESP32-C3 chip.
Thank you for getting back to me so quickly. I followed the steps you suggested:
1. Erased the board using the esptool.py erase_flash 2. Built and flashed the MCUboot separately using ninja -C build/ flash from the bootloader/mcuboot/boot/espressif 3. Added the macro in the prj.conf file 4. Built and flashed the Zephyr ADC sample code into the ESP32C3 devkitm
The behavior of the board is expected. I can get the ADC readings on the console.
OK so it does not be seem to be issue with MCUboot,
#73480. Thank you for your support! You have mentioned the ESP32-S3 chip. But, I am facing an issue with the ESP32-C3 chip.
@marekmatej Do you maybe have any ideas here? And why separate building MCUboot and app seems to work?
2. Built and flashed the MCUboot separately using ninja -C build/ flash from the bootloader/mcuboot/boot/espressif
@rana-roy The boot/zephyr
is used in Espressif port of MCUboot. To build the MCUboot Zephyr port please use boot/zephyr
. The Zephyr port is used during the --sysbuild
.
@de-nordic The recent changes in Zephyr bring additional code to iram0.text
section, which size was optimised in MCUboot Zephyr port. This can be fixed easily by increasing the segment length (https://github.com/zephyrproject-rtos/zephyr/pull/73292), but there are clock related issues in other SOCs, which we are fixing now.
And why separate building MCUboot and app seems to work?
The reason for separate build works is because --sysbuild
is using sources from west.yml, while separate build use the sources you choose to use.
And why separate building MCUboot and app seems to work?
The reason for separate build works is because
--sysbuild
is using sources from west.yml, while separate build use the sources you choose to use.
Thanks, I have not noticed that different MCUboot path is used.
@rana-roy Is the issue still present after https://github.com/zephyrproject-rtos/zephyr/pull/73292 got merged?
@rana-roy Can you verify whether issue is there and close the report if does not apply anymore?
Tested esp32c3_devkitm with samples/drivers/adc/adc_dt
. Works with https://github.com/zephyrproject-rtos/zephyr/pull/75533
Describe the bug The sample zephyr/samples/drivers/adc builds successfully for the esp32c3_devkitm in both cases, the simple west build and sysbuild for MCUboot. The issue is when I just use the west build, it displays the console logs for the ADC readings, while in case of sysbuild, it does not display any logs over the console.
To Reproduce Steps to reproduce the behavior:
Expected behavior The logs should be visible over the console for both the builds.
Environment: