Author Topic: Building an HMI based on F1C200S and XBoot  (Read 40595 times)

0 Members and 2 Guests are viewing this topic.

Offline blueskullTopic starter

  • Supporter
  • ****
  • !
  • Posts: 367
  • Country: cn
  • BA7LKP
Building an HMI based on F1C200S and XBoot
« on: February 20, 2020, 10:00:03 am »
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.pdf
F1C200S manual: https://linux-sunxi.org/images/2/21/Allwinner_F1C200s_User_Manual_V1.0.pdf
XBoot: https://github.com/xboot/xboot
Dev kit I use: https://item.taobao.com/item.htm?id=587925184119
Dev kit wiki (Chinese): https://wiki.widora.io/tiny200
Another kit (Lichee Pi Nano): https://wiki.sipeed.com/en/lichee/nano.html
Documentation 1 (Chinese): http://nano.lichee.pro/
Documentation 2 (Chinese): https://whycan.cn/t_449.html
Amazing forum for F1C200S (Chinese): https://whycan.cn/f_17.html

Portals:

Booting a premade firmware: https://www.eevblog.com/forum/projects/building-an-hmi-based-on-f1c200s-and-xboot/msg2928818/#msg2928818
Stripping down XBoot: https://www.eevblog.com/forum/projects/building-an-hmi-based-on-f1c200s-and-xboot/msg2928898/#msg2928898
First hello world running on XBoot: https://www.eevblog.com/forum/projects/building-an-hmi-based-on-f1c200s-and-xboot/msg2928950/#msg2928950
Getting XBoot to use full 64MB of RAM: https://www.eevblog.com/forum/projects/building-an-hmi-based-on-f1c200s-and-xboot/msg2929262/#msg2929262
Customizing boot message: https://www.eevblog.com/forum/projects/building-an-hmi-based-on-f1c200s-and-xboot/msg2929300/#msg2929300
« Last Edit: February 20, 2020, 05:42:19 pm by blueskull »
 
The following users thanked this post: coromonadalix, zaboy, Simon_RL

Offline statorworks

  • Newbie
  • Posts: 8
  • Country: us
Re: Building an HMI based on F1C200S and XBoot
« Reply #1 on: May 21, 2020, 07:00:25 pm »
Wow just amazing, you really are into something here!
These SOCs with all that RAM blow the Teensy boards out of the water, I don't know why this hasn't become as popular.

I wan't to make a board for robotics around the F1c200s or even the H2 or H3; you show the right track, great work  :-+ 
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2329
  • Country: 00
Re: Building an HMI based on F1C200S and XBoot
« Reply #2 on: May 22, 2020, 10:21:53 am »
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2329
  • Country: 00
Re: Building an HMI based on F1C200S and XBoot
« Reply #3 on: May 22, 2020, 10:54:57 am »
blueskull

You are in China now right? I guess you left the USA

Are you in the Shenzhen area?

 

Online ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1914
  • Country: ca
Re: Building an HMI based on F1C200S and XBoot
« Reply #4 on: May 22, 2020, 11:52:43 am »
Blueskull you are great! Big thumbs up, which one does support -40 to 85C? also how to write our own drivers, like I2C capacitive touch and a different lcd controller?

Hi3516EV200 seems interesting, any link to data sheet? I only found a 7 page brief one, I want to know if I can get the data to design a PCB for this thing? also what's the pinout and working temp?
« Last Edit: May 22, 2020, 12:07:36 pm by ali_asadzadeh »
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Online ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1914
  • Country: ca
Re: Building an HMI based on F1C200S and XBoot
« Reply #5 on: May 22, 2020, 12:08:37 pm »
Thanks :-+

Hi3516EV200 seems interesting, any link to data sheet? I only found a 7 page brief one, I want to know if I can get the data to design a PCB for this thing? also what's the pinout and working temp?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Online ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1914
  • Country: ca
Re: Building an HMI based on F1C200S and XBoot
« Reply #6 on: May 22, 2020, 12:26:48 pm »
Quote
The only complete manual I can find is in Chinese, hosted on GitHub. The 35MB behemoth.

It says 0~105C junction temp.
Would you please link to that repo ^-^ I can use the chinese datasheet.
Also do you have any video on your F1C200S board, regarding the boot time and some HMI actions.
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Online ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1914
  • Country: ca
Re: Building an HMI based on F1C200S and XBoot
« Reply #7 on: May 23, 2020, 06:13:13 am »
Thanks Blueskull, please take some videos from your board and share >:D
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Online ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1914
  • Country: ca
Re: Building an HMI based on F1C200S and XBoot
« Reply #8 on: May 23, 2020, 06:53:29 am »
Quote
The HMI is as far as I went, and I didn't pursue Hi3516 nor X3.
I meant the f1c200s boot video ^-^
Then we wait for your great news,regarding the rest >:D >:D :-+ :-+
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Online ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1914
  • Country: ca
Re: Building an HMI based on F1C200S and XBoot
« Reply #9 on: May 23, 2020, 09:54:14 am »
Thanks for sharing,
I wonder how you build and compile the code?
Is there any tool for creating the UI (I mean is there any WYSIWYG editor)? also what's your debugger probe? can the code be debugged? How you flash it to the board?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6252
  • Country: ca
Re: Building an HMI based on F1C200S and XBoot
« Reply #10 on: May 23, 2020, 10:45:03 am »
Thanks for sharing,
I wonder how you build and compile the code?
Is there any tool for creating the UI (I mean is there any WYSIWYG editor)? also what's your debugger probe? can the code be debugged? How you flash it to the board?

Same here   im a total noob in programmation,  i use kinda old Dwin  m600 and k600 and k600+    hmi panels at my job, and i must say  even with a gui tool  they are not easy to program and understand until you end up with the TL5 series,  the software matured a lot more but ... all the good stuff is in Chineese   argh

The Stone hmi software is better

Never tried Nextion displays

I hope   there will be some gui software and a good startup guide,  good points from @ali_asadzadeh
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2329
  • Country: 00
 

Offline statorworks

  • Newbie
  • Posts: 8
  • Country: us
Re: Building an HMI based on F1C200S and XBoot
« Reply #12 on: May 23, 2020, 10:36:17 pm »
Put in simple, don't. Those puny ARM9 chips have lower DMIPS/MHz than Cortex M, and they are just good for HMI.
If you listen to me and don't want to waste your time, go for HiSilicon Hi3516EV200 or AllWinner X3.
...Both have DDR RAM copackaged, so routing should be easy. The former has 64MB of RAM inside, the latter has 128MB for now, and 512MB version is on its way.
There are some info here: whycan.cn, you need a translation service, though.

Thanks for your advice Blueskull, I come from the 48Mhz 256K of RAM world, so all of this seems fantastic.
 
This kind of RAM allows to hold audio files and video frames, while still having instant-ON capability. All this for just a few bucks is a perfect improvement to run amusement and vending machines, and even half decent robots.
 

Online ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1914
  • Country: ca
Re: Building an HMI based on F1C200S and XBoot
« Reply #13 on: May 24, 2020, 06:45:50 am »
Quote
You need an ARM gcc (baremetal, I also tried Linux gcc it also works, just don't use version 7.x, version 9.x and older 5.x both work).
Then just hit make. I've included the relative path makefile in the zip.
Thanks,so we use GCC, what about Debugging? do you use GBD? or something else? what about JTAG probe and flashing?
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline insert

  • Newbie
  • Posts: 3
  • Country: ru
Re: Building an HMI based on F1C200S and XBoot
« Reply #14 on: June 08, 2020, 12:41:12 am »
Hi All, I bought TINY200 board 128mb NAND: https://www.yoycart.com/Product/587925184119/

1. Can i use the I2S output in slave mode with 96K S/R + MPD?
2. Where need will change a config for I2S + 24b + pinout parameter?
3. Can i use Phyton 3 inside?
« Last Edit: June 08, 2020, 12:59:28 am by insert »
 

Offline insert

  • Newbie
  • Posts: 3
  • Country: ru
Re: Building an HMI based on F1C200S and XBoot
« Reply #15 on: June 08, 2020, 12:45:25 am »
my idea and project
« Last Edit: June 08, 2020, 12:47:25 am by insert »
 

Offline statorworks

  • Newbie
  • Posts: 8
  • Country: us
Re: Building an HMI based on F1C200S and XBoot
« Reply #16 on: June 16, 2020, 11:01:21 pm »
Always that I read your posts I end up wasting money... |O

Just bought

https://item.taobao.com/item.htm?spm=a230r.1.14.16.426739dbJjpa1b&id=587925184119&ns=1&abbucket=15#detail

Mine is on the way   8) >:D  can't wait to try blueskull's Xboot example.
 

Offline statorworks

  • Newbie
  • Posts: 8
  • Country: us
Re: Building an HMI based on F1C200S and XBoot
« Reply #17 on: August 03, 2020, 11:25:54 pm »
Look at this beauty  8)

 

Offline soFPG

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: de
Re: Building an HMI based on F1C200S and XBoot
« Reply #18 on: August 05, 2020, 11:53:41 am »
Man, designing a board like this and then get it to work with your own software, has to be a unique feeling  :-+
 

Offline Jarrod

  • Contributor
  • Posts: 12
  • Country: us
Re: Building an HMI based on F1C200S and XBoot
« Reply #19 on: April 27, 2021, 03:46:04 am »
Curious if you have used (or were involved with) the zkwse HMI boards.  They look very similar to what you are working with in this thread.  Specifically the Z6s platform here:

https://www.programmersought.com/article/83082469829/

I've hacked on those a little bit.  They seem to run an embedded Android Linux of some type, out of a RAMdisk.  Pretty neat devices.  Would like to learn more but I don't speak or read Chinese and most of their site and docs are in Chinese.

They call their software platform "FlyThings OS" and there is an SDK for building the UI elements that the HMI boots into.
 

Online ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1914
  • Country: ca
Re: Building an HMI based on F1C200S and XBoot
« Reply #20 on: April 27, 2021, 06:16:20 am »
Quote
No, but there are a few similar platforms out there, some are backed by very reputable companies. If you are after a commercial grade HMI, consider AWTK, fully open source with a permissible license, backed up ZLG, one of the oldest Chinese embedded companies.

https://github.com/zlgopen/awtk
The awtk looks promising, do you have or suggest any tutorial on using it with the F1C200S? If I could find the tutorials or the documentation on how to design and debug on F1C200S with awtk, I would definitely switch all of my GUI task to this puppy.
« Last Edit: April 27, 2021, 06:27:01 am by ali_asadzadeh »
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Building an HMI based on F1C200S and XBoot
« Reply #21 on: April 28, 2021, 03:23:32 am »
This project is giving me ideas. I also have that F1C200s chip in stock (bare chip though) and I have a spare 24-bit capacitive touch screen. Maybe I can do something with that? (Although I will want to use Linux and base my project on stock Debian armel, for the UI I want to reimplement Apple iOS SwiftUI framework.)
 

Online ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1914
  • Country: ca
Re: Building an HMI based on F1C200S and XBoot
« Reply #22 on: April 28, 2021, 06:01:54 am »
Quote
This project is giving me ideas. I also have that F1C200s chip in stock (bare chip though) and I have a spare 24-bit capacitive touch screen. Maybe I can do something with that? (Although I will want to use Linux and base my project on stock Debian armel, for the UI I want to reimplement Apple iOS SwiftUI framework.)

If you can make a tutorial for your progress and make it open source, since your are an active Chinese user in here, it would help lot's of folks in here to use that thing :-+
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Jarrod

  • Contributor
  • Posts: 12
  • Country: us
Re: Building an HMI based on F1C200S and XBoot
« Reply #23 on: April 28, 2021, 06:26:56 pm »


If you do not need a fancy GUI builder and prefer a better English documented platform, go with LVGL.

https://github.com/lvgl/lvgl


Thanks I will check out awtk.

I've been watching lvgl for awhile.  I noticed that very recently they have put out their own "official" GUI builder called Edgeline.  Not fully featured yet but looks like a good start.  Edit:  Uh, Edgeline looks suspiciously similar to the AWTK Designer!!

« Last Edit: April 28, 2021, 06:31:24 pm by Jarrod »
 

Offline sivate

  • Newbie
  • Posts: 1
  • Country: za
Re: Building an HMI based on F1C200S and XBoot
« Reply #24 on: November 15, 2021, 10:54:20 am »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf