Closed mirkokral closed 6 months ago
For convenience: This is the exact line at the file at the end of the traceback:
178 | self._disp_drv = lv.display_create(display_width, display_height)
This should now be fixed, can you please test and let me know.
@mirkokral - wondering if you can help as I am trying to build lvgl on a RP2020 PICO W board. Is that your target board ? - I ask since you had a reference to rp2_dma in the code snippet.
I get this error:
Traceback (most recent call last):
File "<stdin>", line 9, in <module>
NotImplementedError: LCD SPI but is not available for this MCU
I'm thinking support for RP2 is still in the making looking at this line 117 in spi_bus.c:
#if !defined(mp_hal_pin_output) && !defined(IDF_VER)
mp_raise_msg(&mp_type_NotImplementedError, MP_ERROR_TEXT("LCD SPI but is not available for this MCU"));
#else
IDF_VER won't be defined for RP2 builds.
code :
import sys
sys.path.append('.')
import lcd_bus
import machine
display_bus = lcd_bus.SPIBus(
dc=11,
host=1,
sclk=40,
freq=80000000,
mosi=41,
miso=38,
cs=12,
quad_spi=False,
tx_only=False,
cmd_bits=8,
param_bits=8,
dc_low_on_data=False,
sio_mode=False,
lsb_first=False,
cs_high_active=False,
spi_mode=0
)
lvgl_micropython build from master on 2024-04-09
MicroPython v1.22.1-dirty on 2024-04-09; Raspberry Pi Pico W with RP2040
I have not hammered out getting it to compile for the PI boards yet.
@acowls
I just made a change to the repo. clone it again and built and see if that fixes the problem.
Thanks @kdschlosser that helped progress. Two other changes required to get compilation working on RP2040.
Adding a trailing comma at the end of 'rp2' in make.py line 16:
argParser = ArgumentParser(prefix_chars='-')
argParser.add_argument(
'target',
help='build target',
choices=[
'esp32', 'windows', 'stm32', 'unix', 'rp2',
'renesas-ra', 'nrf', 'mimxrt', 'samd'
],
action='store',
nargs=1
)
adding a parameter to the funcition spi_init - I think this might be required to support rgb 565 byte swap bool added to esp code base also recently. change made in lcd_bus\common_src\spi_bus.c line 44:
mp_lcd_err_t s_spi_init(mp_obj_t obj, uint16_t width, uint16_t height, uint8_t bpp, uint32_t buffer_size, bool rgb565_byte_swap);
and here on line 199:
mp_lcd_err_t s_spi_init(mp_obj_t obj, uint16_t width, uint16_t height, uint8_t bpp, uint32_t buffer_size, bool rgb565_byte_swap)
With that the compilation succeeds for the board.
OK those problems are fixed m8
This problem should be solved so I am closing the issue.
Hello, i get this error:
When running this code: