[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:
- Development platform is easy to build
- Library support and compiler compatibility
- 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
- Development environment construction
- Use the latest Ubuntu to see if you can build a development environment
- 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
- 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
- The operation of installing Ubuntu in VMware is not listed here.
- Development environment installation: (the username used here is test3)
- 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.
|