-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Arch: armIssues related to ARM (32-bit) architectureIssues related to ARM (32-bit) architectureArea: Board supportBoard support issuesBoard support issuesOS: LinuxIssues related to Linux (building system, etc)Issues related to Linux (building system, etc)Type: BugSomething isn't workingSomething isn't working
Description
Description / Steps to reproduce the issue
(I'm testing on an Adafruit Feather RP2350, so the LED is on a different pin, the flash is larger, etc., but I don't think that's relevant here.)
NuttX doesn't seem to work as expected. Connecting with gdb using the Pi Debug Probe, I see it's in the hard fault handler:
#0 up_mdelay (milliseconds=milliseconds@entry=250) at common/arm_mdelay.c:53
#1 0x10000f6a in reset_board () at misc/assert.c:811
#2 0x10000f9c in _assert (filename=filename@entry=0x0, linenum=linenum@entry=0, msg=msg@entry=0x1001878c "panic", regs=<optimized out>) at misc/assert.c:910
#3 0x100008a4 in arm_hardfault (irq=<optimized out>, context=<optimized out>, arg=<optimized out>) at armv8-m/arm_hardfault.c:147
#4 0x100009e2 in arm_doirq (irq=3, regs=0x20003580) at armv8-m/arm_doirq.c:111
#5 0x10000934 in exception_common () at armv8-m/arm_exception.S:218
#6 0x100013b6 in sched_unlock () at sched/sched_unlock.c:242
#7 0x10000cb8 in nx_start () at init/nx_start.c:770
#8 0x10000168 in __start () at chip/rp23xx_start.c:173
Bisecting, this seems to start with 0e1b432. Using the previous commit, or reverting that commit on master, prevents this, and it's able to run the nsh task.
That commit removed the code in arch/arm/src/armv8-m/arm_hardfault.c that forwarded to arm_svcall if a hard fault was triggered by svc 0. That may be correct, but I guess something needs to be changed to make sure a hard fault doesn't happen here.
On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Debian Sid
NuttX Version
master (5f4a15b)
Issue Architecture
[Arch: arm]
Issue Area
[Area: Board support]
Verification
- I have verified before submitting the report.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Arch: armIssues related to ARM (32-bit) architectureIssues related to ARM (32-bit) architectureArea: Board supportBoard support issuesBoard support issuesOS: LinuxIssues related to Linux (building system, etc)Issues related to Linux (building system, etc)Type: BugSomething isn't workingSomething isn't working