2177 views|8 replies

5

Posts

0

Resources
The OP
 

[Chuanglong TLT3-EVM Development Board Review] From Development Board to PLC [Copy link]

 This post was last edited by 33 on 2022-10-25 13:54

My colleague called me to test a development board. Reviewing is his favorite activity. Geeks love reviewing! This time, due to public factors, he asked me to help test it.

First of all, I would like to thank Chuanglong and EEWorld for providing the testing opportunity. I would also like to thank Chuanglong for the resources and help provided by the manufacturer and technology. I also hope that my confusion and solution can help other developers who use this board to avoid detours. Thanks again to EEWorld for supporting this platform ecosystem. I have been in it for many years, lurking for a long time, and never posting. If there is anything wrong with this post, I hope everyone will forgive me. (I wrote a document first, and then I realized that I needed to post it. If the pictures in it are not clear, please tell me)

1. Introduction

This is the first time I have come into contact with a Chuanglong board. The workmanship is good, the interfaces are also complete, and the documentation is sufficient after reading it in the past few days. The technical support response is very timely. I didn't want to do an unboxing review at first, but my colleague said that as an industrial board, it is still feasible to compare it with the industrial-grade boards we have developed and used in the past. I am depressed. I don't have any test instruments, so how can I evaluate it! If not, I can add an unboxing review later. This development board was received in mid-October. Because the relevant development materials downloaded through Baidu Cloud are relatively large, the entire board test will start in the next few days. During the testing of these two posts, I only used the development board and power supply.

First of all, I am no longer in the age where hardware performance is king. I judge the quality of a development board based on the following criteria:

  1. Development platform is easy to build
  2. Library support and compiler compatibility
  3. Technical support attitude, level and response time

Other factors such as the number of IOs and the number of buses supported are only considered in specific applications. For example, this time we transplanted a PLC+AI video integration thing, and IO is not needed. If the manufacturer promotes that the development board serial port has characteristics, it is a shocking technical point. For example, for various industrial EMC tests, we can only rely on the manufacturer's test report, so my task is to determine whether this board can be easily used for embedded development, or to help others reduce the time to build the development environment through my tests. If there is enough time, look at the compatibility of the overall development environment when transplanting third-party libraries or PLC development.

2. Development goals

I don't know how long I can keep this board, but I still listed a development detail as the evaluation process of the entire board. The ultimate goal of the entire evaluation is to complete the transplantation and operation of a PLC, as long as the entire controller is running. The problems that may need to be solved include controller development, IO development, i2c or spi, network development (redundancy is not done), and human-machine interface on the device side. If the hmi part is counted, all the interfaces of this TLT3-EVM should be used. I will try to complete the evaluation report as the development progresses, and I will do my best to complete this development evaluation. If the equipment is sufficient and the manufacturer allows, destructive testing can also be tried (dog head).

3. Product Introduction

In this part, I copied the evaluation version specification book, mainly to make it easier for everyone to know the specification parameters.

Chuanglong Technology TLT3-EVM is a 4-core ARM Cortex-A7 domestic industrial evaluation board based on Allwinner Technology T3 processor design. The main frequency of each core is up to 1.2GHz. It consists of a core board and an evaluation baseboard. All components of the core board, such as CPU, ROM, RAM, power supply, crystal oscillator, etc., adopt domestic industrial-grade solutions, with a localization rate of 100%. At the same time, most components of the evaluation baseboard also adopt domestic industrial-grade solutions. The core board has been verified by professional PCB Layout and high and low temperature tests, and is stable and reliable, which can meet various industrial application environments.

The evaluation board has rich interface resources, including dual-channel network ports, dual-channel CAN, dual-channel USB, dual-channel RS485 and other communication interfaces, onboard Bluetooth, WIFI, 4G (optional) modules, and MIPI LCD, LVDS LCD, TFT LCD, CVBS OUT, CAMERA, LINE IN, H/P OUT and other audio and video multimedia interfaces. It supports dual-screen display, Mali400 MP2 GPU, 1080P@45fps H.264 video hardware codec, and SATA large-capacity storage interface, which is convenient for users to quickly conduct product solution evaluation and technical pre-research.

