Environment Setup

Note

The development environment setup is (currently) only supported on Linux 🐧.
As many tools and scripts are not cross-platform, some of them will not directly work on Windows 🔡 or macOS 🍎.
  1. Obviously 😐, install Arduino IDE (2.0 or higher) or Arduino CLI (1.0.0 or higher).

  2. Install the PSOC™ 6 Arduino core as described here.

  3. Locate, where the Arduino15 packages are installed on your computer. Usually:

    ~/.arduino15/
    
  4. Starting from the Arduino installation location, change directories:

    cd packages/infineon/hardware/psoc6
    
  5. Remove any existing installed “x.y.z” version of the core:

    rm -rf x.y.z
    
  6. 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 to 1.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.
  7. 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.

  8. If using the Arduino IDE, restart the application.

  9. Start developing 🛠️!

Manual Setup

This section describes the manual setup of the development environment for the Arduino core for PSOC™ 6.
You can consider this a detailed explanation of the development setup process.
Unless you want to know the details 🕵, it is easier and recommended to use the automated setup script 📜 in Environment Setup.

Installing the ArduinoCore-API

  1. Locate in your computer where the Arduino15 packages are installed. By default:

    ~/.arduino15/
    
  2. Change directories to the following path, where your arduino-core-psoc6 repository should be cloned:

    cd packages/infineon/hardware/psoc6/<x.y.z>
    
  3. Initialize the ArduinoCore-API submodule:

    git submodule update --init --recursive
    
  4. Change directories:

    cd cores/psoc6
    
  5. Copy or symlink the api folder from the ArduinoCore-API submodule:

    ln -s ../../extras/arduino-core-api/api .
    
  6. You should see now the api folder in the cores/psoc6 directory.