Skip to content

Commit 871f7f2

Browse files
committed
docs: Added metafiles naming conventions.
Signed-off-by: jaenrig-ifx <[email protected]>
1 parent cf7257c commit 871f7f2

File tree

3 files changed

+130
-0
lines changed

3 files changed

+130
-0
lines changed

docs/contributing.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Additionally, the following sections might be helpful for developing and testing
2121

2222
- :doc:`env-setup`
2323
- :doc:`run-tests`
24+
- :doc:`metafiles-naming`
2425

2526
Thank you for following these guidelines!
2627

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Welcome to the Arduino Core for Infineon's PSOC™ 6 microcontrollers.
2525
Introduction <contributing>
2626
env-setup
2727
run-tests
28+
metafiles-naming
2829

2930
License
3031
=======

docs/metafiles-naming.rst

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
Metafiles Naming Conventions
2+
=============================
3+
4+
5+
This section describes the naming conventions for metafiles used in the Arduino Core for PSOC™ 6.
6+
When adding new variables to these metafiles, follow these conventions to maintain consistency and clarity.
7+
8+
9+
.. note::
10+
11+
Most variables are already defined and likely will not require modification soon. They are documented here to clarify their usage and the rationale behind their values.
12+
13+
The conventions apply to the following files:
14+
15+
- ``boards.txt``
16+
- ``platform.txt``
17+
- ``package/package_psoc6_index.template.json``
18+
19+
boards.txt
20+
-----------
21+
22+
.. list-table::
23+
:header-rows: 1
24+
:widths: 20 30 30 30
25+
26+
* - Parameter
27+
- Value
28+
- Description
29+
- Example
30+
* - ``<board>``
31+
- | **OPN (Original Part number)**
32+
| of the board converted to **snake_case**
33+
- | This defines the ``board_unique_id`` field
34+
| of the `Fully Qualified Board Name (FQBN) <https://docs.arduino.cc/arduino-cli/platform-specification/>`_
35+
| used in arduino-cli.
36+
- ``cy8ckit_062s2_ai``
37+
* - ``<board>.name``
38+
- | **OPN (Original Part number)** of
39+
| the board
40+
- | Human readable friendly Board Name
41+
| shown in Arduino IDE menus.
42+
- ``CY8CKIT-062S2-AI``
43+
44+
platform.txt
45+
-------------
46+
47+
.. list-table::
48+
:header-rows: 1
49+
:widths: 20 30 30
50+
51+
* - Parameter
52+
- Value
53+
- Description
54+
* - ``name=``
55+
- ``Infineon PSOC Boards``
56+
- | The **name** will be shown as the Arduino IDE's Board
57+
| menu section title or the Name field of arduino-cli core
58+
| list's output for the platform.
59+
* - ``version=``
60+
- | Empty.
61+
| Automatically set during
62+
| release core packaging.
63+
- | The **version** is currently unused, it is reserved for
64+
| future use (probably together with the Boards Manager
65+
| to handle dependencies on cores).
66+
67+
package_psoc6_index.json
68+
------------------------
69+
70+
.. list-table::
71+
:header-rows: 1
72+
:widths: 20 40 30
73+
74+
* - Parameter
75+
- Value
76+
- Description
77+
* - JSON file name
78+
- ``package_psoc6_index.json``
79+
- | `Specification <https://arduino.github.io/arduino-cli/1.3/package_index_json-specification/>`_ requirement:
80+
| package_<YOURNAME_PACKAGENAME>_index.json
81+
* - ``name``
82+
- ``infineon``
83+
- | This defines the vendor directory `name` of
84+
| the installed package in the Arduino installation
85+
| path.
86+
| It also defines the **vendor** field of the
87+
| `Fully Qualified Board Name (FQBN) <https://docs.arduino.cc/arduino-cli/platform-specification/>`_.
88+
* - ``maintainer``
89+
- ``Infineon Technologies AG``
90+
- | The extended name of the vendor that is displayed
91+
| on the Arduino IDE Boards Manager GUI
92+
* - ``websiteURL``
93+
- `Link to docs <https://arduino-core-psoc.readthedocs.io/en/latest/index.html>`_
94+
- | The URL to the vendor's website, appears
95+
| on the Arduino IDE Boards Manager as "More info" link.
96+
* - ``email``
97+
98+
- Contact email of the maintainer
99+
* - ``platforms.name``
100+
- ``Infineon PSOC Boards``
101+
- | The extended name of the platform that
102+
| is displayed on the Boards Manager GUI.
103+
* - ``platforms.architecture``
104+
- ``psoc6``
105+
- | It defines the **architecture** field of the
106+
| `Fully Qualified Board Name (FQBN) <https://docs.arduino.cc/arduino-cli/platform-specification/>`_.
107+
* - ``platforms.category``
108+
- ``Contributed``
109+
- | This field is reserved. Third-party
110+
| cores must set it to "Contributed."
111+
* - ``platforms.help.online``
112+
- Empty
113+
- | Used only in legacy Arduino IDE 1.x.
114+
| Not used in Arduino IDE 2.x.
115+
* - ``platforms.boards.name``
116+
- | **OPN (Original Part number)**
117+
| of the board
118+
- | The list of supported boards shown in
119+
| the Arduino IDE's Boards Manager GUI
120+
| core entry.
121+
* - ``platforms.toolsDependencies.packager``
122+
- ``infineon``
123+
- | No specification. Use the same name
124+
| as the vendor.
125+
* - ``platforms.tools``
126+
- **kebab-case** naming
127+
- | No additional requirements other
128+
| than the `package index specification <https://arduino.github.io/arduino-cli/1.3/package_index_json-specification/>`_.

0 commit comments

Comments
 (0)