- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We're using the CYM943012P6EVB-01 Rev2.2 kit. We have successfully built and run mbed-os-example-blinky and mbed-os-example-capsense with mbed cli as well as several projects using WICED. Using a second CYM kit board that we modified (see below for a short discussion of our CYM board modifications) to disconnect J-LINK from the on-board PSoC62 so we could connect it to our own board without contention. Just like the CYM board, our board also has the PSoC62 and a Murata BLE/WiFi chip (may not be exactly the same as the kit Murata part as the designations on the chip differ).
At one point, we were able to program this just fine but now whenever we program using DAPLink mode (either direct copy of a .hex file to the DAPLink volume or using the mbed command), the chip resets, DAPLink comes back online, and we have a FAIL.TXT file.
What is the board trying to tell me? What am I doing wrong? Again, please note that I have no trouble doing the below with an unmodified kit board; the issues arise when working with a modified kit board with our board connected to the JLink ports.
The rest of this post provides version information, commands run, terminal output from those commands, and finally the contents of FAIL.TXT.
For reference, we're using
- mbed 1.10.1
- ARM GCC version 6.5.0
$ mbed detect
[mbed] Working path "~/work/matrix-reloaded/cypress/mbed-os-example-blinky" (program)
[mbed] Detected CYW943012P6EVB_01, port /dev/ttyACM0, mounted /media/.../DAPLINK, interface version 0254:
[mbed] Supported toolchains for CYW943012P6EVB_01
| Target | mbed OS 2 | mbed OS 5 | uARM | IAR | ARM | GCC_ARM |
|-------------------|-----------|-----------|------|-----------|-----------|-----------|
| CYW943012P6EVB_01 | - | Supported | - | Supported | Supported | Supported |
Supported targets: 1
Supported toolchains: 3
$ fw-loader/bin/fw-loader --device-list
Cypress Firmware Updater, Version: 2.2.10.261
(C) Copyright 2018-2019 by Cypress Semiconductor
All Rights Reserved
Info: Start API initialization
Info: Connected - DAPLink CMSIS-DAP-19001301c8121a0b00c8121a00000000000000002e127069
Info: Hardware initialization complete (263 ms)
Connected supported devices:
1: DAPLink CMSIS-DAP-19001301c8121a0b00c8121a00000000000000002e127069
$ fw-loader/bin/fw-loader --update-kp3
Cypress Firmware Updater, Version: 2.2.10.261
(C) Copyright 2018-2019 by Cypress Semiconductor
All Rights Reserved
Info: Start API initialization
Info: Connected - DAPLink CMSIS-DAP-19001301c8121a0b00c8121a00000000000000002e127069
Info: Hardware initialization complete (260 ms)
Device 'DAPLink CMSIS-DAP-19001301c8121a0b00c8121a00000000000000002e127069' opened successfully
Info: Kit FW is in 'DAPLink' mode. Upgrade file is 'KitProg3' ver. 1.13 b322.
Info: Connected - KitProg Bootloader-0B1A12C800287400
Info: Bootloader Version: Major 1, Minor 1, Build 40
Info: FW Upgrade to version: 1.13 b322
Info: Bootloading of KitProg FW...
Info: Disconnected - DAPLink CMSIS-DAP-19001301c8121a0b00c8121a00000000000000002e127069
Info: Verifying of KitProg FW...
Info: Bootloading of DAPLink...
Info: Verifying of DAPLink...
Info: Upgrade completed
Info: Disconnected - KitProg Bootloader-0B1A12C800287400
Info: Connected - KitProg3 CMSIS-DAP BULK-0B1A12C800287400
Warning: Wait for upgraded device is timed out
FW update completed successfully
Then I power on the kit but leave our board in reset. The kit comes up with LED1 and LED3 solid amber. I press SW3, LED3 switches to 1Hz pulsing amber. After pressing it again, LED3 switches to 2 Hz pulsing amber, indicating the board is in DAPLink mode (as described in KitProg3 User Guide). Then I release our board from reset. I see activity in LED2 (rapid blinking red) and LED4 (rapid blinking green). Once the blinking stops, I try to flash the board (note that in the below, the compilation was done previously, so it jumps right to flashing the board).
$ mbed compile --target CYW943012P6EVB_01 --toolchain GCC_ARM --flash
[mbed] Working path "~/work/matrix-reloaded/cypress/mbed-os-example-blinky" (program)
Building project mbed-os-example-blinky (CYW943012P6EVB_01, GCC_ARM)
Scan: mbed-os-example-blinky
Link: mbed-os-example-blinky
Elf2Bin: mbed-os-example-blinky
| Module | .text | .data | .bss |
|-----------------------|-----------|----------|----------|
| [fill] | 130(+0) | 3(+0) | 43(+0) |
| [lib]/c.a | 27253(+0) | 2472(+0) | 89(+0) |
| [lib]/gcc.a | 3168(+0) | 0(+0) | 0(+0) |
| [lib]/misc | 252(+0) | 16(+0) | 28(+0) |
| [lib]/wiced_drivers.a | 1677(+0) | 0(+0) | 1728(+0) |
| [misc] | 8(+0) | 88(+0) | 0(+0) |
| main.o | 1169(+0) | 4(+0) | 16(+0) |
| mbed-os/cmsis | 1033(+0) | 0(+0) | 84(+0) |
| mbed-os/components | 120(+0) | 0(+0) | 0(+0) |
| mbed-os/drivers | 1738(+0) | 0(+0) | 0(+0) |
| mbed-os/features | 376(+0) | 16(+0) | 240(+0) |
| mbed-os/hal | 2337(+0) | 8(+0) | 152(+0) |
| mbed-os/platform | 5951(+0) | 260(+0) | 318(+0) |
| mbed-os/rtos | 8666(+0) | 168(+0) | 5973(+0) |
| mbed-os/targets | 20634(+0) | 1337(+0) | 1041(+0) |
| Subtotals | 74512(+0) | 4372(+0) | 9712(+0) |
Total Static RAM memory (data + bss): 14084(+0) bytes
Total Flash memory (text + data): 78884(+0) bytes
Image: ./BUILD/CYW943012P6EVB_01/GCC_ARM/mbed-os-example-blinky.hex
[1570808185.90][mbedls.platform_database]Duplicate platform ids found: daplink.1900, ignoring the definitions from ~/.local/share/mbedls/platforms.json
$ cat FAIL.TXT
error: Flash algorithm erase sector command FAILURE
type: target
CYM Board Modifications
We removed resistors R24, R25, R130, R131, and R26 and then connectrf over JLink we only run TMS_SWDIO and TCLK_SWCLK plus VCC and GND over JLink. Since we're handling reset ourselves, this should work fine (see https://www.segger.com/products/debug-probes/j-link/technology/interface-description/)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It turns out, FAIL.TXT, at least in this case, was a red herring. My board was programming correctly. I just needed to program the correct GPIO pin to see output of interest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It turns out, FAIL.TXT, at least in this case, was a red herring. My board was programming correctly. I just needed to program the correct GPIO pin to see output of interest.