导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页
    1. 主页
    2. ylyamin
    3. 最佳
    Y
    • 资料
    • 关注 0
    • 粉丝 0
    • 我的积分 654
    • 主题 2
    • 帖子 5
    • 最佳 3
    • 群组 0

    ylyamin 发布的最佳帖子

    • RT-Thread on D1H. LCD work, USB in progress.

      Hi all,

      I successfully build and ran RT-Thread (a small embedded OS) on the RISC-V Allwinner D1H SoC.

      Experimenting on ClockworkPi DevTerm R-01 device and Sipeed Lichee RV board.
      Also @jusentari made ClockworkPi uConsole R-01 display work in RTT (experimental parameters, use with caution).

      Intention was to make RT-Thread portable terminal with working display and keyboard.

      I manage to:

      • Create a working LCD MIPI DSI Display driver with frame buffer.
      • Create a working LCD RGB Display driver with frame buffer.
      • Make some progress on a USB keyboard driver.
      • Boot from SD card and communicate via UART
      • Debugging with GDB

      The code is available at: https://github.com/ylyamin/RT-Thread-on-Allwinner-D1H
      If you enjoy brainteaser and some low-level stuff, you’re welcome.

      Ready images for SD card:

      • DevTerm R01: sd_image_devterm.img
      • uConsole R01: sd_image_uconsole.img (experimental display parameters, use with caution)
      • Sipeed Lichee RV: sd_image_lichee.img

      Please note: The DevTerm/uConsole battery charging/discharging controller is not yet configured in the driver, so I’m unsure how it affects the battery. I suggest not using the battery with RT-Thread and powering it via USB instead.

      I’m writing a series of articles covering the knowledge and experience I’ve gained:

      • D1-1. Introduction - Motivation and intention.
      • D1-2. Boot process - Existing Allwinner D1H bootloaders best practice in example with booting Linux and RT-Thread, also JTAG and GDB.
      • D1-3. RT-Thread overview and Build - Overview of RT-Thread structure and libraries. Compile RT-Thread for Allwinner D1H platform.
      • D1-4. Makefile and Hardware changes - My repository structure, Makefile and Hardware changes was needed to be done.
      • D1-5. LCD Display driver - Display driver for DevTerm R-01, uConsole R-01 and Sipeed Lichee RV.
      • D1-6. USB Keyboard - USB Keyboard driver for ClockworkPi DevTerm, still not working.

      Finally, I dare to ask for help from the community, please:

      I’m really stuck with the USB driver. It can detect device connections, but communication has not started.<br>
      Perhaps someone would enjoy diving deep into the USB driver to solve this riddle. Ready for issue reports and pull requests.

      Picture of LCD Display test in RT-Thread running on uConsole R-01:

      uconsole_lcd_mipi_work.jpg

      Picture of LCD Display test in RT-Thread running on Devterm R-01:

      devterm_lcd_mipi_work.jpg

      发布在 MR Series
      Y
      ylyamin
    • 回复: RT-Thread on D1H. LCD work, USB in progress.

      @zoenggit Thank you for your enthusiasm and support !

      发布在 MR Series
      Y
      ylyamin
    • R-01 library for small OS

      Hi all,

      I created bare-metal library for R-01 (for Allwinner D1H RISC-V SOC).
      Tested in ClockworkPi DevTerm R-01
      Everything actually is based on @robots allwinner_t113 and @ua1arn hftrx projects, these guys are genius.

      Is minimal low-level library could be used to run own OS, or Doom or whatever.

      Now is have:

      • Bootloader, could run from SD card.
      • USB keyboard working well
      • TWI (I2C) supported AXP228 Power management chip for Display backlight and USB power.
      • UART, GPIO

      To run need configure UART adapter to 115200 baud rate.
      Insert flashed SD card to device should see output like this:

      [INF]:  \ | /
      [INF]:  - Allwinner D1 HAL [ver: 0.0.1-5-gd69c9f1]
      [INF]:  / | \
      [INF]:  SoC: D1H
      [INF]:  Platform: ClockworkPi Devterm R-01
      [DBG]:irq_init
      [DBG]:twi_init
      

      With Display I have a big problem is work with external board with LCD RGB(ST7701S SPI) but with ClockworkPi LCD MIPI not work.
      My dream to have just one C file to init LCD and framebuffer, but LCD driver stack is very complicated.

      I found drivers in Linux and RT-Thread OS but is very big and I could not extract from it what should be set.
      Tried configure registers the same as in Linux but is still not work.

      Perhaps someone would enjoy diving deep into the LCD world to solve this riddle. Ready for issue reports and pull requests!

      Also I accumulated many knowledge and write articles when run RT-Thread OS in DevTerm/uConsole R-01, in this OS LCD and USB work well.

      发布在 MR Series
      Y
      ylyamin
    • 1 / 1