You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting with Zephyr 3.2.0, the `label` property of DT nodes was made
obsolete, which means that is no longer possible to write:
```
pin = Pin(("GPIO_1", 21), Pin.IN)
```
Instead, a much less friendly format must be used:
```
pin = Pin(("gpio@842500", 21), Pin.IN)
```
This commit adds a new script (`gen_dt_node_names.py`) which is heavily
based on [this
script](https://github.com/zephyrproject-rtos/zephyr/blob/main/scripts/dts/gen_dts_cmake.py)
and attempts to generate and map friendly names for DT nodes. For
example, a node defined like this:
```
gpio0: gpio@842500 {
...
}
```
will generate a mapping like this:
```
struct dt_node_name_map {
const char *const gen_name;
const char *const actual_name;
};
static const struct dt_node_name_map dt_node_map[] = {
{"GPIO_0", "gpio@842500"}
...
}
```
The code then checks this mapping if the node name supplied by the user
does not exist and uses the actual DT name instead.
0 commit comments