nrf5340 2.6 to 2.9 migration issues

We have developed device that used 2.6 and when moving to 2.9 everything broke apart and I cant get it to boot and I cant get any output from device. Be it from USB or SWD pins (as its custom board). 

It worked a week ago but one day it just broke, note that it worked for months on 2.9. I've isolated the issue to configuration and not code. 

As I need P0.11 and P0.09 I've remaped them based on 

 RE: nrf5340 Gpio forwarder availibility 

but that triggered something in build. It looked like there were some remnant 2.6 configs or something. 

Now, im totaly confused. Anything I do results in failed compilation and if it does not for some reason or a another (a lot of testing) the device wont boot and I cant get any debug information out of it. 

Please provide what files or info you need to help me diagnose this issue.

Regards, 

Parents
  • Hi,

    Are you able to share a minimal version of your project that will allow me to review the configuration reproduce this booting issue on a nRF5340 DK board? If not, please provide as much relevant information as you can. For example, the complete build output showing the build errors and the project configuration file (prj.conf, sysbuild.conf, etc).

    Best regards,

    Vidar

  • Thank you,I will keep in mind the migration documentation, 
    it compiles but device wont turn on, no usb, cant see whats happening on it. :(
    Its on custom board  that is programed using SWD pins (I need to emphasize that it worked for months before this, situation). 
    Ive added 

    CONFIG_USB_CDC_ACM=y
    CONFIG_SERIAL=y

    CONFIG_UART_CONSOLE=y


    prior it was enough to just
    BUILD_ASSERT(DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_console), zephyr_cdc_acm_uart), "Console device is not ACM CDC UART device");
    an have it defined in overlay. As I have a simplified version of current device that is on 2.6 and USB, "just works". I can printk to it. 
  • I suggest you try to debug your application in VS code and see if the program hangs in the bootloader or application. Does your custom board have the exact same QSPI FLASH IC as the DK? MCUBoot will not boot the application if communication with the external flash fails (current configuration has the secondary mcuboot slot in placed in this flash).

  • The flash on custom board is MX25r6435.

    JLinkGDBServerCL: SEGGER J-Link GDB Server V7.88j Command Line Version
    JLinkGDBServerCL:
    JLinkGDBServerCL: JLinkARM.dll V7.88j (DLL compiled Jun 28 2023 13:39:15)
    JLinkGDBServerCL:
    JLinkGDBServerCL: -----GDB Server start settings-----
    JLinkGDBServerCL: GDBInit file: none
    JLinkGDBServerCL: GDB Server Listening port: 50555
    JLinkGDBServerCL: SWO raw output listening port: 2332
    JLinkGDBServerCL: Terminal I/O port: 2333
    JLinkGDBServerCL: Accept remote connection: localhost only
    JLinkGDBServerCL: Generate logfile: off
    JLinkGDBServerCL: Verify download: off
    JLinkGDBServerCL: Init regs on start: off
    JLinkGDBServerCL: Silent mode: on
    JLinkGDBServerCL: Single run mode: on
    JLinkGDBServerCL: Target connection timeout: 0 ms
    JLinkGDBServerCL: ------J-Link related settings------
    JLinkGDBServerCL: J-Link Host interface: USB
    JLinkGDBServerCL: J-Link script: none
    JLinkGDBServerCL: J-Link settings file: none
    JLinkGDBServerCL: ------Target related settings------
    JLinkGDBServerCL: Target device: nrf5340_xxaa_app
    JLinkGDBServerCL: Target device parameters: none
    JLinkGDBServerCL: Target interface: SWD
    JLinkGDBServerCL: Target interface speed: 4000kHz
    JLinkGDBServerCL: Target endian: little
    JLinkGDBServerCL:
    =thread-group-added,id="i1"
    =cmd-param-changed,param="pagination",value="off"
    context_boot_go (state=state@entry=0x20003624 <boot_data>, rsp=rsp@entry=0x2004815c <z_main_stack+36124>) at C:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/src/loader.c:2694
    2694 FIH_PANIC;
    [New Remote target]
    [New Thread 2645248]
    [New Thread -1]

Reply
  • The flash on custom board is MX25r6435.

    JLinkGDBServerCL: SEGGER J-Link GDB Server V7.88j Command Line Version
    JLinkGDBServerCL:
    JLinkGDBServerCL: JLinkARM.dll V7.88j (DLL compiled Jun 28 2023 13:39:15)
    JLinkGDBServerCL:
    JLinkGDBServerCL: -----GDB Server start settings-----
    JLinkGDBServerCL: GDBInit file: none
    JLinkGDBServerCL: GDB Server Listening port: 50555
    JLinkGDBServerCL: SWO raw output listening port: 2332
    JLinkGDBServerCL: Terminal I/O port: 2333
    JLinkGDBServerCL: Accept remote connection: localhost only
    JLinkGDBServerCL: Generate logfile: off
    JLinkGDBServerCL: Verify download: off
    JLinkGDBServerCL: Init regs on start: off
    JLinkGDBServerCL: Silent mode: on
    JLinkGDBServerCL: Single run mode: on
    JLinkGDBServerCL: Target connection timeout: 0 ms
    JLinkGDBServerCL: ------J-Link related settings------
    JLinkGDBServerCL: J-Link Host interface: USB
    JLinkGDBServerCL: J-Link script: none
    JLinkGDBServerCL: J-Link settings file: none
    JLinkGDBServerCL: ------Target related settings------
    JLinkGDBServerCL: Target device: nrf5340_xxaa_app
    JLinkGDBServerCL: Target device parameters: none
    JLinkGDBServerCL: Target interface: SWD
    JLinkGDBServerCL: Target interface speed: 4000kHz
    JLinkGDBServerCL: Target endian: little
    JLinkGDBServerCL:
    =thread-group-added,id="i1"
    =cmd-param-changed,param="pagination",value="off"
    context_boot_go (state=state@entry=0x20003624 <boot_data>, rsp=rsp@entry=0x2004815c <z_main_stack+36124>) at C:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/src/loader.c:2694
    2694 FIH_PANIC;
    [New Remote target]
    [New Thread 2645248]
    [New Thread -1]

Children
  • any idea how to resolve this ? Ive tried it on 6 different boards and its not the flash issue, that is hardware issue. 

  • Need more details and debug information to be able speculate on what the issue could be.  When you tried the other boards, did you confirm that the program got stuck at the same line? And were you able to interface with the onboard flash when using in the previous version of your project? And are you able to read from the external flash by using the debugger? For example with nrfjprog : nrfjprog --memrd 0x10000000 --n 0x100 -f nrf53.

  • Same line.

    EDIT: This is from current. Will try with older version.
    EDIT2: Ran the command on older working code that boots up and everything works and got the same response.

    EDIT3: Please note that older version does not use external flash!


    ﲖ nrfjprog --memrd 0x10000000 --n 0x100 -f nrf53
    [ #################### ] 0.000s | Reading external memory, 0x0100 bytes @ 0x00000000 - Done
    0x10000000: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x10000010: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x10000020: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x10000030: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x10000040: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x10000050: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x10000060: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x10000070: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x10000080: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x10000090: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x100000A0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x100000B0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x100000C0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x100000D0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x100000E0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
    0x100000F0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|

  • managed to solve issue. mostly it was because configs were in child_image and not in sysbuild folder. 

Related