nccgroup / Sniffle

A sniffer for Bluetooth 5 and 4.x LE
https://www.nccgroup.trust/us/our-research/sniffle-a-sniffer-for-bluetooth-5/?research=Public+tools
GNU General Public License v3.0
869 stars 129 forks source link

CC2652RB firmware flash failure #56

Closed jsmif closed 7 months ago

jsmif commented 1 year ago

On Ubuntu 20.04, the Uniflash install seems to work fine, however the DSLite load command to reflash the dev board fails as follows:

~/Downloads/Sniffle/fw$ export PATH=$PATH:~/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/DebugServer/bin/

~/Downloads/Sniffle/fw$ DSLite load -c ccxml/CC2652RB1F.ccxml -f ../sniffle_cc2652rb.out 
DSLite version 12.3.0.3041
Configuring Debugger (may take a few minutes on first launch)...
    Parsing connections/TIXDS110_Connection.xml
    Parsing drivers/tixds510icepick_c.xml
    Parsing drivers/tixds510cs_dap.xml
    Parsing drivers/tixds510cortexM.xml
    Parsing devices/cc2652rb1f.xml
    Parsing routers/icepick_c.xml
    Parsing ../Modules/ICEPickCHidden.xml
    Parsing routers/cs_dap.xml
    Parsing ../Modules/cs_dap_NotVisible.xml
    Parsing cpus/cortex_m4.xml
    Parsing ../Modules/cortexM4_NotVisible.xml
    Parsing ../Modules/CC26xx/CC2652/ADI_4_AUX.xml
    Parsing ../Modules/CC26xx/CC2652/AON_BATMON.xml
    Parsing ../Modules/CC26xx/CC2652/AON_EVENT.xml
    Parsing ../Modules/CC26xx/CC2652/AON_IOC.xml
    Parsing ../Modules/CC26xx/CC2652/AON_PMCTL.xml
    Parsing ../Modules/CC26xx/CC2652/AON_RTC.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_AIODIO.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_ANAIF.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_EVCTL.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_MAC.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_SCE.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_SMPH.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_SPIM.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_SYSIF.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_TDC.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_TIMER01.xml
    Parsing ../Modules/CC26xx/CC2652/AUX_TIMER2.xml
    Parsing ../Modules/CC26xx/CC2652/CCFG.xml
    Parsing ../Modules/CC26xx/CC2652/CPU_DWT.xml
    Parsing ../Modules/CC26xx/CC2652/CPU_FPB.xml
    Parsing ../Modules/CC26xx/CC2652/CPU_ITM.xml
    Parsing ../Modules/CC26xx/CC2652/CPU_SCS.xml
    Parsing ../Modules/CC26xx/CC2652/CPU_TIPROP.xml
    Parsing ../Modules/CC26xx/CC2652/CPU_TPIU.xml
    Parsing ../Modules/CC26xx/CC2652/CRYPTO.xml
    Parsing ../Modules/CC26xx/CC2652/DDI_0_OSC.xml
    Parsing ../Modules/CC26xx/CC2652/EVENT.xml
    Parsing ../Modules/CC26xx/CC2652/FCFG1.xml
    Parsing ../Modules/CC26xx/CC2652/FLASH.xml
    Parsing ../Modules/CC26xx/CC2652/GPIO.xml
    Parsing ../Modules/CC26xx/CC2652/GPT.xml
    Parsing ../Modules/CC26xx/CC2652/I2C.xml
    Parsing ../Modules/CC26xx/CC2652/I2S.xml
    Parsing ../Modules/CC26xx/CC2652/IOC.xml
    Parsing ../Modules/CC26xx/CC2652/PKA.xml
    Parsing ../Modules/CC26xx/CC2652/PKA_INT.xml
    Parsing ../Modules/CC26xx/CC2652/PRCM.xml
    Parsing ../Modules/CC26xx/CC2652/RFC_DBELL.xml
    Parsing ../Modules/CC26xx/CC2652/RFC_PWR.xml
    Parsing ../Modules/CC26xx/CC2652/RFC_RAT.xml
    Parsing ../Modules/CC26xx/CC2652/SMPH.xml
    Parsing ../Modules/CC26xx/CC2652/SRAM_MMR.xml
    Parsing ../Modules/CC26xx/CC2652/SSI.xml
    Parsing ../Modules/CC26xx/CC2652/TRNG.xml
    Parsing ../Modules/CC26xx/CC2652/UART.xml
    Parsing ../Modules/CC26xx/CC2652/UDMA.xml
    Parsing ../Modules/CC26xx/CC2652/VIMS.xml
    Parsing ../Modules/CC26xx/CC2652/WDT.xml
    Parsing ../Modules/CC26xx/CC2652/CC26x2_JSTATE_2_NotVisible.xml
    Initializing Register Database...
    Parsing /home/user/.ti/TICloudAgent/0/0/12453424619097682638.cache
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/cortexM4_NotVisible.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/ADI_4_AUX.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AON_BATMON.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AON_EVENT.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AON_IOC.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AON_PMCTL.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AON_RTC.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_AIODIO.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_ANAIF.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_EVCTL.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_MAC.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_SCE.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_SMPH.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_SPIM.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_SYSIF.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_TDC.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_TIMER01.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/AUX_TIMER2.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/CCFG.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/CPU_DWT.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/CPU_FPB.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/CPU_ITM.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/CPU_SCS.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/CPU_TIPROP.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/CPU_TPIU.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/CRYPTO.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/DDI_0_OSC.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/EVENT.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/FCFG1.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/FLASH.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/GPIO.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/GPT.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/I2C.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/I2S.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/IOC.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/PKA.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/PKA_INT.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/PRCM.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/RFC_DBELL.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/RFC_PWR.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/RFC_RAT.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/SMPH.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/SRAM_MMR.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/SSI.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/TRNG.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/UART.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/UDMA.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/VIMS.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/WDT.xml
    Parsing /home/user/ti/uniflash_8.3.0/deskdb/content/TICloudAgent/linux/ccs_base/common/targetdb/Modules/CC26xx/CC2652/CC26x2_JSTATE_2_NotVisible.xml
    Initializing: IcePick_C
    Mapping registers: IcePick_C - Core Registers
    Mapping registers: IcePick_C - Hidden
    Building search data: IcePick_C
    Executing Startup Scripts: IcePick_C
    Initializing: CS_DAP_0
    Mapping registers: CS_DAP_0 - Core Registers
    Mapping registers: CS_DAP_0 - Hidden
    Building search data: CS_DAP_0
    Executing Startup Scripts: CS_DAP_0
    Initializing: Cortex_M4_0
    Mapping registers: Cortex_M4_0 - Core Registers
    Mapping registers: Cortex_M4_0 - AUX_ADI4
    Mapping registers: Cortex_M4_0 - AON_BATMON
    Mapping registers: Cortex_M4_0 - AON_EVENT
    Mapping registers: Cortex_M4_0 - AON_IOC
    Mapping registers: Cortex_M4_0 - AON_PMCTL
    Mapping registers: Cortex_M4_0 - AON_RTC
    Mapping registers: Cortex_M4_0 - AUX_AIODIO0
    Mapping registers: Cortex_M4_0 - AUX_AIODIO1
    Mapping registers: Cortex_M4_0 - AUX_AIODIO2
    Mapping registers: Cortex_M4_0 - AUX_AIODIO3
    Mapping registers: Cortex_M4_0 - AUX_ANAIF
    Mapping registers: Cortex_M4_0 - AUX_EVCTL
    Mapping registers: Cortex_M4_0 - AUX_MAC
    Mapping registers: Cortex_M4_0 - AUX_SCE
    Mapping registers: Cortex_M4_0 - AUX_SMPH
    Mapping registers: Cortex_M4_0 - AUX_SPIM
    Mapping registers: Cortex_M4_0 - AUX_SYSIF
    Mapping registers: Cortex_M4_0 - AUX_TDC
    Mapping registers: Cortex_M4_0 - AUX_TIMER01
    Mapping registers: Cortex_M4_0 - AUX_TIMER2
    Mapping registers: Cortex_M4_0 - CCFG
    Mapping registers: Cortex_M4_0 - CPU_DWT
    Mapping registers: Cortex_M4_0 - CPU_FPB
    Mapping registers: Cortex_M4_0 - CPU_ITM
    Mapping registers: Cortex_M4_0 - CPU_SCS
    Mapping registers: Cortex_M4_0 - CPU_TIPROP
    Mapping registers: Cortex_M4_0 - CPU_TPIU
    Mapping registers: Cortex_M4_0 - CRYPTO
    Mapping registers: Cortex_M4_0 - AUX_DDI0_OSC
    Mapping registers: Cortex_M4_0 - EVENT
    Mapping registers: Cortex_M4_0 - FCFG1
    Mapping registers: Cortex_M4_0 - FLASH
    Mapping registers: Cortex_M4_0 - GPIO
    Mapping registers: Cortex_M4_0 - GPT0
    Mapping registers: Cortex_M4_0 - GPT1
    Mapping registers: Cortex_M4_0 - GPT2
    Mapping registers: Cortex_M4_0 - GPT3
    Mapping registers: Cortex_M4_0 - I2C0
    Mapping registers: Cortex_M4_0 - I2S0
    Mapping registers: Cortex_M4_0 - IOC
    Mapping registers: Cortex_M4_0 - PKA
    Mapping registers: Cortex_M4_0 - PKA_INT
    Mapping registers: Cortex_M4_0 - PRCM
    Mapping registers: Cortex_M4_0 - RFC_DBELL
    Mapping registers: Cortex_M4_0 - RFC_PWR
    Mapping registers: Cortex_M4_0 - RFC_RAT
    Mapping registers: Cortex_M4_0 - SMPH
    Mapping registers: Cortex_M4_0 - SRAM_MMR
    Mapping registers: Cortex_M4_0 - SSI0
    Mapping registers: Cortex_M4_0 - SSI1
    Mapping registers: Cortex_M4_0 - TRNG
    Mapping registers: Cortex_M4_0 - UART0
    Mapping registers: Cortex_M4_0 - UART1
    Mapping registers: Cortex_M4_0 - UDMA0
    Mapping registers: Cortex_M4_0 - VIMS
    Mapping registers: Cortex_M4_0 - WDT
    Mapping registers: Cortex_M4_0 - Hidden
    Building search data: Cortex_M4_0
    Applying virtual groups: Cortex_M4_0 - EVENT
    Applying virtual groups: Cortex_M4_0 - FLASH
    Executing Startup Scripts: Cortex_M4_0