Figure TLT3-EVM board

4. Objectives of this section

  1. Development environment construction
  2. Use the latest Ubuntu to see if you can build a development environment
  3. Using QT to build a remote debugging environment

5. Check Linux version

Use cat /etc/issue to view the following information, which should be Allwinner's own Linux version.

6. Development environment setup (Ubuntu 18 )

I first applied for a virtual machine from the official technical support, and compiled and ran it directly according to the process in the official Linux application development manual. The compiler was already available. In the end, I chose to build the development environment manually.

Build a virtual machine and unzip the SDK

  1. First download an ubuntu, here we use 18.04.6, download address https://releases.ubuntu.com/18.04/ubuntu-18.04.6-desktop-amd64.iso
  2. The operation of installing Ubuntu in VMware is not listed here.
  3. Development environment installation: (the username used here is test3)
  4. Establish virtual machine sharing to share installation file packages. These file packages are on a CD or network disk. I use a USB flash drive to mount them. It is more convenient to use a USB flash drive in a virtual machine and no configuration is required.

In the Chuanglong data disk, TLT3-EVM_V1.4\4-Software Data\Linux\LinuxSDK contains the SDK files we need below. You can copy them to the virtual machine's /home/test3/T3 directory via a USB flash drive.

Enter the command as follows:

mkdir /home/test3/T3
tar -zxvf LinuxSDK_14_24_15_16.tar.gz -C /home/test3/T3

Wait for a while, and after the decompression is complete, you can see the contents of the decompressed package in /home/test/T3

Installing Development Tools

Run install-tools.sh in the T3 directory and press Enter when you need to make a selection.


Here we will install the environment required by the SDK. Below are the steps to actually configure the development environment.

Configure the compilation environment

Run ./build.sh config in the lichee directory. Here I choose HDMI as the video output.

test3@ubuntu:~/T3/lichee$ ./build.sh config
Welcome to mkscript setup progress
All available chips:
   0. sun8iw11p1
Choice: 0
All available platforms:
   0. linux
Choice: 0
All available kernel:
   0. linux-3.10
Choice: 0
All available boards:
   0. t3-mp1
   1. t3-p1
   2. t3-p2
   3. t3-p3
   4. tlt3_a40i-evm
Choice: 4
All available rootfs:
  0. buildroot 
  1. buildroot-201611 
  2. debian_fs 
Choice: 1
select buildroot-201611
All available float:
  0. gnueabi 
  1. gnueabihf 
Choice: 1
select gnueabihf
All available qt version:
  0. 5.9.0 
  1. 5.9.7 
Choice: 0
select 5.9.0
All available output configs:
   0. hdmi
   1. vga
   2. lvds_lcd
   3. mipi_lcd
   4. tft_lcd
Choice: 0
All available output configs:
   0. t3
   1. a40i
Choice: 0
create misc_config gnueabihf
test3@ubuntu:~/T3/lichee$ 

The input is 0, 0, 0, 4, 1, 1, 0, 0, 0,

Configure compilation environment 2——Compile Uboot

In the u-boot-2015.07 directory, clean the directory and reconfigure the SPL compilation options

test3@ubuntu:~/T3/lichee$ cd brandy/u-boot-2014.07/
test3@ubuntu:~/T3/lichee/brandy/u-boot-2014.07$ make distclean
test3@ubuntu:~/T3/lichee/brandy/u-boot-2014.07$ make sun8iw11p1_config
Configuring for sun8iw11p1 - Board: sun8iw11p1, Options: SUN8IW11P1

Then execute make spl to compile

After the compilation is completed, the SPL image file "tools/pack/chips/sun8iw11p1/bin/boot0_sdcard_sun8iw11p1.bin" is generated. This file needs to be converted to .fex format before use. (This sentence is copied from the material. The current work has not yet reached the stage of burning the card and running)

