|
| 1 | +Development Instructions |
| 2 | +========================= |
| 3 | + |
| 4 | +.. warning:: |
| 5 | + |
| 6 | + This is a work in progress version of XMC4Arduino documentation. |
| 7 | + While this warning notice is present, the documentation is NOT ready for public usage. |
| 8 | + |
| 9 | +.. |
| 10 | + TODOS: |
| 11 | + - Contribution guidelines (move here from Contributing.md) |
| 12 | + - Code conventions |
| 13 | + - .... |
| 14 | + - Tools installation: |
| 15 | + - uncrustify |
| 16 | + - python ? |
| 17 | + - pip ? |
| 18 | + - pre-commit hook? |
| 19 | + - spellchecker |
| 20 | + - ... |
| 21 | + - Installation of the xmc Arduino core |
| 22 | + - Setting up the development environment |
| 23 | +
|
| 24 | +.. _env_dev_setup: |
| 25 | + |
| 26 | +Environment setup |
| 27 | +------------------ |
| 28 | + |
| 29 | +.. note:: |
| 30 | + | The development environment setup is (currently) only supported on **Linux/WSL** |:penguin:|. |
| 31 | + | As many tools and scripts are not cross-platform, some of them will not directly work on Windows |:abcd:| or macOS |:apple:|. |
| 32 | +
|
| 33 | + |
| 34 | +0. Obviously |:neutral_face:|, install `Arduino IDE (2.0 or higher) <https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing/>`_ or `Arduino CLI (1.0.0 or higher) <https://arduino.github.io/arduino-cli/0.24/installation/>`_. |
| 35 | + |
| 36 | +1. Create an ``<SKETCHBOOK>/hardware/arduino-git`` folder. Where ``<SKETCHBOOK>`` is the location of your Arduino sketchbook. |
| 37 | +You can run: |
| 38 | + :: |
| 39 | + |
| 40 | + mkdir -p $sketchbook/hardware/arduino-git |
| 41 | + |
| 42 | +2. Change directories: |
| 43 | + :: |
| 44 | + |
| 45 | + cd <SKETCHBOOK>/hardware/arduino-git |
| 46 | + |
| 47 | +3. Clone this repo: |
| 48 | + :: |
| 49 | + |
| 50 | + git clone https://github.com/Infineon/XMC-for-Arduino.git xmc |
| 51 | + |
| 52 | +4. You can check if the correct version is installed by running |
| 53 | + |
| 54 | + .. tabs:: |
| 55 | + |
| 56 | + .. group-tab:: Linux |
| 57 | + |
| 58 | + :: |
| 59 | + |
| 60 | + arduino-cli core list |
| 61 | + |
| 62 | + .. group-tab:: Windows/ WSL |
| 63 | + |
| 64 | + :: |
| 65 | + |
| 66 | + arduino-cli.exe core list |
| 67 | + |
| 68 | +This allows quick testing of local changes during development, and keep released version. |
| 69 | +4. From the root directory of the core, run the setup script : |
| 70 | + :: |
| 71 | + |
| 72 | + bash tools/dev-setup.sh |
| 73 | + |
| 74 | +5. Start developing |:tools:|! |
| 75 | + |
| 76 | +|:bell:| |
| 77 | +If you encounter strange behavior with Arduino IDE during development, try cleaning up the IDE cache: |
| 78 | +* Windows: |
| 79 | + :: |
| 80 | + C:\User\"username"\AppData\Roaming\arduino-ide |
| 81 | +* Linux: |
| 82 | + :: |
| 83 | + ~/.config/arduino-ide |
| 84 | +* macOS: |
| 85 | + :: |
| 86 | + ~/Library/Application Support/arduino-ide/ |
0 commit comments