Connecting...
fatal: IcePick_C: Error connecting to the target: (Error -242 @ 0x0) A router subpath could not be accessed. The board configuration file is probably incorrect. (Emulation package 9.11.0.00128) 
Failed: Operation was aborted

And then now every time I attempt the same command after that, I get:

DSLite load -c ccxml/CC2652RB1F.ccxml -f ../sniffle_cc2652rb.out 
DSLite version 12.3.0.3041
Configuring Debugger (may take a few minutes on first launch)...
    Initializing Register Database...
    Initializing: IcePick_C
    Executing Startup Scripts: IcePick_C
    Initializing: CS_DAP_0
    Executing Startup Scripts: CS_DAP_0
    Initializing: Cortex_M4_0
    Executing Startup Scripts: Cortex_M4_0
Connecting...
fatal: IcePick_C: Error connecting to the target: (Error -242 @ 0x0) A router subpath could not be accessed. The board configuration file is probably incorrect. (Emulation package 9.11.0.00128) 
Failed: Operation was aborted

If you have a CC2652RB dev board, can you double check that it works with Release v1.7 and (the latest) DSLite version 12.3.0.3041?

I got a similar IcePick error when I tried the GUI reflashing mechanism initially too. Also, when googling around for a solution, I saw some TI forums saying to use "FLASH-PROGRAMMER-2" from https://ti.com/tool/FLASH-PROGRAMMER to try to erase the board completely. However that didn't work.

jsmif commented 7 months ago

As an update, I suspect this initial error may have been due to being in a VM, and then when the device switches over into JTAG programming mode, the device exposes a new thing that isn't automatically connected to the VM (because VMWare asks where you want to connect it), and then it failed, but then it was in a broken state. I only noticed this because I went through the GUI reflash steps for a different board to see what they look like, and then I got prompts which I had learned to force to always connect to my VM.

FWIW I was able to flash a different board (CC26XR1) from the VM, via DSLite, once I had set up things to auto-reconnect. But the CC2652RB was still giving me trouble. So I took it to a physical linux system and it did successfully update the firmware. So I don't know if it's actually a virtual vs. physical thing, but the 2652RB definitely gave me more trouble than the other 2 boards. So if you have one you might want to double check if it gives you trouble too, and if so, dis-recommend it. But if not, feel free to close this ticket.

sultanqasim commented 7 months ago

The XDS110 is the same for them all, and in the past I did most of my development in a VM. VMs can give odd USB issues though, so doing natively on the host is generally more reliable.