-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Description
When building on debian 13:
python3 make.py stm32 BOARD=STM32F769DISC DISPLAY=ST7789 INDEV=FT5x36
im getting:
AS ../../shared/runtime/gchelper_thumb2.s
CC /home/alt/lvgl_micropython/ext_mod/lcd_bus/lcd_types.c
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
In file included from /home/alt/lvgl_micropython/ext_mod/lcd_bus/modlcd_bus.c:5:
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_include/spi_bus.h:87:13: error: unknown type name 'machine_hw_spi_device_obj_t'; did you mean 'mp_machine_hw_spi_device_obj_t'?
87 | machine_hw_spi_device_obj_t *spi_bus;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| mp_machine_hw_spi_device_obj_t
make: *** [../../py/mkrules.mk:101: build-STM32F769DISC/lcd_bus/modlcd_bus.o] Error 1
I've checked the Build-Troubleshooting section DEFINE_CONST_OBJ_TYPE - it seems somewhat relevant, however its over my head, I've changed machine_hw_spi_device_obj_t to mp_machine_hw_spi_device_obj_t in spi_bus.h, but now got more of similar errors:
Does it mean that STM32 port was not updated after changes in #8813 ?
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c: In function 'mp_lcd_spi_bus_make_new':
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c:135:26: error: 'machine_hw_spi_device_obj_t' undeclared (first use in this function); did you mean 'mp_machine_hw_spi_device_obj_t'?
135 | self->spi_bus = (machine_hw_spi_device_obj_t *)MP_OBJ_TO_PTR(args[ARG_spi_bus].u_obj);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| mp_machine_hw_spi_device_obj_t
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c:135:26: note: each undeclared identifier is reported only once for each function it appears in
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c:135:55: error: expected expression before ')' token
135 | self->spi_bus = (machine_hw_spi_device_obj_t *)MP_OBJ_TO_PTR(args[ARG_spi_bus].u_obj);
| ^
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c: In function 's_spi_init':
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c:222:45: error: 'mp_machine_hw_spi_bus_obj_t' {aka 'struct _mp_machine_hw_spi_bus_obj_t'} has no member named 'mosi'
222 | spi_args[9] = self->spi_bus->spi_bus->mosi;
| ^~
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c:224:46: error: 'mp_machine_hw_spi_bus_obj_t' {aka 'struct _mp_machine_hw_spi_bus_obj_t'} has no member named 'miso'
224 | spi_args[11] = self->spi_bus->spi_bus->miso;
| ^~
In file included from /home/alt/lvgl_micropython/ext_mod/lcd_bus/lcd_types.h:9,
from /home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c:6:
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c:227:51: error: 'machine_spi_type' undeclared (first use in this function)
227 | spi = MP_OBJ_TO_PTR(MP_OBJ_TYPE_GET_SLOT(&machine_spi_type, make_new)((mp_obj_t)&machine_spi_type, 2, 5, spi_args));
| ^~~~~~~~~~~~~~~~
../../py/obj.h:317:36: note: in definition of macro 'MP_OBJ_TO_PTR'
317 | #define MP_OBJ_TO_PTR(o) ((void *)(o))
| ^
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c:227:29: note: in expansion of macro 'MP_OBJ_TYPE_GET_SLOT'
227 | spi = MP_OBJ_TO_PTR(MP_OBJ_TYPE_GET_SLOT(&machine_spi_type, make_new)((mp_obj_t)&machine_spi_type, 2, 5, spi_args));
| ^~~~~~~~~~~~~~~~~~~~
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c:230:48: error: 'mp_machine_spi_p_t' undeclared (first use in this function); did you mean 'mp_machine_hw_spi_state_t'?
230 | self->panel_io_config.spi_transfer = ((mp_machine_spi_p_t *)MP_OBJ_TYPE_GET_SLOT(spi->type, protocol))->transfer;
| ^~~~~~~~~~~~~~~~~~
| mp_machine_hw_spi_state_t
/home/alt/lvgl_micropython/ext_mod/lcd_bus/common_src/spi_bus.c:230:68: error: expected expression before ')' token
230 | self->panel_io_config.spi_transfer = ((mp_machine_spi_p_t *)MP_OBJ_TYPE_GET_SLOT(spi->type, protocol))->transfer;
| ^
make: *** [../../py/mkrules.mk:101: build-STM32F769DISC/lcd_bus/common_src/spi_bus.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory '/home/alt/lvgl_micropython/lib/micropython/ports/stm32'
Metadata
Metadata
Assignees
Labels
No labels