This will be a long thread, and portal to all key posts will be linked here.
Goal:
To build a human to machine interface (HMI) with resistive touch for lab and light industrial applications. Resistive touch is chosen to allow the use with gloves and water/oil contamination.
UI apps are created on the go using a custom static (no function calls, etc.) interpreted language.
UI is updated by itself using link mechanism (i.e. if a slider moves, the progress bar moves accordingly) or serial command.
All controllable widgets can send commands over serial for the external host to process.
Hardware:
The HMI module is built around AllWinner F1C100S/F1C200S SoC with 450MHz/600MHz ARM9 core, full LCD interface with 2D acceleration, touch screen controller and more.
An external resistive touch screen is connected to the SoC via parallel RGB666/DE/VSYNC/HSYNC and CLK pins.
An onboard NOR flash is used to store firmware and user resource, loaded via serial port.
Only one port is exposed to the external, that is the serial port. USB is only used in debugging phase.
Software:
No full OS like Linux or AllWinner's Melis is used in this case due to the requirement of instant boot.
XBoot is chosen for its high customizability and MIT license.
To further accelerate boot time, all non essential components are stripped from XBoot.
XBoot is used as a task scheduler and HAL, all UI features are implemented using Littlevgl.
To strip XBoot down to bare minimum, all GUI is removed (Freetype, Cairo, PNG, JPG, SVG, XFS), LUA interpreter is removed.
GUI component of XBoot was initially considered, but due to the lack of convenient C interface (it was written in C, but tailored for working with LUA) and huge size (~2.5MB), it was dumped.
A custom app will be used in place of XBoot's shell and LUA interpreter. This app handles serial communication and widget control.
HAL layer (down to framebuffer level) is kept so that my code will be portable in the long run.
Links:
F1C200S datasheet:
https://linux-sunxi.org/images/1/11/Allwinner_F1C200s_Datasheet_V1.0.pdfF1C200S manual:
https://linux-sunxi.org/images/2/21/Allwinner_F1C200s_User_Manual_V1.0.pdfXBoot:
https://github.com/xboot/xbootDev kit I use:
https://item.taobao.com/item.htm?id=587925184119Dev kit wiki (Chinese):
https://wiki.widora.io/tiny200Another kit (Lichee Pi Nano):
https://wiki.sipeed.com/en/lichee/nano.htmlDocumentation 1 (Chinese):
http://nano.lichee.pro/Documentation 2 (Chinese):
https://whycan.cn/t_449.htmlAmazing forum for F1C200S (Chinese):
https://whycan.cn/f_17.htmlPortals:
Booting a premade firmware:
https://www.eevblog.com/forum/projects/building-an-hmi-based-on-f1c200s-and-xboot/msg2928818/#msg2928818Stripping down XBoot:
https://www.eevblog.com/forum/projects/building-an-hmi-based-on-f1c200s-and-xboot/msg2928898/#msg2928898First hello world running on XBoot:
https://www.eevblog.com/forum/projects/building-an-hmi-based-on-f1c200s-and-xboot/msg2928950/#msg2928950Getting XBoot to use full 64MB of RAM:
https://www.eevblog.com/forum/projects/building-an-hmi-based-on-f1c200s-and-xboot/msg2929262/#msg2929262Customizing boot message:
https://www.eevblog.com/forum/projects/building-an-hmi-based-on-f1c200s-and-xboot/msg2929300/#msg2929300