Boot compilation, run make -j8 in the u-boot-2014.07 directory to start uboot compilation. After the compilation is completed, the U-Boot image file "tools/pack/chips/sun8iw11p1/bin/u-boot-sun8iw11p1.bin" is generated. This file needs to be converted to .fex format before use

make -j8

Compile the SDK and execute the following command

cd ../../linux-3.10/
make distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun8iw11p1smp_defconfig

Execute the following command to configure kernel options. Compile and configure the kernel according to the "arch/arm/configs/sun8iw11p1smp_defconfig" file, and save the configuration information to the .config file in the current directory.

If you need to configure a real-time kernel, refer to the manufacturer's manual - Linux system manual (page P16, the method is the same as for Raspberry Pi)

Execute the following command to configure the system environment

cd ../buildroot-201611/ 
make clean 
make sun8iw11p1_hf_defconfig

Configuring Kernel Options

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-sun8iw11p1smp_defconfig

Enter the lichee directory and execute the following command to compile the Linux kernel, kernel modules, device tree files and buildroot file system in one click. The current command will not compile Qt. The compiled buildroot file system image is relatively simple and does not support Qt functions.

cd .. 
./build.sh

The compilation time depends on the CPU and hard disk speed. If you use an old machine, it may take two hours. This step is to generate the Linux kernel, kernel modules, device tree files and buildroot file system image files. The image files need to be converted to .fex format before use.


Finally, check that the boot.img file is generated in the out/sun8iw11p1/linux/common directory

The directory is in linux-3.10/output/lib/modules/3.10.65-rt69/

File linux-3.10/arch/arm/boot/dts/tlt3_a40i-evm.dtb

File out/sun8iw11p1/linux/common/rootfs.ext4


At this point, you can start developing console programs.

We run the example led_flase/src in the Dmo directory

CC=/home/tronlong/T3/lichee/out/sun8iw11p1/linux/common/buildroot/host/usr/bin/arm-linux-gnueabihf-gcc make

After the compilation is complete, we use scp led_flash root@192.168.99.98:/root/ to send the compilation results to the root directory of the development version.

scp led_flash root@192.168.99.98:/root/


Use ssh root@192.168.99.98 to log in to the development board. In the root directory, use chmod +x led_flash to add permissions to the file. Use led_flash -n 1 or led_flash -n 2 to see the lights on the development board flashing.

chmod  +x led_flash    
led_flash -n 1

This part is to build the development environment in test goal 1 according to the instructions. So far, there are no problems. If there are any problems, you can run it again with sudo.

7. Setting up the development environment (Ubuntu22 & Debian sid)

In the latest version of Ubuntu 22, build it according to the above sequence. When compiling the SDK, an error message is prompted. It should be because the version is too low. The specific adaptation may require manufacturer support. Debian also has a similar problem.

I may try the effect in wsl later.

★ During the whole process, if there are any compilation problems, you can run it again under sudo to see if the result can be completed successfully.

image.png (3.82 KB, downloads: 0)

image.png
This post is from Domestic Chip Exchange

Latest reply

Where did the original poster's PLC go? Do you plan to develop your own or port that company's? There seem to be several runtimes for Linux, and some are made in China. Thank you for finishing the post.   Details Published on 2022-10-26 14:08

赞赏

1

查看全部赞赏

 
 

5

Posts

0

Resources
2
 
This post was last edited by 33 on 2022-10-25 03:15

8. Configure QT remote debugging

We have already used the command line to compile the program, but that does not provide any useful information. Now we configure QT Creator to allow remote debugging. Before configuration, it is best to use ssh root@192.168.99.98 to log in to the development board for subsequent configuration.

To compile QT support, run the following command in the lichee directory under the T3 directory

./comp_qtLib-590_only.sh

