diff --git a/docs/source/cross_compile/config_dev_system.rst b/docs/source/cross_compile/config_dev_system.rst index 68274fd..7cb8dc8 100644 --- a/docs/source/cross_compile/config_dev_system.rst +++ b/docs/source/cross_compile/config_dev_system.rst @@ -110,13 +110,23 @@ Installing Extensions Installing the C/C++ Cross Compile Toolchains --------------------------------------------- -GNU C & C++ Compile Tools x64 GCC version -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GNU C & C++ Compile Tools GCC versions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. csv-table:: GCC Versions - :file: media/toolchain/gcc_versions.csv +.. list-table:: :widths: 50 50 - :header-rows: 1 + + * - **x64 GCC version** + - **ARM GCC version** + * - .. csv-table:: GCC Versions + :file: media/toolchain/gcc_versions.csv + :widths: 50 50 + :header-rows: 1 + + - .. csv-table:: GCC Versions + :file: media/toolchain/gcc_arm_versions.csv + :widths: 50 50 + :header-rows: 1 Option 1: Extract the Toolchain ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -124,6 +134,8 @@ Option 1: Extract the Toolchain .. note:: This option is only available for GNU C & C++ Compilers x64, versions *2014-2016*, *2017*, and *2018-2019*. + This option is only available for GNU C & C++ Compile Tools for ARMv7 *2014-2016*, *2017*, and *2018-2019*. + For the toolchain installation, NI recommends using the same directory structure for each version of the tools installed on a system. This is flexible as long as the cross compile configuration in the IDE points to @@ -172,8 +184,7 @@ Windows may be dialogs prompting the replacement of files or warnings. The warnings can be safely ignored. -4. | If using x64 toolchain versions 2023Q1 and later, follow these steps - to setup **PATH**. +4. | Follow these steps to setup **PATH**. a. | Press **Start+R** to open the **Run** window, then type in *sysdm.cpl* and hit **OK.** This will launch the **System @@ -241,19 +252,21 @@ Linux # or source ~/.bashrc -Option 2: Install the Toolchain (x64 Only) +Option 2: Install the Toolchain ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. note:: This option is only available for GNU C & C++ Compilers x64, versions **2023 Q1** and later. + This option is only available for GNU C & C++ Compilers ARMv7, versions **2026 Q3** and later + Windows ^^^^^^^ 1. | Download the **NILRT CrossCompile Toolchain** installer from ni.com/downloads. Refer to **Installing, Updating, Repairing, and Removing NI Software** using Package Manager on ni.com/docs. .. note:: - The **NILRT CrossCompile Toolchain** will install to *C:\\build\\\\x64*. + The **NILRT CrossCompile Toolchain** will install to *C:\\build\\\\x64* and *C:\\build\\\\armv7-a*. Linux ^^^^^ @@ -268,6 +281,12 @@ Linux sudo zypper install ni-linuxrt-toolchain sudo yum install ni-linuxrt-toolchain + .. code:: bash + + sudo apt-get install ni-linuxrt-toolchain-arm + sudo zypper install ni-linuxrt-toolchain-arm + sudo yum install ni-linuxrt-toolchain-arm + 3. | Update the PATH environment variable to include the toolchain path, by modifying *~/.profile* or *~/.bashrc*, adding: diff --git a/docs/source/cross_compile/config_vs_code.rst b/docs/source/cross_compile/config_vs_code.rst index c7ae7ab..54c615f 100644 --- a/docs/source/cross_compile/config_vs_code.rst +++ b/docs/source/cross_compile/config_vs_code.rst @@ -278,26 +278,29 @@ includes and other necessary resources. .. code:: json { - "env": { - "compilerSysroots": "C:/build//arm/sysroots/" - }, - "configurations": [ - { + "env": { + "compilerSysroots": "C:/build//arm/sysroots/" + }, + "configurations": [ + { "name": "NI Linux Real-Time ARMv7", "compilerPath": "${compilerSysroots}/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/arm-nilrt-linux-gnueabi-gcc.exe", "compilerArgs": [ - "--sysroot=${compilerSysroots}/cortexa9-vfpv3-nilrt-linuxgnueabi/" + "--sysroot=${compilerSysroots}/cortexa9-vfpv3-nilrt-linuxgnueabi/" ], "includePath": [ - "${workspaceFolder}/", - "${compilerSysroots}/cortexa9-vfpv3-nilrt-linux-gnueabi/usr/include/" + "${workspaceFolder}/", + "${compilerSysroots}/cortexa9-vfpv3-nilrt-linux-gnueabi/usr/include/" ], "intelliSenseMode": "gcc-x86" - } - ], - "version": 4 + } + ], + "version": 4 } + .. note:: For toolchain versions 2026Q3 and later, the `compilerPath` is instead `${compilerSysroots}/x86_64-w64-mingw32/usr/bin/arm-nilrt-linux/arm-nilrt-linux-gnueabi-gcc.exe`. + + 5. Save *c_cpp_properties.json*, then close the file in the editor. 6. | Note that the configuration created now shows in the lower-right @@ -390,6 +393,8 @@ debugging `__. ] } + .. note:: For toolchain versions 2026Q3 and later, the `miDebuggerPath` is `C:/build//armv7-a/sysroots/x86_64-w64-mingw32/usr/bin/rm-nilrt-linux-gnueabi/arm-nilrt-linux-gnueabi-gdb.exe`. + 3. Save *launch.json*. Creating a CMake Build Configuration @@ -467,6 +472,8 @@ document. set(toolchainpath C:/build//arm/sysroots) + .. note:: For toolchain versions 2026Q3 and later, the `toolchainpath` is `C:/build//armv7-a/sysroots`. + 4. Next, configure the compilers for both C and C++. CMake will automatically decide which compiler to used based on the files being compiled for a given project. @@ -492,6 +499,8 @@ document. set(CMAKE_C_COMPILER ${toolchainpath}/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linux-gnueabi/armnilrt-linux-gnueabi-gcc.exe) set(CMAKE_CXX_COMPILER ${toolchainpath}/i686-nilrtsdk-mingw32/usr/bin/arm-nilrt-linuxgnueabi/arm-nilrt-linux-gnueabi-g++.exe) + .. note:: For toolchain versions 2026Q3 and later, replace `i686-nilrtsdk-mingw32` with `x86_64-w64-mingw32` + 5. The compiler flags, include directories, and sysroot should all be defined in the script as well. Note that these are the NI recommended compiler flags. Note that the include directories will vary based on diff --git a/docs/source/cross_compile/media/toolchain/gcc_arm_versions.csv b/docs/source/cross_compile/media/toolchain/gcc_arm_versions.csv new file mode 100644 index 0000000..2bf233f --- /dev/null +++ b/docs/source/cross_compile/media/toolchain/gcc_arm_versions.csv @@ -0,0 +1,5 @@ +Toolchain Version,GCC Version +2014-2016,4.7.2 +2017,4.9.2 +2018-2019,6.30 +2026 Q3,13.4.0