Hi,
I installed mbed studio for programming the hexiwear platform. I tried compiling and debugging several example projects like Hexi_Blinky_Example
or Hexi_Serial_Rgb_Example
. The code compiles successfully however when pressing Run or Debug button the Hexiwear does not execute the code (as in LEDs is not blinking, serial data not being transmitted, display not displaying). Pressing the reset button or unplugging the hexiwear from the docking station doesnt run the code either. Im using the debug build profile. Programming switches are in 11001111
.
Kinetis design studio from NXP can compile, flash and debug the device no problem but it is not really suitable to do anything in. I was using the pyOCD
debugger.
When I compile the same code in the online mbed compiler and copy the .bin file to the HEX_DAPLINK
device, it flashes itself and the code does run! If I however take the .bin file compiled by mbed studio (...\Mbed Programs\Hexi_Blinky_Example\BUILD\HEXIWEAR\ARMC6\Hexi_Blinky_Example.bin
) and copy it to the HEX_DAPLINK
device, it doesnt run.
Probably there is something wrong with my configuration, if you could make some sense out of the following logs or have any idea how to get it up an running, Ill be really grateful.
Compile log:
Scan: Hexi_Blinky_Example
Compile [ 0.1%]: mbed_tz_context.c
Compile [ 0.2%]: MCR20Drv.c
Compile [ 0.4%]: rf_configuration.c
[...]
Compile [ 2.7%]: I2CSlave.cpp
Compile [ 2.8%]: InterruptManager.cpp
[Warning] InterruptManager.h@204,5: 'CallChain' is deprecated: CallChain has been deprecated and will be removed. [-Wdeprecated-declarations]
[Warning] InterruptManager.cpp@63,50: 'CallChain' is deprecated: CallChain has been deprecated and will be removed. [-Wdeprecated-declarations]
[Warning] InterruptManager.cpp@92,32: 'CallChain' is deprecated: CallChain has been deprecated and will be removed. [-Wdeprecated-declarations]
Compile [ 3.0%]: PortIn.cpp
Compile [ 3.1%]: I2C.cpp
Compile [ 3.2%]: PortInOut.cpp
Compile [ 3.3%]: PwmOut.cpp
[...]
Compile [ 8.7%]: AT_CellularInformation.cpp
Compile [ 8.9%]: AT_ControlPlane_netif.cpp
Compile [ 9.0%]: CellularLog.cpp
Compile [ 9.1%]: AT_CellularContext.cpp
[Warning] AT_CellularContext.cpp@266,24: 'get_ip_address' is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] AT_CellularContext.cpp@935,30: 'stop' is deprecated: Use CellularDevice::shutdown() instead. [since mbed-os-5.15] [-Wdeprecated-declarations]
Compile [ 9.2%]: AT_CellularStack.cpp
Compile [ 9.3%]: AT_CellularNetwork.cpp
[...]
Compile [ 58.9%]: tls_lib.c
Compile [ 59.0%]: supp_eap_tls_sec_prot.c
Compile [ 59.1%]: eap_tls_sec_prot_lib.c
Compile [ 59.2%]: auth_gkh_sec_prot.c
Compile [ 59.3%]: auth_fwh_sec_prot.c
Compile [ 59.5%]: supp_gkh_sec_prot.c
Compile [ 59.6%]: key_sec_prot.c
[Warning] key_sec_prot.c@321,44: implicit conversion from enumeration type 'kmp_result_e' to different enumeration type 'sec_prot_result_e' [-Wenum-conversion]
[Warning] key_sec_prot.c@324,44: implicit conversion from enumeration type 'kmp_result_e' to different enumeration type 'sec_prot_result_e' [-Wenum-conversion]
Compile [ 59.7%]: supp_fwh_sec_prot.c
[...]
Compile [ 99.9%]: pinmap.c
Compile [100.0%]: port_api.c
Link: Hexi_Blinky_Example
[Warning] @0,0: L3912W: Option 'legacyalign' is deprecated.
Elf2Bin: Hexi_Blinky_Example
| Module | .text | .data | .bss |
|---------------------|---------------|-----------|-----------------|
| [lib]\c_w.l | 11253(+11253) | 16(+16) | 348(+348) |
| [lib]\fz_wm.l | 34(+34) | 0(+0) | 0(+0) |
| [lib]\libcppabi_w.l | 44(+44) | 0(+0) | 0(+0) |
| [lib]\m_wm.l | 48(+48) | 0(+0) | 0(+0) |
| anon$$obj.o | 32(+32) | 0(+0) | 197888(+197888) |
| main.o | 206(+206) | 0(+0) | 12(+12) |
| mbed-os\drivers | 244(+244) | 0(+0) | 0(+0) |
| mbed-os\features | 185(+185) | 0(+0) | 0(+0) |
| mbed-os\hal | 1808(+1808) | 8(+8) | 131(+131) |
| mbed-os\platform | 6788(+6788) | 64(+64) | 368(+368) |
| mbed-os\rtos | 10304(+10304) | 168(+168) | 6625(+6625) |
| mbed-os\targets | 17006(+17006) | 12(+12) | 337(+337) |
| Subtotals | 47952(+47952) | 268(+268) | 205709(+205709) |
Total Static RAM memory (data + bss): 205977(+205977) bytes
Total Flash memory (text + data): 48220(+48220) bytes
Image: BUILD/HEXIWEAR/ARMC6\Hexi_Blinky_Example.bin
HEX_DAPLINK/DETAILS.TXT
Unique ID: 0214000031874e4500532004906e001a3ed1000097969900
HIC ID: 97969900
Auto Reset: 0
Automation allowed: 0
Overflow detection: 0
Daplink Mode: Interface
Interface Version: 0246
Bootloader Version: 0241
Git SHA: b202ddc3fc89ff9750dc01afea7de4641b54666d
Local Mods: 0
USB Interfaces: MSD, CDC, HID
Bootloader CRC: 0x7ea470f3
Interface CRC: 0x9a9b34a9
Remount count: 1
Debug log:
0000368:INFO:rom_table:[3]
0000374:INFO:rom_table:[4]
0000380:INFO:rom_table:[5]
0000387:INFO:rom_table:[6]
0000394:INFO:rom_table:[7]
0000398:INFO:cortex_m:CPU core #0 is Cortex-M4 r0p1
0000408:INFO:cortex_m:FPU present: FPv4-SP
0000418:INFO:dwt:4 hardware watchpoints
0000424:INFO:fpb:6 hardware breakpoints, 4 literal comparators
0000450:INFO:server:Semihost server started on port 4444
0000450:INFO:gdbserver:GDB server started on port 50000
Reading symbols from c:\Users\Charvi\Mbed Programs\Hexi_Blinky_Example\BUILD\HEXIWEAR\ARMC6\Hexi_Blinky_Example.elf...
warning:
Loadable section "RW_m_data" outside of ELF segments
done.
0000538:INFO:gdbserver:One client connected!
warning: Loadable section "RW_m_data" outside of ELF segments
mbed_halt_system () at ./mbed-os/platform/source\mbed_error.c:107
107 for (;;) {
0000632:INFO:gdbserver:Attempting to load Argon
0000634:INFO:gdbserver:Attempting to load RTX5
0000637:INFO:gdbserver:RTX5 loaded successfully
Attached to debugger on port 50000
0003325:INFO:loader:Erased chip, programmed 49152 bytes (12 pages), skipped 0 bytes (0 pages) at 19.19 kB/s
Image loaded: c:\Users\Charvi\Mbed Programs\Hexi_Blinky_Example\BUILD\HEXIWEAR\ARMC6\Hexi_Blinky_Example.elf
Note: automatically using hardware breakpoints for read-only addresses.
After setting a breakpoint during runtime or pressing pause:
[New Thread 536812976]
[New Thread 536813044]
Thread
2 "main" received signal SIGINT, Interrupt.
[Switching to Thread 536812908]
mbed_halt_system () at ./mbed-os/platform/source\mbed_error.c:107
107 for (;;) {
Then I se no variables, no stack, all threads paused on sigint and clicking on Continue in the debugger has no effect.
Thanks for any ideas about what might be wrong.
Best regards!
Michal