After the compilation is complete, start configuring the QT environment

  1. Modify the project configuration. The location is in QT Creator software Tools - Select - Build and Run - Debuggers - Add. According to the content in the picture, the path needs to be changed to your own local machine .
    Path is filled in /home/test3/T3/lichee/out/sun8iw11p1/linux/common/buildroot/host/usr/bin/arm-linux-gnueabihf-gdb
  2. In the compiler, you need to manually add the compilation options of C++ and C.
    C++ compilation path: /home/test3/T3/lichee/out/sun8iw11p1/linux/common/buildroot/host/usr/bin/arm-linux-gnueabihf-g++


    C compilation path: /home/test3/T3/lichee/out/sun8iw11p1/linux/common/buildroot/host/usr/bin/arm-linux-gnueabihf-gcc

  3. 配置qmake

  4. Deploy cmake
  5. Configuring the connection of the development board is to configure the address of the remote development board. My development board IP is 192.168.99.98

    Click Test in the above picture, and you can see the following screen, which proves that the development machine can connect to the development board
  6. Build kit
    sysroot path: /home/test3/T3/lichee/out/sun8iw11p1/linux/common/buildroot/host/usr/arm-buildroot-linux-gnueabihf/sysroot (please configure according to your own situation)

After completing the above work, the development environment under QT is established.

Next, we will create a C++ program in QT Creator, using qmake by default.


Here you need to add the following two lines of code in the .pro file

target.path=/root
INSTALLS+=target

After completing the above work, you can start development and debugging. Here are the files in the development board directory after the build is completed, where App1 is the created program.

The following picture is a screenshot of single-step debugging on the development PC.

I used the LED code in the Demo for debugging, which is very convenient and easy to use, and the speed is also very fast.

At this point, the compilation environment has been basically set up, and QT's remote debugging has also been completed.

This time, the development environment installation test was installed multiple times on different Debian and Ubuntu systems. The test results showed that there was no problem with the officially recommended Ubuntu 18. We also tested the use of Qt Creator for remote development and debugging via Ethernet. This method is the best and most convenient development method for embedded development.

The problem here is still the lack of support for multiple Linux versions. For example, my work machine is Debian, and I occasionally use Manjora. Debian is always under Sid, so the installation compatibility issue has an impact. At the same time, I can understand that the manufacturer's support for Ubuntu 18 LTE is due to its long-term official support.

Regarding the PLC transplantation development and compilation work, we will try to compile it next to see the effect of the overall development environment compatibility.

This post is from Domestic Chip Exchange
 
 
 

6062

Posts

4

Resources
3
 

Thanks for sharing!

This post is from Domestic Chip Exchange
 
 
 

2w

Posts

74

Resources
4
 

Such a good ability of language expression, it is a waste if the author keeps lurking all the time, let's discuss more.

I would also like to thank your colleague for his seriousness and responsibility. He accepted the assessment and worked hard to complete it despite encountering difficulties. Thank you.

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
Personal signature

加油!在电子行业默默贡献自己的力量!:)

 
 
 

5

Posts

0

Resources
5
 
This post was last edited by 33 on 2022-10-28 03:28

I have nothing to do at night, so I continue to update the post. I set a few goals to complete the work I finished last time.

  1. I used wsl to configure the development environment, but the result was a mess. There were too many knots to open when installing wsl2 and vmware. I gave up after trying several times.
  2. I used the Windows version of the arm development tool chain, but I forgot the directory where the development logs were stored.

So this time continue to compile the relevant libraries to see if it goes smoothly. First, transplant the following commonly used library lua to see the effect.

9. Compile Lua

Create a new library in QT

Cancel QTCore, and all that’s left is to confirm it along the way.

After selecting the project, add "Existing File" and select the lua file to add. The operation is as follows

Among them, lua.che luac.c need to be removed. After adding, select release to generate.

In /home/test3/MySource/build-lua-T3-Release, you can see the file list, among which liblua.so.1.0.0 is the file we need to use

10. Run lua related examples

Create a new C++ project in QT Creator, name it testLuaApp, and choose the path according to your own directory.

Press Enter all the way and select T3 for the compilation environment.

Enter the command cp liblua.so.1.0.0 ../testLuaApp/liblua.so under build-lua-T3-Release

Copy the library file into the working directory.

Select the project name, right-click and select "Add Library".

Select external library

The information is as shown above.

Finally, the content of testLuaApp.pro is as follows

TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp

unix:!macx: LIBS += -L$$PWD/./ -llua

