1. Get the source code https://github.com/mtk-openwrt/u-boot 2. Compilation steps The compilation environment is ubuntu 18.04. For the cross-compilation toolchain, I use the toolchain generated by openwrt compilation and set it to the environment variable, as follows: export PATH=$PATH:/root/mt8976/BPI-R3-OPENWRT-V21.02.3-main/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_musl/bin export STAGING_DIR=/root/mt8976/BPI-R3-OPENWRT-V21.02.3-main/staging_dir 1. Configuration make mt7986a_bpir3_sd_defconfig. It can be seen from the command that the uboot is […]
Tag: mpi
On win10, configure the Rust development environment (using the mingw64 compiler) and idea to configure the Rust plugin
Article directory 1. Preparation before installation 2. Install mingw64 2.1, the choice between the compiler mingw and visual studio 2.2. Download 2.3. Installation 2.4. Configuration 2.5. Test 3. Install Rust 3.1. Download [rustup-init](https://win.rustup.rs/) from Rust’s official website 3.2. Configure the domestic mirror address 3.3. Run rustup-init 3.4. Verification 3.5. Rustup common commands 4. cargo configuration […]
HUE source code compilation and installation
Installation environment and installation package centos7 hue-4.5.0 Node.js 10.6.0 Note: The linux system first creates a hue user, and installs the mysql-5.7 database in the hue user Download the installation package hue-4.5.0 The extraction address of the hue installation package Link: Baidu Netdisk Please enter the extraction code Extraction code: 09fs Download npm Download Node.js […]
Compile and debug ijkplayer based on CMake (ijk0.8.8–ffmpeg4.0)
Recently, I am studying and researching ijkplayer. Its source code is compiled with Android.mk. In order to facilitate development and debugging, the compilation method is now replaced with CMake. You can directly view, jump, and debug ijkplayer source code in Android Studio . See my github for details: A4ijkplayer As long as the source code […]
Description of __attribute__ compilation attribute in embedded C
Perseverance, gold and stone can be carved Article directory foreword Parameter introduction 1. aligned 2. packed 3. at 4. section Summarize Foreword __attribute__ is a major feature mechanism of the GNU C extension, which is used to set function attributes (Function Attribute), variable attributes (Variable Attribute) and type attributes (Type Attribute). __attribute__ is identified by […]
Boost (compiled with MSVC) + using signal slots
Boost (compiled by MSVC), using signal slots. I look at the signal slots of QT every day, and suddenly find that there are signal slots in boost, so I want to try the signal slots of boost, try it out. Boost needs to be compiled first, and then I will use signal slots as demo […]
MacOs uses VS Code to compile and debug C language programs
Referenceblog:Windows/macOSusesVSCodetobuildaC/C++development/Debugenvironment 1.InstallVSCodeonmacOS DownloadVSCodeformacOSfromMicrosoftofficialwebsite. 2.SearchandinstallthefollowingextensionsintheextensionofVSCode C/C++ C/C++ExtensionPack(TheextensionpackagecontainsC/C++,C/C++Themes,CMakeToolsandCMake,whicharealsoinstalledtogether) Chinese(Simplified) CodeRunner(runcode)AfterinstallingCodeRunner,remembertocheck”RunInTerminal”initsextendedsettings CodeLLDB(Debugdebuggingenvironment) 3.Installthecompiler Theclangcompilerisusedhere,firstopenthecommandline/terminal(terminal):searchforterminalonthedesktop,andopenthe”terminal”application. Afteropeningtheterminalapplication,enterclang-vorclang–versiontocheckwhetheryourMachastheclangcompiler.Thefigurebelowshowsthedisplayofclanginstalled.IfclangisnotinstalledontheMac,typeXcode-select–installintheterminalandpressEnter,andclickOKinthepop-upwindow.Suggestion:Afterclanginstallationiscomplete,runclang-v-E-xc++-intheterminalandcopytheboxselectionpath,whichwillbeusefulinconfiguringtheincludepathintheIntelliSenseconfigurationlater. 4.ConfigureVSCodetousethecompilerinmacOSenvironment Createanewfolderonthedesktop(don’tnameitinChinese,remember!),andopenitinVScode. Createanew.cfileinthefolderopenedbyVScode,andthenfollowthestepsshowninthefigure. ClickonExtendedC/C++tomakeextendedsettingsClickIntelliSenseSet”CompilerPath”or”ComplierPath”(onlyChineseandEnglisharedifferent,nodifference).Setitto/Library/Developer/CommandLineTools/usr/bin/clangor/Library/Developer/CommandLineTools/usr/bin/clang++Thenset”IntelliSenseMode”or”IntelliSenseMode”,selectmacos-clang-arm64(dependingonthemodelandchip,ifitisApplesilicon,selectarm/arm64). Suggestion:IncludepathsettingsforVSCodeIntelIiSence Continuetosettheincludepath/IncludePath,andincludeseveralpathsthatyoujustranclang-v-E-xc++-intheterminal. 5.ConfigureDebugenvironment WriteasimplecodeintheClanguagefilejustnoworusethefollowingcodedirectly: #include<stdio.h> intmain() { for(inti=0;i<4;i++) { printf(“Hello,World!\\ “); } return0; } Putabreakpointbeforethelineofafunction,clicktheoptionbuttonnexttoRun,andselectDebugC/C++FileConfigureasshownbelow.A.vscodefolderwillbegeneratedundertheopenedfolder,andtask.jsonwillbeautomaticallygeneratedinit.Thecontentoftask.jsonisasfollows: { “tasks”:[ { “type”:”cppbuild”, “label”:”C/C++:clanggeneratesactivefiles”, “command”:”/usr/bin/clang”, “args”:[ “-fcolor-diagnostics”, “-fansi-escape-codes”, “-g”, “${file}”, “-o”, “${fileDirname}/${fileBasenameNoExtension}” ], “options”:{ “cwd”:”${fileDirname}” }, “problemMatcher”:[ “$gcc” ], “group”:{ “kind”:”build”, “isDefault”:true }, […]
gcc conditional compilation, structure and memory management
Suffixes supported by gcc .c C original program .C/.cc/.cxx C++ original program .m Objective-C original program .i preprocessed original C program .ii Preprocessed C++ original program .s/.S Assembly language original program .h preprocessing file (header file) .o object file .a/.so Compiled library files Basic usage and options of GCC The most basic usage of Gcc […]
gcc compiler and makefile
1. From source code to executable program There is a test.c file with the following content: $ cat test.c #include <stdio.h> #define N 10 int main() { // This is a comment, after preprocessing, you can’t see it printf(“N = %d\ “, N); printf(“hello world\ “); return 0; } From the source file to the […]
Android 8.1 source code compilation and magic modification test
1. Pre-work Install VMware and Ubuntu18.4 image https://blog.csdn.net/weixin_43290551/article/details/125954709 Solve cannot copy and paste https://blog.csdn.net/qq_41940277/article/details/122610916 vscode installation https://vscode.cdn.azure.cn/stable/5e805b79fcb6ba4c2d23712967df89a089da575b/code_1.76.1-1678294265_amd64.deb sudo dpkg -i file This command is enough sudo snap install code dpkg: error: dpkg frontend is already locked by another process sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/dpkg/lock 2. Install the compilation environment 1. Install dependency packages (can […]