-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mimxrt1170_evk/mimxrt1176/cm7 Flashing bug !! #73234
Comments
Hi @mellila-abd! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
This appears to be a duplicate of #70271, if you disagree please reopen the issue |
This is indeed a distinct issue: In the previously mentioned issue, although an error is reported during the verification phase, the image is successfully loaded. However, in the issue I've opened, the problem is that after flashing the board once with Zephyr version 3.6, subsequent flashes become impossible. Even though the last flashed image still works, it's not feasible to load a new program. It's as if communication with the CPU is disrupted, possibly due to JTAG deactivation or interference. Regarding the issue I've raised: Describe the Bug: Zephyr version 3.6 causes the board to enter a state where it cannot be flashed a second time. Initially, flashing with this version works fine, but subsequent attempts fail. Error Messages: From pyocd gdb server Unhandled exception in handle_message (b'v'): flash init failure (result code 0x1) [gdbserver] From gdb: Error finishing flash operation Workaround:
However, this workaround doesn't work with Zephyr 3.6. |
I'm unable to reopen the issue since it was closed by you,so I don't have the authority to reopen it. |
@danieldegrasse can you review the details here based on the additional information @mellila-abd provided? |
To be clear here, can you reflash another Zephyr 3.6 image when you adjust the boot mode using the DIP switches on the board, and have that image run fine? Futhermore, are you running Zephyr 3.6, or the latest revision of |
Hi @mellila-abd and @danieldegrasse , This issue is not specific to Zephyr. I can replicate the same issue with pyOCD using an example app from the MCUXpresso SDK v2.15. pyOCD needs to be updated to support the new FCB. I created this pyOCD issue pyocd/pyOCD#1698. I am removing the bug label for this Zephyr issue. And I think we should close this Zephyr issue here, since this is not specific to Zephyr, and requires an update in pyOCD. Thanks |
not sure how we are going to get an update to pyOCD? |
We can change the version required in requirements.txt (once pyOCD makes the fix) |
what I meant was who would make the change to pyOCD |
Issue moved to pyOCD ecosystem: pyocd/pyOCD#1698 |
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
" west build -p always -b mimxrt1170_evk/mimxrt1176/cm7 samples/hello_world/ "
"pyocd gdbserver"
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
The text was updated successfully, but these errors were encountered: