zephyr/scripts
Gerard Marull-Paretas 7772cec6bd edtlib: always insert root node to the graph
When we have an empty Devicetree, ie,

```
/dts-v1/;

/ {

};
```

The node's dep_ordinal is never initialized because the node graph is
empty. This ends up with invalid ordinal tokens (-1) in
devicetree_generated.h which in turn produce some cryptic compiler
errors, see e.g.

```
error: pasting "dts_ord_" and "-" does not give a valid preprocessing
token
   95 | #define Z_DEVICE_DT_DEV_ID(node_id) _CONCAT(dts_ord_,
      DT_DEP_ORD(node_id))

...

include/zephyr/devicetree.h:2498:41:
note: in expansion of macro 'DT_FOREACH_OKAY_HELPER'
 2498 | #define DT_FOREACH_STATUS_OKAY_NODE(fn)
      DT_FOREACH_OKAY_HELPER(fn)
            |
	    ^~~~~~~~~~~~~~~~~~~~~~
include/zephyr/device.h:1022:1:
note: in expansion of macro 'DT_FOREACH_STATUS_OKAY_NODE'
     1022 |
	  DT_FOREACH_STATUS_OKAY_NODE(Z_MAYBE_DEVICE_DECLARE_INTERNAL)

```

(devicetree_generated.h)

```
...
 #define DT_N_ORD -1
 #define DT_N_ORD_STR_SORTABLE 000-1
...
```

This patch makes sure root node is always inserted (without any target)
so that it gets initialized later.

Discovered as part of
https://github.com/zephyrproject-rtos/zephyr/pull/63696

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-10-11 18:28:01 +03:00
..
build scripts: check_init_priorities: use the Zephyr executable file 2023-09-20 20:24:46 +01:00
checkpatch kernel/timeout: introduce the timepoint API 2023-07-25 09:12:26 +02:00
ci ci: tags: include wifi/net drivers in the net group 2023-10-10 16:22:54 +03:00
coccinelle scripts: coccinelle: Remove strtok_r symbol from checklist 2023-08-23 16:05:08 +01:00
coredump gdbstub: xtensa: add support for dc233c core 2023-09-27 19:30:15 -05:00
dts edtlib: always insert root node to the graph 2023-10-11 18:28:01 +03:00
footprint footprint: ci: ehl_crb board has been renamed. 2023-08-28 10:28:18 +02:00
generate_usb_vif USB-C: genVIF: Cleanup and add support to pick static data from input 2023-05-26 13:54:43 -04:00
gitlint gitlint: exclude long line with co-authored-by 2023-09-27 06:20:16 -04:00
kconfig scripts: kconfig: Make DEPRECATED/EXPERIMENTAL symbols optional 2023-10-11 18:25:57 +03:00
logging/dictionary scripts/log_parser: Handle signed and unsigned char length modifier 2023-09-25 19:41:50 +02:00
native_simulator native simulator: Get latest from upstream 2023-09-18 10:42:38 +01:00
net net: script: Fix the net-tools path 2023-10-06 16:14:39 +03:00
pylib scripts: pylib: build_helpers: flash_order fix 2023-10-10 15:55:58 +03:00
pylint/checkers scripts: pylint: Add argument parser abbreviation checker 2023-01-26 20:12:36 +09:00
release scripts: drop list_issues.py 2023-07-25 16:45:15 +02:00
schemas twister: support filtering by vendor 2023-09-22 09:29:36 +02:00
support treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
tests .github: workflows: Workflow for build_helpers 2023-10-10 15:55:58 +03:00
tracing tracing: scripts: Fix spelling 2023-02-08 01:09:31 +09:00
utils util: increase several macros limit from 255 to 4095 2023-10-05 06:10:06 -04:00
west_commands west: bossac: handle stty from coreutils on macOS 2023-10-11 11:05:48 +01:00
.gitignore
checkpatch.pl scripts: Exclude spelling.txt from spelling check 2023-08-04 21:18:43 +00:00
checkstack.pl
coccicheck
dump_bugs_pickle.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
gen_gcov_files.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
get_maintainer.py scripts: get_maintainer: Fix glob pattern directory match error logic 2023-04-26 00:29:25 +09:00
github_helpers.py
list_boards.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
make_bugs_pickle.py treewide: Disable automatic argparse argument shortening 2023-01-26 20:12:36 +09:00
requirements-base.txt west.cmake: make MIN_WEST_VERSION catch up with requirements-base.txt 2023-05-22 10:17:11 +02:00
requirements-build-test.txt
requirements-compliance.txt scripts: compliance: add support for YAMLLint 2023-01-04 17:29:23 +01:00
requirements-extras.txt scripts: Update CFB font generator 2023-09-13 14:40:00 -07:00
requirements-run-test.txt twister: Use natural sort when generating hardware map 2023-06-17 07:54:46 -04:00
requirements.txt doc: move requirements to doc/ 2023-07-12 09:13:49 -04:00
series-push-hook.sh
set_assignees.py scripts: set_assignee: set reviewers for modules 2023-09-27 15:27:19 +02:00
snippets.py twister: Add support for required snippets 2023-09-06 16:40:53 +02:00
spelling.txt doc: Fix a typo 2023-08-04 21:18:43 +00:00
tags.sh
twister twister: Add support for required snippets 2023-09-06 16:40:53 +02:00
valgrind.supp valgrind: Update suppression file to align with updated POSIX arch 2023-07-05 07:01:19 -04:00
west-commands.yml west: commands: Add bindesc command 2023-09-28 07:39:09 -04:00
zephyr_module.py scripts: zephyr_module: Tolerate symlinks 2023-08-11 12:01:21 +00:00