Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions docs/source/cross_compile/config_dev_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,32 @@ 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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\\<toolchain version>\\x64*.
The **NILRT CrossCompile Toolchain** will install to *C:\\build\\<toolchain version>\\x64* and *C:\\build\\<toolchain version>\\armv7-a*.

Linux
^^^^^
Expand All @@ -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:

Expand Down
31 changes: 20 additions & 11 deletions docs/source/cross_compile/config_vs_code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,26 +278,29 @@ includes and other necessary resources.
.. code:: json

{
"env": {
"compilerSysroots": "C:/build/<toolchain version>/arm/sysroots/"
},
"configurations": [
{
"env": {
"compilerSysroots": "C:/build/<toolchain version>/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
Expand Down Expand Up @@ -390,6 +393,8 @@ debugging <https://code.visualstudio.com/docs/cpp/launch-json-reference>`__.
]
}

.. note:: For toolchain versions 2026Q3 and later, the `miDebuggerPath` is `C:/build/<toolchain version>/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
Expand Down Expand Up @@ -467,6 +472,8 @@ document.

set(toolchainpath C:/build/<toolchain version>/arm/sysroots)

.. note:: For toolchain versions 2026Q3 and later, the `toolchainpath` is `C:/build/<toolchain version>/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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Loading