Skip to content

An example configuration for setting up Visual Studio Code for Zephyr application development

License

Notifications You must be signed in to change notification settings

hakanjansson/zephyr-vscode-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

zephyr-vscode-example

This is an example configuration for setting up Visual Studio Code for Zephyr application development. It was originally created for the talk entitled, "Zephyr & Visual Studio Code: How to Develop Zephyr Apps with a Modern, Visual IDE" at EOSS 2023.

Infineon AIROC™ CYW20829 Bluetooth® LE MCU Evaluation Kit (CYW920829M2EVK-02)

The original example has been modified to demonstrate Zephyr application development targeting the Infineon CYW920829M2EVK-02 Evaluation Kit.

Example details

There are many, many different ways to develop a Zephyr application. This example currently assumes:

  • In-tree development
  • Building samples/basic/thread so we can demonstrate thread-aware debugging
  • Targetting CYW920829M2EVK-02

Steps

  1. Follow the Zephyr Getting Started Guide for your OS
  2. Turn on Compilation Database with west config build.cmake-args -- -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
  3. Copy the .vscode folder and/or the zephyr.code-workspace file to samples/basic/thread
  4. See board doc for the CYW920829M2EVK-02
    • Install Infineon customized OpenOCD according to instructions
  5. Open samples/basic/thread in VS Code
    • Accept to install recommended extensions
  6. Edit settings in .vscode/settings.json and/or zephyr.code-workspace to reflect the actual paths used
    • zephyr.zephyr_base
    • zephyr.zephyr_sdk_install_dir
    • infineon.openocd_base
  7. Set the Python: Interpreter Path in VS Code settings
    • If Python virtual environments were used during install, this would be something like:
      • ~/zephyrproject/.venv/bin/python3
  8. Try the different build tasks and the flash task
  9. Try to connect over the serial terminal
  10. Try step debugging
    • Enable thread awareness support by adding CONFIG_DEBUG_THREAD_INFO=y in application file prj.conf

Credits

https://zmk.dev/docs/development/ide-integration

About

An example configuration for setting up Visual Studio Code for Zephyr application development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published