Skip to content

mimxrt1170_evk/mimxrt1176/cm7 Flashing bug !!  #73234

@mellila-abd

Description

@mellila-abd

Describe the bug

Zephyr version 3.6 puts the card in a state where it can no longer be flashed a second time.
When the card is flashed a first time with this new version, the code works correctly, but this
puts the card in a state where a second flash becomes impossible.

  • message error from pyocd gdb server :
    Unhandled exception in handle_message (b'v'): flash init failure (result code 0x1) [gdbserver]

  • message error from gdb :
    Error finishing flash operation

More details :
arm-none-eabi-gdb -q build/zephyr/zephyr.elf
Reading symbols from build/zephyr/zephyr.elf...
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
__enable_irq () at /home/abderram/zephyr3.6/modules/hal/cmsis/CMSIS/Core/Include/cmsis_gcc.h:951
Python Exception <class 'ModuleNotFoundError'>: No module named 'gdb.styling'
951 __ASM volatile ("cpsie i" : : : "memory");
(gdb) load
Loading section rom_start, size 0x23a8 lma 0x30000000
Loading section text, size 0x4858 lma 0x300023a8
Loading section .ARM.exidx, size 0x8 lma 0x30006c00
Loading section initlevel, size 0xb8 lma 0x30006c08
Loading section device_area, size 0x154 lma 0x30006cc0
Loading section sw_isr_table, size 0x6d0 lma 0x30006e14
Loading section rodata, size 0x2828 lma 0x300074e4
Loading section datas, size 0x1c lma 0x30009d0c
Loading section device_states, size 0x22 lma 0x30009d28
Loading section .last_section, size 0x4 lma 0x30009d4a
Error finishing flash operation
(gdb) bt
#0 __enable_irq ()
at /home/abderram/zephyr3.6/modules/hal/cmsis/CMSIS/Core/Include/cmsis_gcc.h:951
#1 arch_cpu_idle () at /home/abderram/zephyr3.6/zephyr/arch/arm/core/cortex_m/cpu_idle.c:96
#2 0x300069c6 in k_cpu_idle () at /home/abderram/zephyr3.6/zephyr/include/zephyr/kernel.h:5868
#3 idle (unused1=, unused2=, unused3=)
at /home/abderram/zephyr3.6/zephyr/kernel/idle.c:89
#4 0xa28a4f2a in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

  • What target platform are you using?
    mimxrt1170_evk/mimxrt1176/cm7

  • What have you tried to diagnose or workaround this issue?
    The changing of the device tree

To Reproduce

  1. build a sample programme from zephyr :
    " west build -p always -b mimxrt1170_evk/mimxrt1176/cm7 samples/hello_world/ "
  2. open a server with pyocd :
    "pyocd gdbserver"
  3. flasg the programme
  • arm-none-eabi-gdb -q build/zephyr/zephyr.elf
  • target remote localhost:3333
  • load
  1. it will work with no problem, then try to re flash the board again :
  2. See error :
    Error finishing flash operation. in gdb

to reuse the card :
Change the boot mode by changing the switch values. Flash an uncorrupted program : " return to the old version of zephyr " the 3.5 and load a new sample". Then reset the initial boot mode and you can reflash your card normally using this old version with no problems.

but still not working with zephyr 3.6

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions