Open
Description
Tutorial - Debugging - Visual Studio Code page presents approach to mbed-os 5.15 debugging with VS Code.
The proposed approach does not work for the several reasons.
- mbed-os compilation with MAKE utility fails under MS Windows. Makefile script generated by Mbed CLI export tool:
- hits Windows 8192 character command length limit when link_options.txt file is built (see issues #10943 & #12646),
- fails if project path contains whitespace,
- contains some absolute paths to project files,
- builds release profile only,
- contains paths and defines, thus introduces significant maintenance overhead.
For the above reasons, build with MAKE should NOT be recommended.
Why recommend MAKE when you have quite-ok-working Mbed CLI Python-based tool?
- Mbed CLI export generated tasks.json VS Code configuration file has schema 0.1.0 depreciated long time ago. Current version is 2.0.0.
- The proposed approach to debugging is based on pyOCD. Perhaps this is OK but:
- tutorial uses old pyOCD version. Current version is invoked differently:
pyocd gdbserver
instead ofpyocd-gdbserver
. Perhaps other changes are required as well. I never managed to get it working despite determination and effort. It does not seem pyOCD oficially support VS Code. - Why not use st-util instead? It works and configuration is much simpler - just 9 lines in launch.json instead of 30-40 lines with OS-specific paths settings.
- tutorial uses old pyOCD version. Current version is invoked differently: