GDB zephyr.elf -- Asserts before main

I'm trying to use gdb to debug, I'm launching successfully and loading zephyr.elf. However, as I step through starting from reset.S the jump to "z_arm_prep_c" just asserts. The app works fine if I just flash it (.hex) fwiw.

Has anyone encountered this issue, or have suggestions at what I'm missing here?

(gdb) where
+where
#0 0xeffffffe in ?? ()
#1 0x0003b0d8 in z_arm_fault (msp=537039480, psp=<optimized out>, exc_return=<optimized out>, callee_regs=<optimized out>) at /home/kt/kt/src/embedded/ff/extern/ncs/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:1029
#2 0x0003b348 in z_arm_usage_fault () at /home/kt/kt/src/embedded/ff/extern/ncs/zephyr/arch/arm/core/aarch32/cortex_m/fault_s.S:102
#3 <signal handler called>
#4 assert_post_action (file=0x4 "\255$", file@entry=0x7c23c "WEST_TOPDIR/zephyr/arch/arm/core/aarch32/cortex_m/fault.c", line=line@entry=1029) at /home/kt/kt/src/embedded/ff/extern/ncs/zephyr/lib/os/assert.c:43
#5 0x0003b0d8 in z_arm_fault (msp=537039688, psp=<optimized out>, exc_return=<optimized out>, callee_regs=<optimized out>) at /home/kt/kt/src/embedded/ff/extern/ncs/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:1029
#6 0x0003b348 in z_arm_usage_fault () at /home/kt/kt/src/embedded/ff/extern/ncs/zephyr/arch/arm/core/aarch32/cortex_m/fault_s.S:102
#7 <signal handler called>
#8 0xaaaaaaaa in ?? ()


Flash starts up like:

I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Jumping to the first image slot

GDB Looks like

I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: none
E: Image in the primary slot is not valid!
E: Unable to find bootable image

Parents Reply Children
No Data
Related