Environment Setup
Note
Obviously 😐, install Arduino IDE (2.0 or higher) or Arduino CLI (1.0.0 or higher).
Install the PSOC™ 6 Arduino core as described here.
Locate, where the Arduino15 packages are installed on your computer. Usually:
~/.arduino15/
Starting from the Arduino installation location, change directories:
cd packages/infineon/hardware/psoc6
Remove any existing installed “x.y.z” version of the core:
rm -rf x.y.z
- Clone this repo in a folder with a semver version name. A orderly practice could be to bump the existing version, and add a suffix to indicate the feature or bugfix.For example, from installed
1.1.0
to1.2.0-new-feature
:git clone https://github.com/Infineon/arduino-core-psoc6.git 1.2.0-new-feature
You can check if the correct version is installed by running:
arduino-cli core list
or in the Arduino IDE, navigate to Tools > Board > Boards Manager… and search for PSOC6.
Warning
The name of the repo directory needs to be a valid semver (x.y.z) version number.For more information about the valid Arduino semver notation, see the Package index specification - Platforms definitions. From the root directory of the core, run the setup script 💻:
bash tools/dev-setup.sh
Note
Alternatively, you can setup the development environment manually 🔧 following the steps in Manual setup.
If using the Arduino IDE, restart the application.
Start developing 🛠️!
Manual Setup
Installing the ArduinoCore-API
Locate in your computer where the Arduino15 packages are installed. By default:
~/.arduino15/
C:/Users/%USERNAME%/AppData/Local/Arduino15
Change directories to the following path, where your
arduino-core-psoc6
repository should be cloned:cd packages/infineon/hardware/psoc6/<x.y.z>
Initialize the ArduinoCore-API submodule:
git submodule update --init --recursive
Change directories:
cd cores/psoc6
Copy or symlink the
api
folder from the ArduinoCore-API submodule:ln -s ../../extras/arduino-core-api/api .
Use here absolute paths instead:
mklink /D "C:\Users\%USERNAME%\AppData\Local\Arduino15\packages\infineon\hardware\psoc6\<x.y.z>\cores\psoc6\api" "C:\Users\%USERNAME%\AppData\Local\Arduino15\packages\infineon\hardware\psoc6\<x.y.z>\extras\arduino-core-api\api"
You should see now the
api
folder in thecores/psoc6
directory.