Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cfb sample build error for esp32 when SSD1306 is enabled #33702

Closed
houssine97 opened this issue Mar 25, 2021 · 2 comments
Closed

cfb sample build error for esp32 when SSD1306 is enabled #33702

houssine97 opened this issue Mar 25, 2021 · 2 comments
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@houssine97
Copy link

houssine97 commented Mar 25, 2021

Describe the bug
When building a project with the SSD1306 enabled and set up, I get build errors for example:

../include/devicetree.h:300:40: error: 'DT_N_INST_0_solomon_ssd1306fb_P_prechargep' undeclared (first use in this function) #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1726:34: note: in expansion of macro 'DT_PROP' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:1726:42: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:120:3: note: in expansion of macro 'DT_INST_PROP' DT_INST_PROP(0, prechargep), ^~~~~~~~~~~~ ../include/devicetree.h:300:40: note: each undeclared identifier is reported only once for each function it appears in #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1726:34: note: in expansion of macro 'DT_PROP' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:1726:42: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:120:3: note: in expansion of macro 'DT_INST_PROP' DT_INST_PROP(0, prechargep), ^~~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c: In function 'ssd1306_set_hardware_config': ../include/devicetree.h:300:40: error: 'DT_N_INST_0_solomon_ssd1306fb_P_display_offset' undeclared (first use in this function) #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1726:34: note: in expansion of macro 'DT_PROP' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:1726:42: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:133:3: note: in expansion of macro 'DT_INST_PROP' DT_INST_PROP(0, display_offset), ^~~~~~~~~~~~ ../include/devicetree.h:300:40: warning: initialization of 'unsigned char' from 'uint8_t *' {aka 'unsigned char *'} makes integer from pointer without a cast [-Wint-conversion] #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1726:34: note: in expansion of macro 'DT_PROP' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:1726:42: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:133:3: note: in expansion of macro 'DT_INST_PROP' DT_INST_PROP(0, display_offset), ^~~~~~~~~~~~ ../include/devicetree.h:300:40: note: (near initialization for 'cmd_buf[2]') #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1726:34: note: in expansion of macro 'DT_PROP' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:1726:42: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:133:3: note: in expansion of macro 'DT_INST_PROP' DT_INST_PROP(0, display_offset), ^~~~~~~~~~~~ ../include/devicetree.h:300:40: error: 'DT_N_INST_0_solomon_ssd1306fb_P_multiplex_ratio' undeclared (first use in this function) #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1726:34: note: in expansion of macro 'DT_PROP' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:1726:42: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:137:3: note: in expansion of macro 'DT_INST_PROP' DT_INST_PROP(0, multiplex_ratio) ^~~~~~~~~~~~ ../include/devicetree.h:300:40: warning: initialization of 'unsigned char' from 'uint8_t *' {aka 'unsigned char *'} makes integer from pointer without a cast [-Wint-conversion] #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1726:34: note: in expansion of macro 'DT_PROP' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:1726:42: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:137:3: note: in expansion of macro 'DT_INST_PROP' DT_INST_PROP(0, multiplex_ratio) ^~~~~~~~~~~~ ../include/devicetree.h:300:40: note: (near initialization for 'cmd_buf[6]') #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1726:34: note: in expansion of macro 'DT_PROP' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:1726:42: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:137:3: note: in expansion of macro 'DT_INST_PROP' DT_INST_PROP(0, multiplex_ratio) ^~~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c: In function 'ssd1306_get_capabilities': ../include/devicetree.h:300:40: error: 'DT_N_INST_0_solomon_ssd1306fb_P_width' undeclared (first use in this function) #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1726:34: note: in expansion of macro 'DT_PROP' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:1726:42: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:298:23: note: in expansion of macro 'DT_INST_PROP' caps->x_resolution = DT_INST_PROP(0, width); ^~~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:298:21: warning: assignment to 'uint16_t' {aka 'short unsigned int'} from 'uint8_t *' {aka 'unsigned char *'} makes integer from pointer without a cast [-Wint-conversion] caps->x_resolution = DT_INST_PROP(0, width); ^ In file included from ../include/arch/xtensa/arch.h:18, from ../include/arch/cpu.h:27, from ../include/kernel_includes.h:33, from ../include/kernel.h:17, from ../include/init.h:11, from ../include/device.h:22, from C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:13: ../include/devicetree.h:300:40: error: 'DT_N_INST_0_solomon_ssd1306fb_P_height' undeclared (first use in this function) #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1726:34: note: in expansion of macro 'DT_PROP' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:1726:42: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:299:23: note: in expansion of macro 'DT_INST_PROP' caps->y_resolution = DT_INST_PROP(0, height); ^~~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:299:21: warning: assignment to 'uint16_t' {aka 'short unsigned int'} from 'uint8_t *' {aka 'unsigned char *'} makes integer from pointer without a cast [-Wint-conversion] caps->y_resolution = DT_INST_PROP(0, height); ^ In file included from ../include/arch/xtensa/arch.h:18, from ../include/arch/cpu.h:27, from ../include/kernel_includes.h:33, from ../include/kernel.h:17, from ../include/init.h:11, from ../include/device.h:22, from C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:13: C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c: In function 'ssd1306_init': ../include/devicetree.h:300:40: error: 'DT_N_INST_0_solomon_ssd1306fb_BUS_P_label' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_spi_3ff64000_P_label'? #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT' #define DT_CAT(a1, a2) a1 ## a2 ^~ ../include/devicetree.h:1660:31: note: in expansion of macro 'DT_PROP' #define DT_BUS_LABEL(node_id) DT_PROP(DT_BUS(node_id), label) ^~~~~~~ ../include/devicetree.h:1653:25: note: in expansion of macro 'DT_CAT' #define DT_BUS(node_id) DT_CAT(node_id, _BUS) ^~~~~~ ../include/devicetree.h:1660:39: note: in expansion of macro 'DT_BUS' #define DT_BUS_LABEL(node_id) DT_PROP(DT_BUS(node_id), label) ^~~~~~ ../include/devicetree.h:2006:33: note: in expansion of macro 'DT_BUS_LABEL' #define DT_INST_BUS_LABEL(inst) DT_BUS_LABEL(DT_DRV_INST(inst)) ^~~~~~~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/devicetree.h:2006:46: note: in expansion of macro 'DT_DRV_INST' #define DT_INST_BUS_LABEL(inst) DT_BUS_LABEL(DT_DRV_INST(inst)) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:385:35: note: in expansion of macro 'DT_INST_BUS_LABEL' driver->bus = device_get_binding(DT_INST_BUS_LABEL(0)); ^~~~~~~~~~~~~~~~~ In file included from C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:13: C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c: At top level: ../include/devicetree.h:300:40: error: 'DT_N_INST_0_solomon_ssd1306fb_FULL_NAME' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_i2c_3ff53000_FULL_NAME'? #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/device.h:1006:11: note: in definition of macro 'Z_DEVICE_DEFINE' .name = drv_name, \ ^~~~~~~~ ../include/sys/util_internal.h:64:53: note: in expansion of macro '__DEBRACKET' #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val ^~~~~~~~~~~ ../include/sys/util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET' __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code) ^~~~~~~~~~~~~~~~~~~~ ../include/sys/util_internal.h:54:2: note: in expansion of macro '__COND_CODE' __COND_CODE(_XXXX##_flag, _if_1_code, _else_code) ^~~~~~~~~~~ ../include/sys/util_macro.h:117:2: note: in expansion of macro 'Z_COND_CODE_1' Z_COND_CODE_1(_flag, _if_1_code, _else_code) ^~~~~~~~~~~~~ ../include/devicetree.h:595:2: note: in expansion of macro 'COND_CODE_1' COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \ ^~~~~~~~~~~ ../include/device.h:172:2: note: in expansion of macro 'DT_PROP_OR' DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id)) ^~~~~~~~~~ ../include/devicetree.h:422:36: note: in expansion of macro 'DT_CAT' #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME) ^~~~~~ ../include/device.h:172:29: note: in expansion of macro 'DT_NODE_FULL_NAME' DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id)) ^~~~~~~~~~~~~~~~~ ../include/device.h:215:4: note: in expansion of macro 'DEVICE_DT_NAME' DEVICE_DT_NAME(node_id), init_fn, \ ^~~~~~~~~~~~~~ ../include/device.h:231:2: note: in expansion of macro 'DEVICE_DT_DEFINE' DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__) ^~~~~~~~~~~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/device.h:231:19: note: in expansion of macro 'DT_DRV_INST' DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:458:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE' DEVICE_DT_INST_DEFINE(0, ssd1306_init, device_pm_control_nop, ^~~~~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:40: error: initializer element is not constant #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/device.h:1006:11: note: in definition of macro 'Z_DEVICE_DEFINE' .name = drv_name, \ ^~~~~~~~ ../include/sys/util_internal.h:64:53: note: in expansion of macro '__DEBRACKET' #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val ^~~~~~~~~~~ ../include/sys/util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET' __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code) ^~~~~~~~~~~~~~~~~~~~ ../include/sys/util_internal.h:54:2: note: in expansion of macro '__COND_CODE' __COND_CODE(_XXXX##_flag, _if_1_code, _else_code) ^~~~~~~~~~~ ../include/sys/util_macro.h:117:2: note: in expansion of macro 'Z_COND_CODE_1' Z_COND_CODE_1(_flag, _if_1_code, _else_code) ^~~~~~~~~~~~~ ../include/devicetree.h:595:2: note: in expansion of macro 'COND_CODE_1' COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \ ^~~~~~~~~~~ ../include/device.h:172:2: note: in expansion of macro 'DT_PROP_OR' DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id)) ^~~~~~~~~~ ../include/devicetree.h:422:36: note: in expansion of macro 'DT_CAT' #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME) ^~~~~~ ../include/device.h:172:29: note: in expansion of macro 'DT_NODE_FULL_NAME' DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id)) ^~~~~~~~~~~~~~~~~ ../include/device.h:215:4: note: in expansion of macro 'DEVICE_DT_NAME' DEVICE_DT_NAME(node_id), init_fn, \ ^~~~~~~~~~~~~~ ../include/device.h:231:2: note: in expansion of macro 'DEVICE_DT_DEFINE' DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__) ^~~~~~~~~~~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/device.h:231:19: note: in expansion of macro 'DT_DRV_INST' DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:458:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE' DEVICE_DT_INST_DEFINE(0, ssd1306_init, device_pm_control_nop, ^~~~~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:40: note: (near initialization for '__device_dts_ord_DT_N_INST_0_solomon_ssd1306fb_ORD.name') #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~~ ../include/device.h:1006:11: note: in definition of macro 'Z_DEVICE_DEFINE' .name = drv_name, \ ^~~~~~~~ ../include/sys/util_internal.h:64:53: note: in expansion of macro '__DEBRACKET' #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val ^~~~~~~~~~~ ../include/sys/util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET' __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code) ^~~~~~~~~~~~~~~~~~~~ ../include/sys/util_internal.h:54:2: note: in expansion of macro '__COND_CODE' __COND_CODE(_XXXX##_flag, _if_1_code, _else_code) ^~~~~~~~~~~ ../include/sys/util_macro.h:117:2: note: in expansion of macro 'Z_COND_CODE_1' Z_COND_CODE_1(_flag, _if_1_code, _else_code) ^~~~~~~~~~~~~ ../include/devicetree.h:595:2: note: in expansion of macro 'COND_CODE_1' COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \ ^~~~~~~~~~~ ../include/device.h:172:2: note: in expansion of macro 'DT_PROP_OR' DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id)) ^~~~~~~~~~ ../include/devicetree.h:422:36: note: in expansion of macro 'DT_CAT' #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME) ^~~~~~ ../include/device.h:172:29: note: in expansion of macro 'DT_NODE_FULL_NAME' DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id)) ^~~~~~~~~~~~~~~~~ ../include/device.h:215:4: note: in expansion of macro 'DEVICE_DT_NAME' DEVICE_DT_NAME(node_id), init_fn, \ ^~~~~~~~~~~~~~ ../include/device.h:231:2: note: in expansion of macro 'DEVICE_DT_DEFINE' DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__) ^~~~~~~~~~~~~~~~ ../include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) ^~~~~~~~~~~~~~~~~~ ../include/devicetree.h:300:31: note: in expansion of macro 'UTIL_CAT' #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) ^~~~~~~~ ../include/devicetree.h:1704:27: note: in expansion of macro 'DT_INST' #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) ^~~~~~~ ../include/device.h:231:19: note: in expansion of macro 'DT_DRV_INST' DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__) ^~~~~~~~~~~ C:/Users/houssine/zephyrproject/zephyr/drivers/display/ssd1306.c:458:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE' DEVICE_DT_INST_DEFINE(0, ssd1306_init, device_pm_control_nop,

