Skip to content

ImportError: no module named '_ili9341_init' #579

Description

@tedx

I successfully built a current clone of lvgl_micropython using this command:
python3 make.py esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=ILI9341 INDEV=FT6x36

for a Freenove FNK0104B board.

Then I flashed it:

python3 -m esptool --chip esp32s3 --port /dev/tty.usbmodem14101 -b 460800 --before default-reset --after no-reset write-flash "@flash_args"
esptool --chip esp32s3 --port /dev/tty.usbmodem14101 -b 460800 --before default-reset --after no-reset write-flash --flash-mode dio --flash-freq 80m --flash-size 16MB --erase-all 0x0 bootloader/bootloader.bin 0x10000 micropython.bin 0x8000 partition_table/partition-table.bin
esptool v5.2.0
Connected to ESP32-S3 on /dev/tty.usbmodem14101:
Chip type:          ESP32-S3 (QFN56) (revision v0.2)
Features:           Wi-Fi, BT 5 (LE), Dual Core + LP Core, 240MHz, Embedded PSRAM 8MB (AP_3v3)
Crystal frequency:  40MHz
USB mode:           USB-Serial/JTAG
MAC:                44:1b:f6:ce:5c:b8

Stub flasher running.
Changing baud rate to 460800...
Changed.

Configuring flash size...
Flash memory erased successfully in 9.5 seconds.
Flash parameters set to 0x024f.
SHA digest in image updated.
Wrote 19232 bytes (12490 compressed) at 0x00000000 in 0.3 seconds (565.5 kbit/s).
Hash of data verified.
Wrote 2922496 bytes (1662032 compressed) at 0x00010000 in 18.5 seconds (1265.8 kbit/s).
Hash of data verified.
Wrote 3072 bytes (119 compressed) at 0x00008000 in 0.1 seconds (398.8 kbit/s).
Hash of data verified.

Staying in bootloader.

Then I tried to create and initialize a display:

import lvgl as lv
import lcd_bus
import ili9341
from machine import SPI, Pin
import machine
import network
import task_handler
from umqtt.simple import MQTTClient
import dht
import asyncio
import utime
import ntptime
import neopixel

spi_bus = SPI.Bus(
    host=1,
    mosi=11,
    miso=13,
    sck=10
)

 display_bus = lcd_bus.SPIBus(
    spi_bus=spi_bus,
    dc=14,
    cs=10,
    freq=40000000,
)

display = ili9341.ILI9341(
    data_bus=display_bus,
    display_width=240,
    display_height=320,
    reset_pin=46,
    reset_state=ili9341.STATE_LOW,
    color_space=lv.COLOR_FORMAT.RGB565,
    rgb565_byte_swap=True
)

display.set_power(True)
display.init()

and got this traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "display_driver_framework.py", line 459, in init
ImportError: no module named '_ili9341_init'

What have I done wrong? How can I resolve this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions