1 of 1 people found this helpful
The VS Code exporter in Mbed OS is buggy and I attribute this error to that. Please use the mbed-vscode-generator to create a clean launch.json, task.json, and c_cpp_properties.json file.
If you face any problems, please attach your complete project. I will fix it and attach it back to you.
I went through the incredibly long and complicated process of installing "mbed-vscode-generator" and now I am having the following problem when kicking off a compile in VSCode. It seems like it will compile a few files and then fails like this:
> Executing task: mbed.exe compile -m CY8CKIT_062_WIFI_BT --profile=debug <
[mbed] Working path "C:\VSCodeWork\mbed-os-example-blinky" (program)
[Warning] @,: Compiler version mismatch: Have 7.2.1; expected version >= 9.0.0 and < 10.0.0
Building project mbed-os-example-blinky (CY8CKIT_062_WIFI_BT, GCC_ARM)
Compile [ 10.9%]: cfg_stack.c
Compile [ 11.0%]: dm_adv.c
Compile [ 11.1%]: dm_adv_ae.c
[ERROR] [Errno 0] Error
[mbed] ERROR: "C:\Python27\python.exe" returned error.
Command: "C:\Python27\python.exe -u C:\VSCodeWork\mbed-os-example-blinky\mbed-os\tools\make.py -t GCC_ARM -m CY8CKIT_062_WIFI_BT --profile debug --source . --build .\BUILD\CY8CKIT_062_WIFI_BT\GCC_ARM-DEBUG"
Tip: You could retry the last command with "-v" flag for verbose output
The terminal process terminated with exit code: 1
When I go into the project in a command line and run "mbed compile" it runs to completion without issue.
I have the same problem. The mbed-vscode-generator didn't fix it. I'm building the elf file in another environment (conda with mbed-cli and all the dependencies installed) and am attempting to use vscode purely for debugging. Debugging directly from gdb seems to run the firmware fine, but also doesn't stop at breakpoints (I'm sure I need a few more configuration options doing it that way).
GNU gdb (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 18.104.22.16880315-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file BUILD/CY8CKIT_062_BLE/GCC_ARM-DEBUG/mbed-os-example-blinky.elf
Reading symbols from BUILD/CY8CKIT_062_BLE/GCC_ARM-DEBUG/mbed-os-example-blinky.elf...done.
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
0x08000378 in ?? ()
(gdb) mon reset
(gdb) b main.cpp:15
Breakpoint 1 at 0x10002344: file .\main.cpp, line 15.
Note: automatically using hardware breakpoints for read-only addresses.
OK, let me know if you come up with a solution to get this working in VSCode...
I also tried it with OpenOCD instead of PyOCD today. Same problem. Tried it with openocd 0.10.0 installed via chocolatey on Windows
openocd -f C:\ProgramData\chocolatey\lib\openocd\tools\OpenOCD-20190828-0.10.0\share\openocd\scripts\interface\cmsis-dap.cfg -f C:\ProgramData\chocolatey\lib\openocd\tools\OpenOCD-20190828-0.10.0\share\openocd\scripts\target\psoc6.cfg -c init -c "reset init"
with the interface MCU set to CMSIS-DAP mode
and also the most recent version on the devel branch from here
built under Cygwin. Tried it both in CMSIS-DAP and DAPLink mode and with both config files
./openocd -f interface/cmsis-dap.cfg -f target/psoc6.cfg -c init -c "reset init" and
./openocd -f interface/kitprog3.cfg -f target/psoc6.cfg -c init -c "reset init"
The problem is always the same, that the program segfaults within .L_loop0_0
It would be nice if you could point me to a working debug configuration since I have been unable so far to debug code on the CY8CKIT_062_BLE.
Edit: I just tried it with the CY8CPROTO_063_BLE..ran into the same problem.
The exporters for VSCODE seems to be broken and I see multiple reports of this in the mbed community too. I'm tracking the tickets which are looking into this issue. Will keep you posted once this issue is fixed.
My attempts to fix the project you provided me haven't been fruitful.