The PSoC4 BLE Example code for Visual Studio Code
For Windows, Linux, MacOs
This example project is refactored for Visual Studio Code. Project configuration is done by the 'good old' PSoC Creator.
Visual Studio Code Project
│
├── .vs
│ └── (Visual Studio Code / project settings)
│
├── build
│ └── (The build output for the project: project.elf & project.hex will go here)
│
├── PSoC_Creator.cydsn
│ └── (PSoC Creator project)
│
└── source
└── (Location of your source files: main.c, etc.)
- Install Visual Studio Code.
- Install the OTX-Maestro extension (Sidebar >
Extensions
> searchOTX-Maestro
>Install
). - All necessary tools are included in the OTX-Maestro Tools package, which bundles the GNU ARM tools, OpenOCD, and more.
- Download and install OTX-Maestro Tools.
- Clone or download the project to your local machine.
- Hint: To avoid build issues, keep the project directory path short by placing it close to the root directory.
- Open the main project folder in VS Code.
- Click
Clean-Reconfigure
from the status bar. This will scan the PSoC Creator folder for sources, includes, build options, etc., and include them into the project.- If the project wasn't initialized before, it will ask which programmer/debugger to use.
- Click
Build
orBuild-And-Launch
to build (and launch) your project.
- PSoC Creator is needed for the routing / system setup. A Windows environment is required to run PSoC Creator. PSoC Creator is only needed for the chip configuration (often a one-time setup).
- The build process uses Cypress' cyelftool which is officialy built for Windows only. OTX-Maestro tools includes is a rebuilt version for MacOs and Linux. The official C source files can be found here or here. Another possibility is to use Wine.
- PSoC Creator uses CyComponentLibrary.a from the PSoC Creator application folder. The postbuild action copies CyComponentLibrary.a from the PSoC Creator application folder to the project folder.
- Feedback and Community Involvement: While significant effort has been made to ensure this setup works smoothly, not all possible configurations and platforms could be tested. Therefore, community feedback and contributions are highly encouraged to further improve the tool. Any issues, suggestions, or improvements can be shared within the Infineon developer community.
- Disclaimer: Although this setup uses well-tested tools and configurations, the use of it is at your own risk.
Enjoy!