INCLUDEPATH += $$PWD/.
DEPENDPATH += $$PWD/.

target.path=/root
INSTALLS+=target

Copy the four files lauxlib.h, lua.h, luaconf.h, and lualib.h in the lua directory to the current directory.

The contents of main.cpp are as follows

#include <iostream>
extern "C"{
    #include "lua.h"
    #include "lualib.h"
    #include "lauxlib.h"
}
using namespace std;

char *code = "for i=0, 3 do print('Hello, world!@lua') end";

int main()
{
    cout << "Hello World@main!" << endl;
    lua_State  *s=luaL_newstate();
    luaL_openlibs(s);        //打开Lua附加库
    luaL_dostring(s, code);  //执行字符串中的源代码
    lua_close(s);            //关闭虚拟机
    return 0;
}

Just rebuild and the run file will be generated.

At this time, you need to use scp liblua.so root@192.168.99.98:/root/liblua.so.1 to synchronize the library to the development board.

At this time, we can use debug to track the program running. The running results are as follows

This post is from Domestic Chip Exchange

Comments

Is this reply from the original poster to occupy the post first? Or is there something wrong?  Details Published on 2022-10-26 10:11
 
 
 

1w

Posts

204

Resources
6
 

Is this reply from the original poster to occupy the post first? Or is there something wrong?

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle

Comments

First occupy the building  Details Published on 2022-10-26 23:04
Personal signature

玩板看这里:

http://en.eeworld.com/bbs/elecplay.html

EEWorld测评频道众多好板等你来玩,还可以来频道许愿树许愿说说你想要玩的板子,我们都在努力为大家实现!

 
 
 

2865

Posts

4

Resources
7
 

Where did the original poster's PLC go? Do you plan to develop your own or port that company's? There seem to be several runtimes for Linux, and some are made in China. Thank you for finishing the post.

This post is from Domestic Chip Exchange
 
 
 

5

Posts

0

Resources
8
 
This post was last edited by 33 on 2022-10-26 23:07

1. There was a mistake here. I seem to have sent it to the wrong place. I confirmed with the manufacturer. Due to public factors, I plan to send it here and my colleagues will synchronize it.

2. I did this test simultaneously because I had many projects to develop. I didn't want to write spam posts, so naturally the workload increased.

3. The placeholder is because I wrote a lot of content, but later I deleted it when I found problems. I will supplement it later.

4. PLC migration I am considering which one to choose. As a board test, there is no need to make it too complicated. We have our own PLC kernel (4 versions: C/C++/Python/go), and we have basically done all the open source kernels. So we will decide which one to choose later. If you have any suggestions, please leave me a message directly.

This post is from Domestic Chip Exchange
 
 
 

5

Posts

0

Resources
9
 
This post was last edited by 33 on 2022-10-28 15:36
okhxyyo posted on 2022-10-26 10:11 Is this reply by the original poster meant to occupy the post first? Or is there any problem?

First occupy the building

I read some reviews these days and found that what I wrote was different from others. Everyone else focused on hardware, displaying the functions of each module, and just needed the marquee and the algorithm to run. The workload I required was a bit heavy, and I struggled for a while and even wanted to return the board. This job was a bit too much.

Later I figured it out

For evaluation, for example, for a personal PC, you can use evaluation software to calculate the scores of each component, and the same is true for mobile phones. However, for a development board, even if the scores of each component are very high, it does not seem to be very important to developers, because the core components are fast enough and the rest can be replaced. So what I care about most is how to control each component with my code as a developer, which requires the support of code, drivers, projects and technology.

Then the direction of my evaluation should be what I care about most. Of course, I can't represent everyone. What I care about is whether I can use this board to make what I want quickly, safely, conveniently and stably. Then this evaluation should eventually tell everyone whether it is or not, which I think is the basic requirement for a development board evaluation. Only after this evaluation can we evaluate the stability of each component of the system and finally obtain the basic stability information of this development board.

If my work can help someone save a week or more in selecting a development board, my work is meaningful.

11. Unboxing and Review

Supplement previous tasks

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list