masayuki2009 commented on PR #8926:
URL: https://github.com/apache/nuttx/pull/8926#issuecomment-1490256154
@tmedicci
I confirmed that the alarm example crashes on qemu-esp-develop-20220802
without this PR.
```
/home/ishikawa/opensource/QEMU/qemu-esp-develop-20220802/build/qemu-system-xtensa
-nographic -machine esp32 -smp 2 -drive
file=./nuttx/nuttx.merged.bin,if=mtd,format=raw
==2905475==WARNING: ASan doesn't fully support makecontext/swapcontext
functions and may produce false positives in some cases!
Adding SPI flash device
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x12 (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:0x3fff0030,len:6604
ho 0 tail 12 room 4
load:0x40078000,len:14780
load:0x40080400,len:3792
entry 0x40080694
I (1013) boot: ESP-IDF v4.4 2nd stage bootloader
I (1026) boot: compile time 19:32:08
I (1047) boot: chip revision: 0
I (1061) boot.esp32: SPI Speed : 40MHz
I (1063) boot.esp32: SPI Mode : DIO
I (1064) boot.esp32: SPI Flash Size : 4MB
I (1088) boot: Enabling RNG early entropy source...
I (1120) boot: Partition Table:
I (1121) boot: ## Label Usage Type ST Offset Length
I (1123) boot: 0 factory factory app 00 00 00010000 00100000
I (1143) boot: End of partition table
I (1162) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=09538h (
38200) map
I (1250) esp_image: segment 1: paddr=00019560 vaddr=3ffb3510 size=00260h (
608) load
I (1290) esp_image: segment 2: paddr=000197c8 vaddr=40080000 size=01e3ch (
7740) load
I (1339) esp_image: segment 3: paddr=0001b60c vaddr=50000000 size=00018h (
24) load
I (1374) esp_image: segment 4: paddr=0001b62c vaddr=00000000 size=049ech (
18924)
I (1433) esp_image: segment 5: paddr=00020020 vaddr=400d0020 size=1aab0h
(109232) map
I (1612) boot: Loaded app from partition at offset 0x10000
I (1614) boot: Disabling RNG early entropy source...
NuttShell (NSH) NuttX-12.0.0
nsh> uname -a
NuttX 12.0.0 f468371332-dirty Mar 30 2023 21:50:53 xtensa esp32-devkitc
nsh> ps
PID GROUP CPU PRI POLICY TYPE NPX STATE EVENT SIGMASK
STACK USED FILLED COMMAND
0 0 0 0 FIFO Kthread N-- Assigned 0000000000000000
003040 000792 26.0% CPU0 IDLE
1 1 1 0 FIFO Kthread N-- Running 0000000000000000
003032 000432 14.2% CPU1 IDLE
2 2 0 100 RR Task --- Running 0000000000000000
003000 001656 55.2% nsh_main
3 3 --- 223 RR Kthread --- Waiting Semaphore 0000000000000000
001984 000360 18.1% rt_timer
nsh> free
total used free largest nused nfree
Umem: 313472 15304 298168 175840 52 4
nsh> alarm 2
alarm_daemon started
alarm_daemon: Running
Opening /dev/rtc0
Alarm 0 set in 2 seconds
nsh> [CPU1] xtensa_panic: Unhandled Exception 1 task: alarm_daemon
[CPU1] _assert: Current Version: NuttX 12.0.0 f468371332-dirty Mar 30 2023
21:50:53 xtensa
[CPU1] _assert: Assertion failed panic: at file: common/xtensa_assert.c:84
task(CPU1): alarm_daemon 0x400e2590
[CPU1] up_dump_register: PC: 400803c0 PS: 00060430
[CPU1] up_dump_register: A0: 800d81ab A1: 3ffe22f8 A2: 00060430
A3: 3ffe1900
[CPU1] up_dump_register: A4: 00000001 A5: 3ffb03fa A6: 00000000
A7: 3ffe2410
[CPU1] up_dump_register: A8: 80081d65 A9: 3ffe22d8 A10: 00000000
A11: 00000002
[CPU1] up_dump_register: A12: 3ffb03fc A13: 3ffb0400 A14: 00060023
A15: 00060820
[CPU1] up_dump_register: SAR: 0000001f CAUSE: 00000000 VADDR: 00000000
[CPU1] up_dump_register: LBEG: 400d4aa8 LEND: 400d4abf LCNT: 00000000
```
However, it seems that the alarm daemon does not receive any events with
this PR.
```
NuttShell (NSH) NuttX-10.3.0
nsh> uname -a
NuttX 10.3.0 b2c8be28b1-dirty Mar 30 2023 21:42:55 xtensa esp32-devkitc
nsh> ps
PID GROUP CPU PRI POLICY TYPE NPX STATE EVENT SIGMASK
STACK USED FILLED COMMAND
0 0 0 0 FIFO Kthread N-- Assigned 0000000000000000
003040 000768 25.2% CPU0 IDLE
1 1 1 0 FIFO Kthread N-- Running 0000000000000000
003032 000432 14.2% CPU1 IDLE
2 2 0 100 RR Task --- Running 0000000000000000
003000 001896 63.2% nsh_main
3 3 --- 223 RR Kthread --- Waiting Semaphore 0000000000000000
001984 000360 18.1% rt_timer
nsh> free
total used free largest nused nfree
Umem: 313472 15304 298168 175840 52 4
nsh> alarm 2
alarm_daemon started
alarm_daemon: Running
Opening /dev/rtc0
Alarm 0 set in 2 seconds
nsh>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]