Hi,
I wanted to add support for a new Seeed board: Semtech LR2021 LoRa Plus Evaluation Kit-EU868 (Based on an Xiao nRF54L15)
However, after updating all settings it didn't compile. I then tried to compile ZephCore for the existing Xiao nRF54L15 setup but this does fail too:
Command: west build -b xiao_nrf54l15/nrf54l15/cpuapp zephcore --no-sysbuild --pristine
This is the error I do get:
D:/Workspace_LoRa/ZephCore/build/zephyr/include/generated/zephyr/devicetree_generated.h:4369:49: error: 'DT_N_S_soc_S_rram_controller_5004b000_S_rram_0_S_partitions_S_partition_14e000_PARTITION_ID' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_rram_controller_5004b000_S_rram_0_S_partitions_S_partition_0_PARTITION_ID'?
4369 | #define DT_N_S_fstab_S_lfs_P_partition_IDX_0_PH DT_N_S_soc_S_rram_controller_5004b000_S_rram_0_S_partitions_S_partition_14e000
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:72:26: note: in definition of macro '__DEBRACKET'
72 | #define __DEBRACKET(...) VA_ARGS
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
| ^~~~~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_macro.h:210:9: note: in expansion of macro 'Z_COND_CODE_1'
210 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree.h:5517:9: note: in expansion of macro 'COND_CODE_1'
5517 | COND_CODE_1(DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT),
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:69:53: note: in expansion of macro '__DEBRACKET'
69 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
| ^~~~~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_macro.h:210:9: note: in expansion of macro 'Z_COND_CODE_1'
210 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree/partitions.h:68:9: note: in expansion of macro 'COND_CODE_1'
68 | COND_CODE_1(DT_NODE_HAS_COMPAT(node_id, zephyr_mapped_partition),
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree/fixed-partitions.h:78:40: note: in expansion of macro 'DT_CAT'
78 | #define DT_FIXED_PARTITION_ID(node_id) DT_CAT(node_id, _PARTITION_ID)
| ^~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree/partitions.h:70:22: note: in expansion of macro 'DT_FIXED_PARTITION_ID'
70 | (DT_FIXED_PARTITION_ID(node_id)))
| ^~~~~~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/subsys/fs/littlefs_fs.c:1136:32: note: in expansion of macro 'DT_PARTITION_ID'
1136 | .storage_dev = (void *)DT_PARTITION_ID(FS_PARTITION(inst)),
| ^~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree.h:5839:41: note: in expansion of macro 'DT_N_S_fstab_S_lfs_P_partition_IDX_0_PH'
5839 | #define DT_CAT6(a1, a2, a3, a4, a5, a6) a1 ## a2 ## a3 ## a4 ## a5 ## a6
| ^~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree.h:1834:9: note: in expansion of macro 'DT_CAT6'
1834 | DT_CAT6(node_id, P, prop, IDX, idx, _PH)
| ^~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/subsys/fs/littlefs_fs.c:1095:28: note: in expansion of macro 'DT_PHANDLE_BY_IDX'
1095 | #define FS_PARTITION(inst) DT_PHANDLE_BY_IDX(DT_DRV_INST(inst), partition, 0)
| ^~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:146:36: note: in expansion of macro 'DT_N_INST_0_zephyr_fstab_littlefs'
146 | #define UTIL_PRIMITIVE_CAT(a, ...) a##VA_ARGS
| ^
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:145:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
145 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, VA_ARGS)
| ^~~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree.h:350:31: note: in expansion of macro 'UTIL_CAT'
350 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
| ^~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree.h:4222:27: note: in expansion of macro 'DT_INST'
4222 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
| ^~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/subsys/fs/littlefs_fs.c:1095:46: note: in expansion of macro 'DT_DRV_INST'
1095 | #define FS_PARTITION(inst) DT_PHANDLE_BY_IDX(DT_DRV_INST(inst), partition, 0)
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/subsys/fs/littlefs_fs.c:1136:48: note: in expansion of macro 'FS_PARTITION'
1136 | .storage_dev = (void *)DT_PARTITION_ID(FS_PARTITION(inst)),
| ^~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/build/zephyr/include/generated/zephyr/devicetree_generated.h:20096:56: note: in expansion of macro 'DEFINE_FS'
20096 | #define DT_FOREACH_OKAY_INST_zephyr_fstab_littlefs(fn) fn(0)
| ^~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:146:36: note: in expansion of macro 'DT_FOREACH_OKAY_INST_zephyr_fstab_littlefs'
146 | #define UTIL_PRIMITIVE_CAT(a, ...) a##VA_ARGS
| ^
D:/Workspace_LoRa/ZephCore/zephyr/subsys/fs/littlefs_fs.c:1140:1: note: in expansion of macro 'DT_INST_FOREACH_STATUS_OKAY'
1140 | DT_INST_FOREACH_STATUS_OKAY(DEFINE_FS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[256/478] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/buf.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'D:\Programme\CMake\bin\cmake.EXE' --build 'D:\Workspace_LoRa\ZephCore\build'
I checked the DTS settings and it looks like this is declared. Also, compile a basic Zephyr example for the nRF54L15 does work too.
It looks like there is a something not correct set for the LittleFS and nRF54L15.
But I'm lacking experience for Zephyr (coming from the bare metal side), so can someone give me some hints where to look for for the root cause?
Many thanks,
Markus DG1GAC
Hi,
I wanted to add support for a new Seeed board: Semtech LR2021 LoRa Plus Evaluation Kit-EU868 (Based on an Xiao nRF54L15)
However, after updating all settings it didn't compile. I then tried to compile ZephCore for the existing Xiao nRF54L15 setup but this does fail too:
Command:
west build -b xiao_nrf54l15/nrf54l15/cpuapp zephcore --no-sysbuild --pristineThis is the error I do get:
D:/Workspace_LoRa/ZephCore/build/zephyr/include/generated/zephyr/devicetree_generated.h:4369:49: error: 'DT_N_S_soc_S_rram_controller_5004b000_S_rram_0_S_partitions_S_partition_14e000_PARTITION_ID' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_rram_controller_5004b000_S_rram_0_S_partitions_S_partition_0_PARTITION_ID'?
4369 | #define DT_N_S_fstab_S_lfs_P_partition_IDX_0_PH DT_N_S_soc_S_rram_controller_5004b000_S_rram_0_S_partitions_S_partition_14e000
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:72:26: note: in definition of macro '__DEBRACKET'
72 | #define __DEBRACKET(...) VA_ARGS
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
| ^~~~~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_macro.h:210:9: note: in expansion of macro 'Z_COND_CODE_1'
210 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree.h:5517:9: note: in expansion of macro 'COND_CODE_1'
5517 | COND_CODE_1(DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT),
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:69:53: note: in expansion of macro '__DEBRACKET'
69 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
| ^~~~~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_macro.h:210:9: note: in expansion of macro 'Z_COND_CODE_1'
210 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree/partitions.h:68:9: note: in expansion of macro 'COND_CODE_1'
68 | COND_CODE_1(DT_NODE_HAS_COMPAT(node_id, zephyr_mapped_partition),
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree/fixed-partitions.h:78:40: note: in expansion of macro 'DT_CAT'
78 | #define DT_FIXED_PARTITION_ID(node_id) DT_CAT(node_id, _PARTITION_ID)
| ^~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree/partitions.h:70:22: note: in expansion of macro 'DT_FIXED_PARTITION_ID'
70 | (DT_FIXED_PARTITION_ID(node_id)))
| ^~~~~~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/subsys/fs/littlefs_fs.c:1136:32: note: in expansion of macro 'DT_PARTITION_ID'
1136 | .storage_dev = (void *)DT_PARTITION_ID(FS_PARTITION(inst)),
| ^~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree.h:5839:41: note: in expansion of macro 'DT_N_S_fstab_S_lfs_P_partition_IDX_0_PH'
5839 | #define DT_CAT6(a1, a2, a3, a4, a5, a6) a1 ## a2 ## a3 ## a4 ## a5 ## a6
| ^~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree.h:1834:9: note: in expansion of macro 'DT_CAT6'
1834 | DT_CAT6(node_id, P, prop, IDX, idx, _PH)
| ^~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/subsys/fs/littlefs_fs.c:1095:28: note: in expansion of macro 'DT_PHANDLE_BY_IDX'
1095 | #define FS_PARTITION(inst) DT_PHANDLE_BY_IDX(DT_DRV_INST(inst), partition, 0)
| ^~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:146:36: note: in expansion of macro 'DT_N_INST_0_zephyr_fstab_littlefs'
146 | #define UTIL_PRIMITIVE_CAT(a, ...) a##VA_ARGS
| ^
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:145:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
145 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, VA_ARGS)
| ^~~~~~~~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree.h:350:31: note: in expansion of macro 'UTIL_CAT'
350 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
| ^~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/devicetree.h:4222:27: note: in expansion of macro 'DT_INST'
4222 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
| ^~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/subsys/fs/littlefs_fs.c:1095:46: note: in expansion of macro 'DT_DRV_INST'
1095 | #define FS_PARTITION(inst) DT_PHANDLE_BY_IDX(DT_DRV_INST(inst), partition, 0)
| ^~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/zephyr/subsys/fs/littlefs_fs.c:1136:48: note: in expansion of macro 'FS_PARTITION'
1136 | .storage_dev = (void *)DT_PARTITION_ID(FS_PARTITION(inst)),
| ^~~~~~~~~~~~
D:/Workspace_LoRa/ZephCore/build/zephyr/include/generated/zephyr/devicetree_generated.h:20096:56: note: in expansion of macro 'DEFINE_FS'
20096 | #define DT_FOREACH_OKAY_INST_zephyr_fstab_littlefs(fn) fn(0)
| ^~
D:/Workspace_LoRa/ZephCore/zephyr/include/zephyr/sys/util_internal.h:146:36: note: in expansion of macro 'DT_FOREACH_OKAY_INST_zephyr_fstab_littlefs'
146 | #define UTIL_PRIMITIVE_CAT(a, ...) a##VA_ARGS
| ^
D:/Workspace_LoRa/ZephCore/zephyr/subsys/fs/littlefs_fs.c:1140:1: note: in expansion of macro 'DT_INST_FOREACH_STATUS_OKAY'
1140 | DT_INST_FOREACH_STATUS_OKAY(DEFINE_FS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[256/478] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/buf.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'D:\Programme\CMake\bin\cmake.EXE' --build 'D:\Workspace_LoRa\ZephCore\build'
I checked the DTS settings and it looks like this is declared. Also, compile a basic Zephyr example for the nRF54L15 does work too.
It looks like there is a something not correct set for the LittleFS and nRF54L15.
But I'm lacking experience for Zephyr (coming from the bare metal side), so can someone give me some hints where to look for for the root cause?
Many thanks,
Markus DG1GAC