What is the procedure to integrate cross toolchain with Redhawk IDE? - redhawksdr

Following "How to run waveform developed in REDHawk IDE in my target board ( Zedboard by Xilinx)?", a custom OS is developed using Yocto and Redhawk recipes and installed it in Zedboard. SCA application is being developed using Redhawk IDE installed in development PC. To run the same application in custom OS, a cross-toolchain is generated for that environment using "bitbake redhawk-base-image -c populate_sdk" command (source: https://www.yoctoproject.org/docs/1.6/adt-manual/adt-manual.html). Idea is to develop the application in development PC and build it with cross-toolchain. So, now what is the procedure to integrate cross toolchain with Redhawk IDE?

The Yocto Project provides some tooling for this.

There is little experience in the community with customizing the build-chain in the REDHAWK IDE; ultimately you just want to research updating the build chain in the Eclipse CDT which can you find information about on-line.
The following is provided as a possible approach (one that hasn't been tested). The current build-chain for the REDHAWK IDE is completely based on the generated build scripts that are a part of all REDHAWK projects:
"build.sh all" to build
"build.sh clean" to clean
"build.sh install" to install
You've no doubt noticed this in the console as you've worked with projects in the IDE. So as long as you modify your project to cross-compile when build.sh is getting invoked, the build portion will happen automatically within the IDE. However, it's another matter to get the IDE to understand that your project is referencing files for the embedded board's operating system, and not the native operating system. Here's a rough outline of what I think you'd need to do:
Help -> Install New Software
Under Mobile and Device Development find and install C/C++ GCC Cross Compiler Support
Window -> Preferences
C/C++ -> Build -> Settings
Under Discovery, select CDT Cross GCC Built-in Compiler Settings
Modify the command used to get the compiler specs as appropriate for the embedded platform
Create a new component, get it setup so that when build.sh is run it is cross-compiled for the embedded platform
Project -> Properties
C/C++ General -> Paths and Symbols
Select Includes tab
Select GNU C++
Modify include directories as needed for the embedded platform
C/C++ General -> Preprocessor Includes
Select Providers
Uncheck CDT GCC Built-in Compiler Settings
Check CDT Cross GCC Built-in Compiler Settings

Related

What tools do I need to port packages to powerpc?

I'm relatively new to coding and building apps, and I wan to contribute to PowerPC Linux via packages. So I'm trying to port apps and tools over to then package them for the platform and try to package them for different distro's such as ubuntu and void. But, as it stands with running Ubuntu Mate 16.04, basically everything is out of date (LLVM, Clang, ETC) so I'm having to build stuff by hand to get other stuff built, which atm is Firefox 61.
No problem! But, what all tools should I acquire? And I have the system as up to date as I can make it by the way, the tools are just out of date. I have the code for LLVM, clang, and associated tools, but I don't know what other tools I may need in the future (If I have Clang do I need GCC? If an app calls for GCC in the build process can I bump it to clang instead? What tools do I need for python? Or rust? What are your general recommendations for languages I should be up to date with?).
For note, I'm building on-platform via a powerbook G4 A1138. Its a little slow, but its not that bad over all. I know I could cross compile, but something doesn't sound right about building on X86 for powerpc. Like I'm gimping the platform by doing that.
Anyways, all the info I can get would be helpful! Thanks!
There is a clang-5.0 and clang-6.0 for powerpc in the Ubuntu repository.
The PPA for Ubuntu Toolchain Uploads (restricted)” team has very recent toolchaing for powerpc on 16.04 too.

Setup project Cross-Platform with Monogame

I've been trying to figure out on how to setup a Cross-Platform project for MonoGame. Whats the conventional way of doing so ?
Is that done through a Shared Project and can I keep all my content in 1 project ?
Also I am not sure if this information is correct do I need a Mac to build my project for Mac how does that work ? If so how what's the best way of setting that up.
Targeted Platforms : WINDOWS, LINUX, MAC
The best way to setup a cross platform MonoGame project IMO would be to use a Shared project. Shared projects can also include .mgcb file so you won't need to duplicate your content either. How to do:
Use "Xamarin Studio/MonoDevelop" and create a "MonoGame Shared Project" with the name of your game
If you are going to use using "Visual Studio", close the "Xamarin Studio/MonoDevelop" after this, and open up the created project vith it
you are gonna have to include the generated "Content\Content.mgcb" file with build action "None" so it will be visible in Project View area
Add a MonoGame Project for the platform you wish to launch the game from, ie. create a "MonoGame Crossplatform Project" and name it "(gamename).DesktopGL"
Delete "Game1.cs" and "Content Folder" from the Platform project
Add a reference for your Shared project
For your platform project, in options set the Output Assembly Name to be the same as your shared project
this step might not seem important, but if you are using a custom importer/processor this will allow you to not have to compile the content separately for each platform.
There you go, you should be able to run your project now.
Also I am not sure if this information is correct do I need a Mac to build my project for Mac how does that work ? If so how what's the best way of setting that up.
The created executable from DesktopGL project is runnable on Mac even when compiled from Windows, the Mac user just has to launch it using Mono. In case you want you can package your game using MonoKickstart so that your Linux and Mac users don't have to have mono installed: https://github.com/MonoGame/MonoKickstart what's more, it also includes other needed native libraries. Description on how to use it are in the link.
Since you're just targeting Windows, Linux and Mac, you can use Xamarin/MonoDevlop which runs on all three of your target platforms.
Once it's installed, then add the Monogame through the Addin manager. The addin on version 5 of Xaramin and MonoDevlop.
You can then use the same Solution project file between all three platforms assuming you use the OpenGL Template. I use this method for developing between Windows and Linux.
The only time you'll need to use a shared project or something similar would be if you started developing for Mobile (iOS/Android) or for Windows on DirectX instead of OpenGL.

Deploy to Linux

Background:
Im using QT and have visual studio 2012 as my IDE (used the QT plugin for visual studio).
And finally the whole project is done. However due to my .NET background I have no experience when it comes to deploying my project so it can be run on Linux.
Question:
Anyone knowing how to deploy a QT project made in visual studio to linux?
You should install Linux and prepare a Qt development environment on it.You can then copy your project there, compile it and see the results in the real environment. This way you can cope with the minor differences when porting from one OS to another easily.
So don't think of cross compiling your app for Linux on Windows. From a complexity point of view, I think setting up a Linux machine (VM or not) and the necessary environment for Qt is a whole lot simpler than cross compiling bug hunting afterwards. After all you will need a real target environment to finally test your application.
Before you can deploy something you have to compile it for that platform, and here you have two main choiches: either you cross-compile which means you compile it on windows using a set of tools so that your software is built to run on a linux, or you get a linux machine, you copy your entire project over and let Qt for linux do the magic.
Once you have your working binary compiled on linux or for linux then you start thnking about deployoment.
If you really want to be fully linux-compatible and "linux-ally correct" you should distribute your source-code precooked using some tools like "automake" that will make it possible to linux users to compile it on any linux version.
If you do not want to release your source code, you technically can distribute binaries without source code (not sure if you will be ok with licenses) but you have to be aware that there is no standard in linux for distributing binary packages, there are at least 2 main package building standards that are the ubuntu/debian style and red hat (and friends) style.
You are going to find plenty of documentation about all this stuff from cross-compile to automake and of course building debian packages and building red hat rpm packages.

Qt Creator as a debuging system for Linux embedded

In our system, we write the code on C++ without using Qt libraries.Actually, we write the on Windows machine, but finaly, this code must to be rebuilded for Linux Embedded machine. At first stage we did it successfully with Makefile-s, but "old style debugging" with gdb utility killed us. So I want to use Qt Creator to debug the application.
I successfully use Qt Creator to build all libraries and applications for ARM machine(of couse I have an ARM toolchain). But I cannot remotely debug the system.
I do not understand, what I do wrong.
The questions:
1. For system debuging, do I need Qt Libraries buld for ARM machine? (as I wrote above, I do not use Qt Libraries for my applications or for my libraries)
2. Do I need to redefine Mkspec for ARM compiler?
Thanks, Slava
You generally don't need Qt libraries for your system to use Qt Creator as a debugger frontend for your plain C++ program on an embedded device. However, if you use qmake as a build system, the associated Qt version must (roughly) match your target.

What is Cygwin and how to use it in relation in Android NDK

Hi I am new to android NDK Devlopment.I downloaded Android NDK 4 for windows.I read through the docs.But i am not clear with it.
First thing is that,I want to develop the native file which may be c 0r c++.I think Using Cygwin will come to play.I dont have any idea or how to use cygwin .From the Docs i just read Cygwin is required for Windows platform.Apart from it ,i dont have any knowledge about it.
Not yet started with NDK Concepts.Help Required
Cygwin is a way to make Windows support some linux functionality. If you install cygwin on your windows machine you'd be able to run some linux software on windows (you'd have to recompile it especially for cygwin though). You can find it and more information about it here. There's also a good explanation at the wiki page here.
If the Android NDK needs it I suppose the Android NDK needs some linux functionality or tools to work properly. The other option might be to install Linux on a machine and run the Android NDK on there, it might be better since I assume Linux is the native environment for Android NDK development.
Since you're saying that you're a bit unclear about the NDK, you should probably be aware that as far as I understand you can not build a whole Android app using it, you can only develop bits of it, you will still need to develop at least part of the app to run on top of the Dalvik virtual machine, which, as far as I know, means that you'll have to write that bit in Java. In general I think that you should develop Android apps only in Java unless there is a specific reason to build certain parts of it using the NDK.
From wiki:
Cygwin (pronounced /ˈsɪɡwɪn/,[2] SIG-win) is a Unix-like environment and command-line interface for Microsoft Windows. Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment. Thus it is possible to launch Windows applications from the Cygwin environment, as well as to use Cygwin tools and applications within the Windows operating context.
Cygwin consists of two parts: a Dynamic-link library (DLL) as an API compatibility layer providing a substantial part of the POSIX API functionality, and an extensive collection of software tools and applications that provide a Unix-like look and feel.
So, Cygwin is a set of tools which allows you to emulate a unix-like (or linux) environment on your windows machines.
The NDK is the Android Native Development Kit. It allows you to write parts of your application in native code (C/C++) and integrate them into your application. Your application still runs under the Dalvik VM but it can load shared objects creating using a cross compiler. The NDK contains all the necessary tools and build scripts to generate native code binaries. It's an advanced concept and one you should probably wait on until you fully understand the architecture.
The reason why it requires Cygwin (or some flavor of linux) is because it uses GnuMake and other linux tools such as awk or Nawk. These tools are not available (or are really hard to use) on windows platforms, hence the need for at least Cygwin (though I would advise you do yourself a favor and just install linux).

Resources