NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Feedback Requested: GNU C & C++ Cross Compile Tools Installation

The NI Linux RT team is looking for feedback from those who use the C/C++ cross compile toolchains for programming NI Linux RT targets.

 

We'd like to know:  

  • Are you using the ARM toolchain or the x64 toolchain? 
  • Are you installing the toolchain on Windows, Linux, or RT machines?  
  • Each toolchain is currently provided as a compressed collection of the required files rather than an installer. Do you have feedback on the current installation experience? We'd like to hear what, if any, problems you are facing, and any feedback on the potential new distribution mechanisms under consideration: 
    • Windows: provide the toolchain through an NIPM package. 
    • Linux: provide the GCC cross-compile toolchain in feeds as native packages (IPK, DEB, and RPM) and release along with other NI Linux software. 
  • Is there a different mechanism that you'd prefer instead?

Any additional details about your use case are welcomed as well!

 

Thanks,

 

Kayla Ashbaugh

NI Linux RT Product Manager

0 Kudos
Message 1 of 8
(2,522 Views)

x64 Toolchain on Windows and Linux (Dev machines & CI pipelines, no 906X targets)

 

Zip isn't much of an issue, packages would definitely be nice.

 

Biggest complaint is toolchain config for environments. Would be nice if there were some pre-made toolchain files that could be grabbed by cmake et al instead of manually configuring projects. Additionally some drivers/toolkits groups still hadn't published dev packages (copying daqmx headers from a Windows PC to sysroots feels dirty) last I checked.

~ The wizard formerly known as DerrickB ~
Gradatim Ferociter
Message 2 of 8
(2,502 Views)

Hi Kayla,

 

I've experimented with ARM but expect 90% of use cases to be for x86.

 

I got on ok with the current mechanism. I guess a package will be slightly more conventient though and consistency in things like installation would make having standard configurations for build tools set up.

 

I should add I'm mostly using them as a cross compile tool for Rust. I've not tried this yet but they have a mechanism based on docker images so I suspect next time around all my use cases will be in a docker container 

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 3 of 8
(2,475 Views)

Hi Kayla, thanks for bringing this topic to our attention.

About your questions:

 



99% is x64, ARM only for maintaining old project where HW has not been upgraded yet (cRIO 906x , sbRIO or SOM)

 


  • Are you installing the toolchain on Windows, Linux, or RT machines?   

Most of users have dev machines on Windows, so that is the highest % compared with Linux hosts.

 

  • Each toolchain is currently provided as a compressed collection of the required files rather than an installer. Do you have feedback on the current installation experience? We'd like to hear what, if any, problems you are facing, and any feedback on the potential new distribution mechanisms under consideration: 
    • Windows: provide the toolchain through an NIPM package. 
    • Linux: provide the GCC cross-compile toolchain in feeds as native packages (IPK, DEB, and RPM) and release along with other NI Linux software. 
  • Is there a different mechanism that you'd prefer instead?

This is where the biggest improvement should happen:

  • Move to package
  • Release updated toolchains on every system image or gcc upgrade
  • put a link to the toolchain download page on linuxrt-doc

One final note: I quote IlluminateG request to ship -dev packages for drivers to facilitate cross compilation of apps that call into them.

Fabio M.
NI
Principal Engineer
0 Kudos
Message 4 of 8
(2,461 Views)

@James_McN wrote:

...

I should add I'm mostly using them as a cross compile tool for Rust. I've not tried this yet but they have a mechanism based on docker images so I suspect next time around all my use cases will be in a docker container 


James, can you elaborate on this use case a bit more? I'm interested in how you're using the cross compile toolchain for Rust and what docker image mechanism you're referring to.

Charlie J.
National Instruments
0 Kudos
Message 5 of 8
(2,378 Views)

I've yet to try it in anger but this is the project: https://github.com/cross-rs/cross

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
Message 6 of 8
(2,369 Views)

Hi Everyone,

 

We are using the Windows cross-compiler for x86.

 

The main problem we have been facing is that the cross-compiler has not been updated with subsequent NI RT Linux releases therefore we had to try to update it manually to match our deployment system (by coping library and header files over from the host). Obviously, a very sub-optimal solution, as some others have already pointed out.

 

For our specific use cases, NIPM installer sounds like a significant improvement, assuming this will be supplemented by the appropriate "dev" packages for the various NI API libraries providing the header files, dynamic libraries, and - ideally - documentation, baselined by different NI RT Linux versions.

 

Further improvement would be if the cross-compiler toolchain worked with CMake. It already might - I have in fact seen the supplied CMake toolchain files, but never had the chance to try them out - if these were being actively maintained, that would be splendid.

 

Looking at the matter totally out of the box, a much better solution from our point of view would be NI RT Linux docker images on top of which we can OPKG-install the required packages directly from NI RT Linux feeds (though "dev" packages with API header files would need to be provided - I understand these do not exist currently). That would be so much easier to integrate in CI/CD pipelines! I am not sure whether this would be suitable for ARM cross-compilation though.

 

Many Thanks

0 Kudos
Message 7 of 8
(2,192 Views)
  • x64 user
  • So far I have installed on Windows PC, but would love to move to Linux.
  • The compressed installation has worked fine, but the two options you mention seem superior.
Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 8 of 8
(2,127 Views)