To Reproduce
1 - add CONFIG_SSD1306=y to prj.conf
2-Build using west build -b esp32 samples\display\cfb -- -DSHIELD=ssd1306_128x64

Impact
code doesn't build.

Environment (please complete the following information):

  • OS: Windows
  • Toolchain Zephyr SDK
@houssine97 houssine97 added the bug The issue is a bug, or the PR is fixing a bug label Mar 25, 2021
@houssine97 houssine97 changed the title build error for esp32 whenSSD1306 is enabled cfc sample build error for esp32 when SSD1306 is enabled Mar 25, 2021
@houssine97 houssine97 changed the title cfc sample build error for esp32 when SSD1306 is enabled cfb sample build error for esp32 when SSD1306 is enabled Mar 25, 2021
@galak
Copy link
Collaborator

galak commented Mar 25, 2021

The esp32 board devicetree doesn't support an arduino header connector at this time so this is not expected to work. This is not a bug, but would be an enhancement request (assuming the board has an arduino header).

@galak galak closed this as completed Mar 25, 2021
@moCork
Copy link

moCork commented Mar 25, 2021

The esp32 board devicetree doesn't support an arduino header connector at this time so this is not expected to work. This is not a bug, but would be an enhancement request (assuming the board has an arduino header).

Hi @galak what do you mean by it does not support the arduino header. We are using Oled with I2C port.
Can you please explain what you mean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

3 participants