3 Replies Latest reply on Oct 2, 2018 11:55 AM by inoue_tomohiro_1742091

    Flash CYW43907 with Segger standard tools (J-Flash, J-Flash Lite, Command Line)

    fwiedemann

      Hello

       

      Is there a way to flash the BCM/CYW43907 through the JLink standard tools? I tried it with these settings, but it did not succeed:

      segger.png

       

      Erasing seems to work, at least I don't get an error message.

       

      This entry was not helpful for me:

      Downloading and debugging CYW43907 using Jlink Segger

       

      We need this possibility to flash the device for the first samples in the lab and also to be prepared for end-of-line flashing.

       

      Thank you!

        • 1. Re: Flash CYW43907 with Segger standard tools (J-Flash, J-Flash Lite, Command Line)
          rroy

          In the latest WICED Studio, the native J-Link Support is added so you can bypass the driver changing procedure mentioned in the blog post and directly download through WICED SDK. Do you have any particular reason not to use WICED SDK to download?

           

          If it's possible to use WICED SDK for downloading, you can check the updated native J-Link support in wiced_apps.mk and BCM94390x_targets.mk through which you should be able to download. The build statement to use the native J-Link should look something like this

          test.console-CYW943907AEVAL1F JLINK_NATIVE=1 JLINK_PATH="../../../../Program\ Files\ \(x86\)/SEGGER/JLink_V630c/" JLINK_EXE="Jlink.exe" download run

          1 of 1 people found this helpful
          • 2. Re: Flash CYW43907 with Segger standard tools (J-Flash, J-Flash Lite, Command Line)
            fwiedemann

            Thank you for the reply. We tried the original drivers, but it did not work. When trying to download, it keeps telling "Unspecified error -1" and "****** Error: Could not read CP15 register.". Nevertheless, it sees the target voltage. And flashing with the OpenOCD configuration and libK works. Can you imagine what's the issue?

             

            Here is the full log:

             

             

             

            C:\Projekte\XYZ\xyz_tgt_wifi>43xxx_Wi-Fi\make.exe -C 43xxx_Wi-Fi tgt_wifi-XYZ_LV_MCU-debug  JTAG=jlink-native  JLINK_PATH="C:/Tool/SEGGER/JLink_V634a/" JLINK_EXE="JLink.exe" JLINK_DEVICE=CYW43907 JLINK_SPEED=auto JLINK_INTERFACE=JTAG JLINK_AUTO_CONNECT=1 VERBOSE=1 download run 

            MAKEFILE MAKECMDGOALS=tgt_wifi-XYZ_LV_MCU-debug download run OTA2_SUPPORT is disabled

            make: Entering directory 'C:/Projekte/XYZ/xyz_tgt_wifi/43xxx_Wi-Fi'

            ./tools/common/Win32/mkdir -p build/tgt_wifi-XYZ_LV_MCU-debug/binary build/tgt_wifi-XYZ_LV_MCU-debug/modules build/tgt_wifi-XYZ_LV_MCU-debug/libraries build/tgt_wifi-XYZ_LV_MCU-debug/resources

            "./tools/common/Win32/make.exe" -r  -j4   -f ./tools/makefiles/wiced_elf.mk tgt_wifi-XYZ_LV_MCU-debug download run

            make.exe[1]: Entering directory 'C:/Projekte/XYZ/xyz_tgt_wifi/43xxx_Wi-Fi'

            echo Building Bootloader waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909

            Building Bootloader waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909

            "./tools/common/Win32/make.exe" -r -f ./Makefile waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909 -Ibuild/tgt_wifi-XYZ_LV_MCU-debug  SFLASH= EXTERNAL_WICED_GLOBAL_DEFINES= SUB_BUILD=bootloader

            MAKEFILE MAKECMDGOALS=waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909 OTA2_SUPPORT is disabled

            make.exe[2]: Entering directory 'C:/Projekte/XYZ/xyz_tgt_wifi/43xxx_Wi-Fi'

            ./tools/common/Win32/mkdir -p build/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909/binary build/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909/modules build/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909/libraries build/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909/resources

            "./tools/common/Win32/make.exe" -r   -f ./tools/makefiles/wiced_elf.mk waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909

            echo Using jlink_native and ignore sflash_write_app ...

            make.exe[3]: Entering directory 'C:/Projekte/XYZ/xyz_tgt_wifi/43xxx_Wi-Fi'

            "./tools/common/Win32/perl.exe" ./tools/mapfile_parser/map_parse_gcc.pl build/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909/binary/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909.map

            waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909

            ----------------------------------|---------|---------|

                                              |         |  Static |

                          Module              |  Flash  |   RAM   |

            ----------------------------------+---------+---------|

            App                               |       0 |     120 |

            crc                               |       0 |    1060 |

            Interrupt Vectors                 |       0 |     224 |

            libc                              |       0 |     488 |

            Other                             |       0 |   12878 |

            platform                          |       0 |     290 |

            RAM Initialisation                |      32 |       0 |

            Startup Stack & Link Script fill  |       0 |    8318 |

            WWD                               |       0 |     106 |

            ----------------------------------+---------+---------|

            TOTAL (bytes)                     |       0 |   23484 |

            ----------------------------------|---------|---------|

             

             

            make.exe[3]: Leaving directory 'C:/Projekte/XYZ/xyz_tgt_wifi/43xxx_Wi-Fi'

            echo Build complete

            Using jlink_native and ignore sflash_write_app ...

            Build complete

            make.exe[2]: Leaving directory 'C:/Projekte/XYZ/xyz_tgt_wifi/43xxx_Wi-Fi'

            "./tools/common/Win32/perl.exe" ./WICED/platform/MCU/BCM4390x/make_trx.pl build/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909/binary/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909.elf build/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909/binary/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909.trx.bin

            prgm hdr cnt=3

            total_size = 14652, entry_point = 0x696000

            Loadsegment_offset = 0xA0 segment_size = 14416, segment_pad = 0

            Loadsegment_offset = 0x38F0 segment_size = 32, segment_pad = 0

            Loadsegment_offset = 0x3910 segment_size = 204, segment_pad = 0

            echo Finished Building Bootloader

            Finished Building Bootloader

            "./tools/common/Win32/echo.exe"

             

             

            "./tools/common/Win32/perl.exe" ./tools/mapfile_parser/map_parse_gcc.pl build/tgt_wifi-XYZ_LV_MCU-debug/binary/tgt_wifi-XYZ_LV_MCU-debug.map

            tgt_wifi-XYZ_LV_MCU-debug

            ----------------------------------|---------|---------|

                                              |         |  Static |

                          Module              |  Flash  |   RAM   |

            ----------------------------------+---------+---------|

            App                               |       0 |   12629 |

            crc                               |       0 |    1102 |

            DHCP_Server                       |       0 |    3000 |

            DNS                               |       0 |     180 |

            Interrupt Vectors                 |       0 |     498 |

            libc                              |       0 |   30679 |

            Networking                        |       0 |   31378 |

            NetX-Duo - Interfaces & Stacks    |       0 |      16 |

            NVRam                             |       0 |    2109 |

            Other                             |       0 |  185570 |

            Packet Buffers                    |       0 |   71659 |

            platform                          |       0 |     638 |

            RAM Initialisation                |      32 |       0 |

            resources                         |       0 |      32 |

            Ring_Buffer                       |       0 |     314 |

            Startup Stack & Link Script fill  |       0 |     190 |

            Supplicant - BESL                 |       0 |     176 |

            ThreadX                           |       0 |   24928 |

            TLV                               |       0 |      92 |

            WICED                             |       0 |    8904 |

            Wiced_RO_FS                       |       0 |    1016 |

            WWD                               |       0 |    5378 |

            ----------------------------------+---------+---------|

            TOTAL (bytes)                     |       0 |  380488 |

            ----------------------------------|---------|---------|

             

             

            "./tools/common/Win32/cp.exe" -f build/tgt_wifi-XYZ_LV_MCU-debug/binary/tgt_wifi-XYZ_LV_MCU-debug.elf build/eclipse_debug/last_built.elf

            echo Creating Filesystem BCM94390x_targets.mk ...

            Creating Filesystem BCM94390x_targets.mk ...

            "./tools/common/Win32/rm.exe" -f build/tgt_wifi-XYZ_LV_MCU-debug/resources/Staging/app.elf

            echo Downloading DCT ... build/tgt_wifi-XYZ_LV_MCU-debug/DCT.bin @ SFLASH_DCT_LOC=0x00008000

            echo ./tools/common/Win32/mk_wicedfs32 build/tgt_wifi-XYZ_LV_MCU-debug/filesystem.bin build/tgt_wifi-XYZ_LV_MCU-debug/resources/Staging/

            Downloading DCT ... build/tgt_wifi-XYZ_LV_MCU-debug/DCT.bin @ SFLASH_DCT_LOC=0x00008000

            C:\Tool\SEGGER\JLink_V634a\JLink.exe -device CYW43907 -if JTAG -speed auto -jtagconf -1,-1 -autoconnect 1 -CommanderScript jlink_commander_script.txt

            ./tools/common/Win32/mk_wicedfs32 build/tgt_wifi-XYZ_LV_MCU-debug/filesystem.bin build/tgt_wifi-XYZ_LV_MCU-debug/resources/Staging/

            ./tools/common/Win32/mk_wicedfs32 build/tgt_wifi-XYZ_LV_MCU-debug/filesystem.bin build/tgt_wifi-XYZ_LV_MCU-debug/resources/Staging/

            echo Creating Filesystem Done

            Creating Filesystem Done

            echo Building apps lookup table

            Building apps lookup table

            "./tools/ARM_GNU/Win32/bin/arm-none-eabi-gcc.exe" -isystem ./tools/ARM_GNU/Win32/bin/../../include -isystem ./tools/ARM_GNU/Win32/bin/../../lib/include -isystem ./tools/ARM_GNU/Win32/bin/../../lib/include-fixed -mcpu=cortex-r4 -mthumb-interwork -mthumb -fno-builtin-memcpy -c  ./WICED/platform/MCU/wiced_apps_lut.c  -DFR_APP_ENTRY_COUNT=0 -DFR_APP_SECTOR_START=0 -DFR_APP_SECTOR_COUNT=0 -DFR_APP_IS_SECURE=0 -DDCT_IMAGE_ENTRY_COUNT=0 -DDCT_IMAGE_SECTOR_START=0 -DDCT_IMAGE_SECTOR_COUNT=0 -DDCT_IMAGE_IS_SECURE=0 -DOTA_APP_ENTRY_COUNT=0 -DOTA_APP_SECTOR_START=0 -DOTA_APP_SECTOR_COUNT=0 -DOTA_APP_IS_SECURE=0 -DFILESYSTEM_IMAGE_ENTRY_COUNT=1 -DFILESYSTEM_IMAGE_SECTOR_START=17

              -DFILESYSTEM_IMAGE_SECTOR_COUNT=125 -DFILESYSTEM_IMAGE_IS_SECURE=0 -DWIFI_FIRMWARE_ENTRY_COUNT=0 -DWIFI_FIRMWARE_SECTOR_START=0 -DWIFI_FIRMWARE_SECTOR_COUNT=0 -DWIFI_FIRMWARE_IS_SECURE=0 -DAPP0_ENTRY_COUNT=1 -DAPP0_SECTOR_START=142 -DAPP0_SECTOR_COUNT=66 -DAPP0_IS_SECURE=0 -DAPP1_ENTRY_COUNT=0 -DAPP1_SECTOR_START=0 -DAPP1_SECTOR_COUNT=0 -DAPP1_IS_SECURE=0 -DAPP2_ENTRY_COUNT=0 -DAPP2_SECTOR_START=0 -DAPP2_SECTOR_COUNT=0 -DAPP2_IS_SECURE=0 -DWICED_USE_ETHERNET_INTERFACE -DWICED_ETHERNET_BUFFER_SIZE=1580 -DSFLASH_APPS_HEADER_LOC=0x00010000 -DPLATFORM_NO_DDR=1 -DPLATFORM_HAS_HW_CRYPTO_SUPPORT -DOTP_WORD_NUM_SHA_KEY=258 -DOTP_WORD_NUM_SHA_KEY_R=242 -DOTP_WORD_NUM_AES_KEY=282 -DOTP_WORD_NUM_AES_KEY_R=274 -DSECUREBOOT_SHA_KEY_SIZE=32 -DGSIO_I2C_REPEATED_START_NEEDS_GPIO=1 -DPLATFORM_HIB_WAKE_CTRL_FREQ_BITS_FLIPPED -DCRLF_STDIO_REPLACEMENT -DAPP_NAME=\"tgt_wifi\" -DWICED_DISABLE_CONFIG_TLS -DPLATFORM_SECURESFLASH_ENABLED=0 -DPLATFORM_SECUREDCT_ENABLED=0 -DNORMAL_IMAGE_FLASH_BASE=0x00000000 -DNORMAL_IMAGE_BOOTLOADER_START=0x00000000 -DNORMAL_IMAGE_DCT_1_AREA_BASE=0x00008000 -DNORMAL_IMAGE_DCT_2_AREA_BASE=0x0000C000 -DNORMAL_IMAGE_LUT_AREA_BASE=0x00010000 -DNORMAL_IMAGE_APPS_AREA_BASE=0x00011000 -DNORMAL_IMAGE_FS_AREA_BASE=0x00011000 -DMIN_WM8533_DB_LEVEL=-53.0 -DMAX_WM8533_DB_LEVEL=6.0 -DPLATFORM_ALP_CLOCK_RES_FIXUP=0 -DMAX_WATCHDOG_TIMEOUT_SECONDS=22 -DMAX_WAKE_FROM_SLEEP_DELAY_TICKS=500 -DPLATFORM_L1_CACHE_SHIFT=5 -DPLATFORM_SUPPORTS_LOW_POWER_MODES -DBCM43909 -DENABLE_ARM_DSP_INSTRUCTIONS -DPLAT_NOTIFY_FREE -DDCT_SFLASH_COPY_BUFFER_SIZE_ON_STACK=1024 -DUSING_WICEDFS -DNETWORK_NetX_Duo=1 -DNetX_Duo_VERSION=\"v5.10_sp3\" -DNX_INCLUDE_USER_DEFINE_FILE -D__fd_set_defined -DSYS_TIME_H_AVAILABLE -DADD_LWIP_EAPOL_SUPPORT -DNXD_EXTENDED_BSD_SOCKET_SUPPORT -DOPENSSL -DSTDC_HEADERS -Dwifi_firmware_image=resources_firmware_DIR_43909_DIR_43909B0_bin -Dwifi_firmware_clm_blob=resources_firmware_DIR_43909_DIR_43909B0_clm_blob -DWWD_DOWNLOAD_CLM_BLOB -DADD_NETX_EAPOL_SUPPORT -DNX_FRAGMENT_IMMEDIATE_ASSEMBLY -DWWD_STARTUP_DELAY=10 -DBOOTLOADER_MAGIC_NUMBER=0x4d435242 -DRTOS_ThreadX=1 -DThreadX_VERSION=\"v5.8\" -DTX_INCLUDE_USER_DEFINE_FILE -D__TARGET_ARCH_ARM=7 -D__THUMB_INTERWORK -DWICED_DISABLE_WATCHDOG -DWICED_SDK_WIFI_CONFIG_DCT_H=\"./include/default_wifi_config_dct.h\" -DWICED_SDK_BT_CONFIG_DCT_H=\"./include/default_bt_config_dct.h\" -I./WICED/platform/MCU/BCM4390x/peripherals/spi_flash/. -I./libraries/daemons/DHCP_server/. -I./libraries/utilities/ring_buffer/. -I./WICED/platform/GCC/. -I./libraries/inputs/gpio_button/. -I./libraries/utilities/crc/. -I././WICED/network/NetX_Duo/WICED/. -I././WICED/network/NetX_Duo/WWD/. -I./WICED/security/BESL/crypto_internal/micro-ecc/. -I./WICED/security/BESL/mbedtls_open/include -I./libraries/utilities/linked_list/. -I./libraries/utilities/base64/. -I./libraries/utilities/TLV/. -I./libraries/test/TraceX/. -I././WICED/platform/MCU/BCM4390x/. -I././WICED/platform/MCU/BCM4390x/.. -I././WICED/platform/MCU/BCM4390x/../../ARM_CR4 -I././WICED/platform/MCU/BCM4390x/WAF -I././WICED/platform/MCU/BCM4390x/peripherals -I././WICED/platform/MCU/BCM4390x/peripherals/include -I././WICED/platform/MCU/BCM4390x/peripherals/tlsf -I././WICED/platform/MCU/BCM4390x/./Library/drivers/spi_flash -I././WICED/platform/MCU/BCM4390x/./platforms/XYZ_LV_MCU -I././WICED/platform/MCU/BCM4390x/..//platforms/XYZ_LV_MCU/ -I././WICED/platform/MCU/BCM4390x/./WICED/platform/include -I././WICED/platform/MCU/BCM4390x/./libraries/bluetooth/include -I././WICED/platform/MCU/BCM4390x/./libraries/inputs/gpio_button -I./libraries/filesystems/wicedfs/src -I./WICED/network/NetX_Duo/ver5.10_sp3 -I./WICED/network/NetX_Duo/ver5.10_sp3/netx_bsd_layer -I./WICED/network/NetX_Duo/WICED -I./libraries/protocols/DNS/. -I././WICED/security/PostgreSQL/include -I././WICED/security/BESL/host/WICED -I././WICED/security/BESL/TLS -I././WICED/security/BESL/crypto_internal -I././WICED/security/BESL/WPS -I././WICED/security/BESL/include -I././WICED/security/BESL/P2P -I././WICED/security/BESL/crypto_internal/homekit_srp -I././WICED/security/BESL/crypto_internal/ed25519 -I././WICED/security/BESL/supplicant -I././WICED/security/BESL/DTLS -I././WICED/security/BESL/mbedtls_open/include -I././WICED/WWD/. -I././WICED/WWD/include -I././WICED/WWD/include/network -I././WICED/WWD/include/RTOS -I././WICED/WWD/internal/bus_protocols/SoC/43909 -I././WICED/WWD/internal/chips/4390x -I././WICED/WWD/../../libraries/utilities/linked_list -I././WICED/WWD/../RTOS/ThreadX/WICED -I././WICED/RTOS/ThreadX/WICED/. -I././WICED/RTOS/ThreadX/WWD/. -I././WICED/RTOS/ThreadX/WWD/CR4 -I././WICED/. -I././WICED/platform/include -I./WICED/RTOS/ThreadX/ver5.8 -I./WICED/RTOS/ThreadX/ver5.8/Cortex_R4/GCC -I./WICED/RTOS/ThreadX/WWD/CR4 -I./platforms/XYZ_LV_MCU/. -I./platforms/XYZ_LV_MCU/./board_revision/REV_B -I./WICED/WWD/internal/chips/4390x -I./libraries -I./include -DDEBUG -ggdb -O0  -Wall -fsigned-char -ffunction-sections -fdata-sections -fno-common -std=gnu11 -fdiagnostics-color  -Ibuild/tgt_wifi-XYZ_LV_MCU-debug -I./. -o build/tgt_wifi-XYZ_LV_MCU-debug/apps_header.o

            "./tools/ARM_GNU/Win32/bin/arm-none-eabi-g++.exe" -isystem ./tools/ARM_GNU/Win32/bin/../../include -isystem ./tools/ARM_GNU/Win32/bin/../../lib/include -isystem ./tools/ARM_GNU/Win32/bin/../../lib/include-fixed --static -Wl,-static -Wl,--warn-common -Wl,--gc-sections -Wl,--cref -mthumb -mcpu=cortex-r4 -mthumb-interwork -Wl,-A,thumb -Wl,-z,max-page-size=0x10 -Wl,-z,common-page-size=0x10 -mlittle-endian -nostartfiles -Wl,--defsym,START_STACK_SIZE=800 -Wl,--defsym,FIQ_STACK_SIZE=0 -Wl,--defsym,IRQ_STACK_SIZE=1024 -Wl,--defsym,SYS_STACK_SIZE=0 -L WICED/platform/MCU/BCM4390x/BCM43907 -L WICED/platform/MCU/BCM4390x -Wl,-T ././WICED/platform/MCU/BCM4390x/GCC/dct.ld -Wl,-Map,build/tgt_wifi-XYZ_LV_MCU-debug/APPS.map -o build/tgt_wifi-XYZ_LV_MCU-debug/APPS.elf  build/tgt_wifi-XYZ_LV_MCU-debug/apps_header.o

            SEGGER J-Link Commander V6.34a (Compiled Aug  8 2018 16:37:19)

            DLL version V6.34a, compiled Aug  8 2018 16:36:42

             

             

             

             

            J-Link Command File read successfully.

            Processing script file...

             

             

            J-Link connection not established yet but required for command.

            Connecting to J-Link via USB...O.K.

            Firmware: J-Link V10 compiled Jul 23 2018 09:53:14

            Hardware version: V10.10

            S/N: 12345678

            License(s): GDB

            VTref=3.303V

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            TotalIRLen = 4, IRPrint = 0x01

            JTAG chain detection found 1 devices:

            #0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP

            Scanning AP map to find all available APs

            AP[2]: Stopped AP scan as end of AP map has been reached

            AP[0]: APB-AP (IDR: 0x44770002)

            AP[1]: JTAG-AP (IDR: 0x24760010)

            Iterating through AP map to find AHB-AP to use

            AP[0]: APB-AP found

            ROMTbl[0][0]: CompAddr: 80001000 CID: B105900D, PID:04-008BBC14 Cortex-R4

            Found Cortex-R4 r1p4

            4 code breakpoints, 4 data breakpoints

            Debug architecture ARMv7.0

            Data endian: little

            Main ID register: 0x411FC144

            I-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way

            D-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way

            TCM Type register: 0x00010001

            MPU Type register: 0x00000800

            System control register:

              Instruction endian: little

              Level-1 instruction cache enabled

              Level-1 data cache enabled

              MPU enabled

              Branch prediction enabled

            Memory zones:

              [0]: Default (Default access mode)

              [1]: APB-AP (AP0) (DMA like acc. in AP0 addr. space)

            Cortex-R4 identified.

            Reset delay: 0 ms

            Reset type NORMAL: Toggle reset pin and halt CPU core.

            J-Link script: Reset

            J-Link script: Done

             

             

            Writing 00000000 -> 18020634

             

             

            Downloading file [build/tgt_wifi-XYZ_LV_MCU-debug/DCT.bin]...

            Unspecified error -1

             

             

             

             

            Script processing completed.

             

             

            echo Downloading Bootloader ...

            Downloading Bootloader ...

            C:\Tool\SEGGER\JLink_V634a\JLink.exe -device CYW43907 -if JTAG -speed auto -jtagconf -1,-1 -autoconnect 1 -CommanderScript jlink_commander_script.txt

            SEGGER J-Link Commander V6.34a (Compiled Aug  8 2018 16:37:19)

            DLL version V6.34a, compiled Aug  8 2018 16:36:42

             

             

             

             

            J-Link Command File read successfully.

            Processing script file...

             

             

            J-Link connection not established yet but required for command.

            Connecting to J-Link via USB...O.K.

            Firmware: J-Link V10 compiled Jul 23 2018 09:53:14

            Hardware version: V10.10

            S/N: 12345678

            License(s): GDB

            VTref=3.303V

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            TotalIRLen = 4, IRPrint = 0x01

            JTAG chain detection found 1 devices:

            #0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP

            Scanning AP map to find all available APs

            AP[2]: Stopped AP scan as end of AP map has been reached

            AP[0]: APB-AP (IDR: 0x44770002)

            AP[1]: JTAG-AP (IDR: 0x24760010)

            Iterating through AP map to find AHB-AP to use

            AP[0]: APB-AP found

            ROMTbl[0][0]: CompAddr: 80001000 CID: B105900D, PID:04-008BBC14 Cortex-R4

            Found Cortex-R4 r1p4

            4 code breakpoints, 4 data breakpoints

            Debug architecture ARMv7.0

            Data endian: little

            Main ID register: 0x411FC144

            I-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way

            D-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way

            TCM Type register: 0x00010001

            MPU Type register: 0x00000800

            System control register:

              Instruction endian: little

              Level-1 instruction cache enabled

              Level-1 data cache enabled

              MPU enabled

              Branch prediction enabled

            Memory zones:

              [0]: Default (Default access mode)

              [1]: APB-AP (AP0) (DMA like acc. in AP0 addr. space)

            Cortex-R4 identified.

            Reset delay: 0 ms

            Reset type NORMAL: Toggle reset pin and halt CPU core.

            J-Link script: Reset

            J-Link script: Done

             

             

            Writing 00000000 -> 18020634

             

             

            Downloading file [build/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909/binary/waf.bootloader-NoOS-NoNS-XYZ_LV_MCU-REV_B-SoC.43909.trx.bin]...

            Unspecified error -1

             

             

             

             

            Script processing completed.

             

             

             

             

            ****** Error: Could not start CPU core. (ErrorCode: -1)

            echo Finished Downloading Bootloader

            Finished Downloading Bootloader

            "./tools/ARM_GNU/Win32/bin/arm-none-eabi-strip.exe" -o build/tgt_wifi-XYZ_LV_MCU-debug/APPS.stripped.elf  build/tgt_wifi-XYZ_LV_MCU-debug/APPS.elf

            echo Downloading resources filesystem ... build/tgt_wifi-XYZ_LV_MCU-debug/filesystem.bin at sector 17

              size 125...

            Downloading resources filesystem ... build/tgt_wifi-XYZ_LV_MCU-debug/filesystem.bin at sector 17  size 125...

            C:\Tool\SEGGER\JLink_V634a\JLink.exe -device CYW43907 -if JTAG -speed auto -jtagconf -1,-1 -autoconnect 1 -CommanderScript jlink_commander_script.txt

            SEGGER J-Link Commander V6.34a (Compiled Aug  8 2018 16:37:19)

            DLL version V6.34a, compiled Aug  8 2018 16:36:42

             

             

             

             

            J-Link Command File read successfully.

            Processing script file...

             

             

            J-Link connection not established yet but required for command.

            Connecting to J-Link via USB...O.K.

            Firmware: J-Link V10 compiled Jul 23 2018 09:53:14

            Hardware version: V10.10

            S/N: 12345678

            License(s): GDB

            VTref=3.322V

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            TotalIRLen = 4, IRPrint = 0x01

            JTAG chain detection found 1 devices:

            #0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP

            Scanning AP map to find all available APs

            AP[2]: Stopped AP scan as end of AP map has been reached

            AP[0]: APB-AP (IDR: 0x44770002)

            AP[1]: JTAG-AP (IDR: 0x24760010)

            Iterating through AP map to find AHB-AP to use

            AP[0]: APB-AP found

            ROMTbl[0][0]: CompAddr: 80001000 CID: B105900D, PID:04-008BBC14 Cortex-R4

            Found Cortex-R4 r1p4

            4 code breakpoints, 4 data breakpoints

            Debug architecture ARMv7.0

            Data endian: little

            Main ID register: 0x33040014

            Unified-Cache L1: 0 KB, 32768 Sets, 2048 Bytes/Line, 1024-Way

            D-Cache L2: 0 KB, 32768 Sets, 2048 Bytes/Line, 1024-Way

            TCM Type register: 0x00CC1000

            MPU Type register: 0x00CC1000

            System control register:

              Instruction endian: little

              Level-1 instruction cache enabled

              Level-1 data cache disabled

              MPU disabled

              Branch prediction disabled

             

             

            ****** Error: Could not read CP15 register.

            Cannot connect to target.

             

             

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            Cannot connect to target.

             

             

             

             

            Script processing completed.

             

             

            "./tools/ARM_GNU/Win32/bin/arm-none-eabi-objcopy.exe" -O binary -R .eh_frame -R .init -R .fini -R .comment -R .ARM.attributes build/tgt_wifi-XYZ_LV_MCU-debug/APPS.stripped.elf build/tgt_wifi-XYZ_LV_MCU-debug/APPS.bin

            echo Downloading APP0 build/tgt_wifi-XYZ_LV_MCU-debug/binary/tgt_wifi-XYZ_LV_MCU-debug.stripped.elf @ sector 142 address 581632 size 66...

            Downloading APP0 build/tgt_wifi-XYZ_LV_MCU-debug/binary/tgt_wifi-XYZ_LV_MCU-debug.stripped.elf @ sector 142 address 581632 size 66...

            C:\Tool\SEGGER\JLink_V634a\JLink.exe -device CYW43907 -if JTAG -speed auto -jtagconf -1,-1 -autoconnect 1 -CommanderScript jlink_commander_script.txt

            SEGGER J-Link Commander V6.34a (Compiled Aug  8 2018 16:37:19)

            DLL version V6.34a, compiled Aug  8 2018 16:36:42

             

             

             

             

            J-Link Command File read successfully.

            Processing script file...

             

             

            J-Link connection not established yet but required for command.

            Connecting to J-Link via USB...O.K.

            Firmware: J-Link V10 compiled Jul 23 2018 09:53:14

            Hardware version: V10.10

            S/N: 12345678

            License(s): GDB

            VTref=3.322V

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            TotalIRLen = 4, IRPrint = 0x01

            JTAG chain detection found 1 devices:

            #0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP

            Scanning AP map to find all available APs

            AP[2]: Stopped AP scan as end of AP map has been reached

            AP[0]: APB-AP (IDR: 0x44770002)

            AP[1]: JTAG-AP (IDR: 0x24760010)

            Iterating through AP map to find AHB-AP to use

            AP[0]: APB-AP found

            ROMTbl[0][0]: CompAddr: 80001000 CID: B105900D, PID:04-008BBC14 Cortex-R4

            Found Cortex-R4 r1p4

            4 code breakpoints, 4 data breakpoints

            Debug architecture ARMv7.0

            Data endian: little

            Main ID register: 0x33040014

            Unified-Cache L1: 0 KB, 32768 Sets, 2048 Bytes/Line, 1024-Way

            D-Cache L2: 0 KB, 32768 Sets, 2048 Bytes/Line, 1024-Way

            TCM Type register: 0x00CC1000

            MPU Type register: 0x00CC1000

            System control register:

              Instruction endian: little

              Level-1 instruction cache enabled

              Level-1 data cache disabled

              MPU disabled

              Branch prediction disabled

             

             

            ****** Error: Could not read CP15 register.

            Cannot connect to target.

             

             

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            Cannot connect to target.

             

             

             

             

            Script processing completed.

             

             

            echo Downloading apps lookup table in wiced_apps.mk ... build/tgt_wifi-XYZ_LV_MCU-debug/APPS.bin @ 0x00010000 size

            Downloading apps lookup table in wiced_apps.mk ... build/tgt_wifi-XYZ_LV_MCU-debug/APPS.bin @ 0x00010000 size

            C:\Tool\SEGGER\JLink_V634a\JLink.exe -device CYW43907 -if JTAG -speed auto -jtagconf -1,-1 -autoconnect 1 -CommanderScript jlink_commander_script.txt

            SEGGER J-Link Commander V6.34a (Compiled Aug  8 2018 16:37:19)

            DLL version V6.34a, compiled Aug  8 2018 16:36:42

             

             

             

             

            J-Link Command File read successfully.

            Processing script file...

             

             

            J-Link connection not established yet but required for command.

            Connecting to J-Link via USB...O.K.

            Firmware: J-Link V10 compiled Jul 23 2018 09:53:14

            Hardware version: V10.10

            S/N: 12345678

            License(s): GDB

            VTref=3.322V

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            TotalIRLen = 4, IRPrint = 0x01

            JTAG chain detection found 1 devices:

            #0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP

            Scanning AP map to find all available APs

            AP[2]: Stopped AP scan as end of AP map has been reached

            AP[0]: APB-AP (IDR: 0x44770002)

            AP[1]: JTAG-AP (IDR: 0x24760010)

            Iterating through AP map to find AHB-AP to use

            AP[0]: APB-AP found

            ROMTbl[0][0]: CompAddr: 80001000 CID: B105900D, PID:04-008BBC14 Cortex-R4

            Found Cortex-R4 r1p4

            4 code breakpoints, 4 data breakpoints

            Debug architecture ARMv7.0

            Data endian: little

            Main ID register: 0x33040014

            Unified-Cache L1: 0 KB, 32768 Sets, 2048 Bytes/Line, 1024-Way

            D-Cache L2: 0 KB, 32768 Sets, 2048 Bytes/Line, 1024-Way

            TCM Type register: 0x00CC1000

            MPU Type register: 0x00CC1000

            System control register:

              Instruction endian: little

              Level-1 instruction cache enabled

              Level-1 data cache disabled

              MPU disabled

              Branch prediction disabled

             

             

            ****** Error: Could not read CP15 register.

            Cannot connect to target.

             

             

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            Cannot connect to target.

             

             

             

             

            Script processing completed.

             

             

            echo Resetting target

            Resetting target

            C:\Tool\SEGGER\JLink_V634a\JLink.exe -device CYW43907 -if JTAG -speed auto -jtagconf -1,-1 -autoconnect 1 -CommanderScript jlink_commander_script.txt

            SEGGER J-Link Commander V6.34a (Compiled Aug  8 2018 16:37:19)

            DLL version V6.34a, compiled Aug  8 2018 16:36:42

             

             

             

             

            J-Link Command File read successfully.

            Processing script file...

             

             

            J-Link connection not established yet but required for command.

            Connecting to J-Link via USB...O.K.

            Firmware: J-Link V10 compiled Jul 23 2018 09:53:14

            Hardware version: V10.10

            S/N: 12345678

            License(s): GDB

            VTref=3.322V

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            TotalIRLen = 4, IRPrint = 0x01

            JTAG chain detection found 1 devices:

            #0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP

            Scanning AP map to find all available APs

            AP[2]: Stopped AP scan as end of AP map has been reached

            AP[0]: APB-AP (IDR: 0x44770002)

            AP[1]: JTAG-AP (IDR: 0x24760010)

            Iterating through AP map to find AHB-AP to use

            AP[0]: APB-AP found

            ROMTbl[0][0]: CompAddr: 80001000 CID: B105900D, PID:04-008BBC14 Cortex-R4

            Found Cortex-R4 r1p4

            4 code breakpoints, 4 data breakpoints

            Debug architecture ARMv7.0

            Data endian: little

            Main ID register: 0x33040014

            Unified-Cache L1: 0 KB, 32768 Sets, 2048 Bytes/Line, 1024-Way

            D-Cache L2: 0 KB, 32768 Sets, 2048 Bytes/Line, 1024-Way

            TCM Type register: 0x00CC1000

            MPU Type register: 0x00CC1000

            System control register:

              Instruction endian: little

              Level-1 instruction cache enabled

              Level-1 data cache disabled

              MPU disabled

              Branch prediction disabled

             

             

            ****** Error: Could not read CP15 register.

            Cannot connect to target.

             

             

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            Cannot connect to target.

             

             

            Target connection not established yet but required for command.

            Device "CYW43907" selected.

             

             

             

             

            Connecting to target via JTAG

            Cannot connect to target.

             

             

             

             

            Script processing completed.

             

             

            make.exe[1]: Leaving directory 'C:/Projekte/XYZ/xyz_tgt_wifi/43xxx_Wi-Fi'

            echo Build complete

            Build complete

            echo Making .gdbinit

            Making .gdbinit

            echo set remotetimeout 20 > .gdbinit

            echo shell start /B ./tools/OpenOCD/Win32/openocd-all-brcm-libftdi.exe -s ./tools/OpenOCD/scripts -f ./tools/OpenOCD/jlink-native.cfg -f ./tools/OpenOCD/BCM4390x.cfg -f ./tools/OpenOCD/BCM4390x_gdb_jtag.cfg  -l build/openocd_log.txt >> .gdbinit

            echo shell ping 127.0.0.1 -n 5 >> .gdbinit

            make: Leaving directory 'C:/Projekte/XYZ/xyz_tgt_wifi/43xxx_Wi-Fi'

            • 3. Re: Flash CYW43907 with Segger standard tools (J-Flash, J-Flash Lite, Command Line)
              inoue_tomohiro_1742091

              J-Link native support is really nice!! Looks this is only for 43907 at this moment. Any plan to support other MCUs? If you can support STM32 as well, it would be great.