Computador de placa única para programador embutido

Este tutorial será útil para programadores que mudaram de avr ou stm32 para computadores de placa única executando o Ubuntu. Depende de você decidir qual distribuição Linux usar, mas o Ubuntu é a distribuição mais amigável.





Introdução

Então, ontem você programou em um microcontrolador UART, GPIO e nada pressagiava problemas, mas o cliente também queria um display de 20 "com tela sensível ao toque ... E agora você está considerando opções para computadores de placa única (SBC). Há muitos Vou compartilhar minha amarga experiência que estava procurando uma opção mais barata e minha escolha foi Orange Pi.





Primeiro, o modelo PC PLUS. Para isso existe uma montagem do Armbian com um SO novo, ao contrário do site do fabricante, onde será oferecido o Ubuntu 16. Mas azar, com o Armbian OrangePi PC PLUS não desliga. O OrangePi PC PLUS grava sistema interrompido no final, porque o coprocessador AR100 com códigos-fonte fechados, que não estavam incluídos no Armbian, é o responsável pelo desligamento . Você pode obter a imagem do Ubuntu no site do fabricante. São várias imagens, já tentei de tudo, só uma realmente desliga a placa única. Qual é a atitude do xunlong em relação ao usuário, que ele posta firmware, onde sua ideia não pode ser desligada ?! Também no PC PLUS havia dificuldades intransponíveis com a conexão da tela 4: 3.





Em seguida, experimentei o OrangePi 4G. Claro que quero ter controle sobre o sistema, então o Android não é adequado para mim. No entanto, no Ubuntu no OrangePi 4G nada funciona, exceto a CPU. Sem drivers ... Tudo funciona para Android exceto HDMI, xunlong conseguiu fazer HDMI, que é incompatível com a maioria dos monitores (é impossível saber de antemão se o seu monitor será compatível com OrangePi 4g).





OrangePi 4B. , Orange Pi 4. SBC 4B ( pcb v1.4). Armbian SBC . , Ubuntu 18 ( xunlong). Ubuntu 18 CONFIG-ERROR) dhd_conf_set_intiovar : txbf setting failed -23 ...





SBC. GPU MALI, . MALI, - DRI2: failed to authenticate .





SBC STM32MP157C-DK2 , MALI, .





OrangePi 4B. Ubuntu 18 Ubuntu 20.04 . RK3399 ?





. :





  • gcc -





  • g++ - ++





  • gcc --version g++ --version





  • g++ - , g++-9 g++-10, , g++





gcc g++ , :





sudo ln -s g++-10 /usr/bin/g++







g++ 10 . gcc . Linux: , /usr/bin, . , , . ls.





, SBC - ++. , SBC. , Qt. Qt - , , , : GUI, com port, ethernet, 3D, , xml ...





Ubuntu . - , , . Ubuntu , , Ubuntu .





, Qt . SBC SBC. , , , OrangePi 4B.





Qt - . , Qt , . IDE Qt Creator Qt , x86_64 ( AArch64) Qt . , Qt , . , Qt , qmake qmake .





Qt

Qt 5.15 . . , GUI, com port, . C++20, . , ( std) .





Ubuntu out-of-source build. ! , ext4, . , QtFromGit, . build ( ) build_artifacts , qmake, . QtFromGit Qt:





git clone git://code.qt.io/qt/qt5 qt5 && cd qt5 && git checkout 5.15 && cd qt5





perl init-repository --module-subset=default,qtcharts,qtserialport,-qtactiveqt,-qtcanvas3d,-qtdocgallery,-qtfeedback,-qtserialbus,-qtconnectivity,-qtdeclarative,-qtquickcontrols2,-qtsvg,-qtquickcontrols,-qtwebengine,-qtwayland,-qtandroidextras,-qtdoc,-qtgraphicaleffects,-qtqa,-qttranslations,-qtvirtualkeyboard,-qtquicktimeline,-qtquick3d,-qtrepotools,-qttools,-qtshadertools,-qtimageformats,-qtnetworkauth,-qtwebsockets,-qt5compat,-qt3d,-qtsensors,-qtquicktimeline,-qtmultimedia,-qtdatavis3d,-qtscript,-qtgamepad,-qtlottie,-qtmacextras,-qtremoteobjects,-qtlocation,-qtspeech,-qtwebchannel,-qtwebglplugin,-qtwebview,-qtwinextras,-qtpurchasing,-testsuites,-qtxmlpatterns





. X11:





cd ../build && ../qt5/configure -release -static -opensource -make libs -nomake examples -nomake tests -confirm-license -no-pch -no-xcb -no-xcb-xlib -no-gtk -skip webengine -skip qtwayland -skip qtdoc -skip qtgraphicaleffects -skip qtqa -skip qttranslations -skip qtvirtualkeyboard -skip qtquicktimeline -skip qtquick3d -skip qt3d -skip qtrepotools -skip qttools -skip qtimageformats -skip qtnetworkauth -skip qtwebsockets -skip qtactiveqt -skip qtmacextras -skip winextras -skip qtmultimedia -skip qtgamepad -skip qtserialbus -skip qtspeech -skip qtsensors -skip qtcharts -skip qtlocation -opengl es2 -qpa eglfs -no-ssl -c++std c++2a -prefix ../build_artifacts





. :





export QT_QPA_EGLFS_INTEGRATION=eglfs_kms





export QT_DEBUG_PLUGINS=1





cd ../build && ../qt5/configure -release -static -opensource -make libs -nomake examples -nomake tests -confirm-license -no-pch -no-xcb -no-xcb-xlib -no-gtk -skip webengine -skip qtwayland -skip qtdoc -skip qtgraphicaleffects -skip qtqa -skip qttranslations -skip qtvirtualkeyboard -skip qtquicktimeline -skip qtquick3d -skip qt3d -skip qtrepotools -skip qttools -skip qtimageformats -skip qtnetworkauth -skip qtwebsockets -skip qtactiveqt -skip qtmacextras -skip winextras -skip qtmultimedia -skip qtgamepad -skip qtserialbus -skip qtspeech -skip qtsensors -skip qtcharts -skip qtlocation -kms -opengl es2 -qpa eglfs -no-ssl -c++std c++2a -prefix ../build_artifacts









make -j8





make install





! htop. !





Qt qmake , qmake.





sudo ln -s /QtFromGit/buildartifacts/bin/qmake /usr/bin//qmake





qtcharts. QtFromGit build_qtcharts. cd build_qtcharts.





qmake ../qt5/qtcharts/qtcharts.pro INCLUDEPATH+=../qt5/qtcharts/include/QtCharts CONFIG+=release





make -j8





make install





Qt Orange Pi 4B. com port dialout . , make clean, , build. (, Qt - , ), . :





git submodule foreach --recursive "git clean -dfx" && git clean -dfx





. qt5 ( Qt) 325 . ( ) build buildartifacts 293 . Qt. build_artifacts, Qt, 150 . , Qt . . 4 1,8 . Release, -developer-build ( Qt ), 12 + .





Se você está interessado neste tópico, apoie nos comentários! Pretendo dedicar a segunda parte ao piscar do LED.








All Articles