Cross-Compiling for BeagleBone Black on Windows? - eclipse

I have tried quite a few things on the internet but all seems to be not working when I cross compile on eclipse (with GNU MCU ARM and Sourcery Lite ), the binary on the BB-Black gives segmentation fault. Did someone try cross-compiling in recent time?

Setting up Beagle Board Tool chain for windows:
Online tutorial: In the tutorial it is mentioned that how to setup the tool chain in eclipse, cross compile on windows and deploy on the windows.
- http://jkuhlm.bplaced.net/hellobone/
Pre-Requisite:
In order for beagle-bone to work with your laptop, you need to
install the driver for the beagle bone.
https://beagleboard.org/getting-started
- Follow the link above and download the drivers at step 2.
- Important: To install the driver, you need to switch off the driver signature safety feature of windows OS. The instructions to do so is
mentioned at the link below:
https://www.youtube.com/watch?v=71YAIw7_-kg&feature=youtu.be
Install the following:
1. Java SDK : http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Install Eclipse IDE for C/C++
Any version of Eclipse IDE for C/C++ is ok.. We would recommend to use “Neon” version of Eclipse IDE.
Link to the Neon Version: http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/3/eclipse-cpp-neon-3-win32-x86_64.zip
Unzip the package at a convenient location and launch via eclipse..exe
After opening your Eclipse:
Go to: Help > Eclipse Market Place > Search “GNU MCU Eclipse Plugin” and Install
Linaro Tool chain : http://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/
Download the toolchain from the link above named “gcc-linaro-7.3.1-2018.05-i686-mingw32_arm-linux-gnueabihf.tar.xz”
Extract it to a convenient location, recommended “C:/Linaro”
Install GNU Make: http://gnuwin32.sourceforge.net/packages/make.htm
Now please open the online tutorial mentioned in the beginning of this article and follow step-4 onwards.
Use your programmer instincts to import the project, edit make file, launch the remote system via eclipse, create a SSH connection
to beagle bone black.

Now, in 2020 it is much simpler. Download "Code Composer Studio IDE for Windows Host" from https://www.ti.com/. It is an Eclipse based IDE, for many TI targets. It includes the compiler too.

I created a repository providing an example how to cross-compile for the beagle bone black on both Linux and Windows (MacOS should be possible as well) with CMake. Also includes Eclipse project files and instructions on how to perform remote debugging with the TCF agent:
https://github.com/spacefisch/beaglebone-crosscompiling

Related

How to run VSCode on Centos6

My company is using an old CentOS6 and they wont update it before months (years?). This is totally out of my control and it obviously makes using up to date software a nightmare.
I would like to use Visual Studio Code as a C++ IDE but its intellisense plugin is running with glibc >=2.14 and Centos6 comes with glibc 2.12.
It also needed some more dependencies I managed to recompile and load with LD_LIBRARY_PATH. I tried compiling a new glibc and load it as well but it segfault, as expected.
I used the compiled version of VSCode from the official website.
I tried compiling it myself but it requires to download many files and my virtual machine does not have Internet, I can only transfer files through ftp. I created a local yarn repository, compiled all appropriate version of Yarn, NodeJS but a compiled binary is trying to download electron and I have no idea where to put the file to trick him into thinking it's downloaded already (assuming I could).
There are standalone solutions to run software on old distribution, like AppImage but VSCode is not part of their apps.
Would you have any idea on how to run VSCode on Centos6? Did you ever try to compile VSCode without and Internet Connection?
Currently the only viable solution I see would be to create an AppImage at home.
To run VS Code Server on CentOS 6, I followed the "glibc and libstdc ++ on RHEL / CentOS 6 update" article from here.
Perhaps this option will help you.

Eclipse, GCC, installing them twice?

I am thinking of installing Eclipse for developing STM32 programs (I have a question about this that I will post later). In the instructions it says I have to install:
the IDE for C/C++
GNU ARM Eclipse Plug-ins
GNU GCC ARM tool-chain
among other tools..
However, I am also thinking of installing e2studio for developing Renesas programs. You can see about this Here. There you can see that this is "based on Eclipse CDT" (what is the difference between this CDT and the IDE?) and that it also uses Plug-ins like GNU Tool & Support Here.
My question is, is this possible? Do I have to install them separately? (I guess so). Will the GNU tools will also be installed twice??
(I am using a windows10 machine)
Thanks in advance
CDT is dedicated to C/C++ programming. Actually I personally prefere to have separate eclipse installations for different families of uC. Why? Because it is much easier to manage updates and to keep my work in the correct order.
For STM32 I advice (I think, you are a novice user of Eclipse & ARM toolchains) to install OpenSTM32 (yo have a straightforward installer). It imports projects from CUBEFX & MX which gives you an easy way to import examples & initialisation code from Cube. I personally do not use HAL libraries but as I know I am a minority.
However, I am also thinking of installing e2studio for developing
Renesas programs. You can see about this Here. There you can see that
this is "based on Eclipse CDT" (what is the difference between this
CDT and the IDE?)
Eclipse CDT is an open-source general-purpose C and C++ IDE.
e2studio is one of several software packages that extend CDT with (most likely proprietary) plugins geared towards a more specific market (in this case, Renesas programs).
My question is, is this possible?
Yes.
Do I have to install them separately? (I guess so).
Yes.
Will the GNU tools will also be installed twice?? (I am using a windows10 machine)
You can certainly share a single installation of a toolchain between two installations of CDT, if both of them need the same toolchain (in terms of version and architecture). I don't know enough about STM32 and Renesas to tell you if they use the same toolchain.

How to deploy application with QT5

So I have made GUI frontend for latex with QT5 using QT creator. The application works fine, but I'm unable to deploy it. The deploy option in build is grayed out. I have also tried following this guide but I can't even configure my QT to use static linking. I was able to configure the source, but when I try to run mingw32-make sub-src, it says nothing to do here.
I downloaded QT from here using the link Qt 5.0.1 for Windows 32-bit (MinGW 4.7, 823 MB). I have also downloaded microsoft visual studio express for Windows 8 to get tools required for building c++.
I also tried to install mingw32 manually. I have also installed Strawberry perl, because one guide told me to do that, but that did nothing.
I managed to fix this problem. There was one .dll. Reason why I didn't find it earlier was that my application did not need it by itself, but one of libraries I used was dependaple from it. The missing .dll was icuuc49.dll.

Visual studio + remote gdb debugging

What is best way to do remote live gdb debugging and use Visual studio as the front end.
In my case: I have a C++ application (compiled for debugging) running on a Linux server
Can I use Visual studio on my windows machine as a front end to do
live debugging on the C++ application. Is this even possible for a
large scale application (OR)
If above is not possible, can I use eclipse on my windows or on a different linux box to do the same remote live debugging
Any other better IDE options ?
Thanks.
You can easily do it with VisualGDB:
Build your app on the Linux machine and ensure that you can run it.
Install VisualGDB on your Windows machine with Visual Studio.
Run the VisualGDB build server on the Linux machine.
In Visual Studio, create new project, select C++->VisualGDB
In the wizard select Linux Application -> Import Existing -> Import from Remote machine
Select the directory where you have built the Linux app. If it's not based on GNU Make, also specify the build command line.
Specify whether you want to synchronize IntelliSense directories with Visual Studio.
On the last wizard page specify the executable name of your project so that VisualGDB knows what to debug.
When you press "finish", the Wizard will create a Visual Studio wrapper project around your Linux project so that you can edit the files, built the project and debug it from Visual Studio.
There's a more detailed tutorial here: http://visualgdb.com/tutorials/linux/import/
You can try WinGDB.
It is an extension for Visual Studio allowing to develop and debug programs with GDB. Here is how to setup Remote Linux development using WinGDB.
I don't think it's possible using Visual Studio.
It should be possible using gdbserver/gdb combo, but on Windows machine you will need special build of gdb that targets linux. I never tried this, but it should be possible to build.
If you can get this working, then you can use Eclipse or any IDE that supports GNU tools.
Just some recommendation:
You can install a free X server on your Windows machine, such as Xming or Xorg in Cygwin. Then you can do Linux native debugging with eclipse. Just display the eclipse GUI to your X server on Windows. You can interactive with the GUI on your Windows machine.
Now possible with VS2015 + GDB extension, reas MS blog post here: http://blogs.msdn.com/b/vcblog/archive/2015/11/18/announcing-the-vs-gdb-debugger-extension.aspx

How can I install the BlackBerry v5.0.0 component pack into Eclipse?

I'm trying to install the latest v5.0.0 "beta 2" BlackBerry OS Component Pack into Eclipse 3.4.2 with BlackBerry Eclipse plugin v1.0.0.67, but have hit a few problems. Has anybody found an easy way to do this?
I had no trouble installing the v4.5.0 and v4.7.0 Component Packs.
It's rather strange that BlackBerry are shipping new phones with the v5.0.0 OS installed (e.g. a Storm 2 9550 and Bold 9700 that I just bought), and pushing that update to phones whilst the BlackBerry website still considers the v5.0.0 SDK / Component Packs to be "beta 2"! If anybody knows when an official non-beta Component Pack is going to be released that might solve my problem...
In case it helps, the problems I've hit so far are:
-Contrary to the implication on the BlackBerry website, the Eclipse "Software Update..." option for the v5.0.0 Component Pack claims it only works on the v1.0.0 Eclipse BlackBerry plugin, not the new v1.1 one.
-I then tried to install the v5.0.0 Component Pack through the "Software Updates..." menu in Eclipse using the v1.0.0 Eclipse BlackBery plugin. Once I'd done the 200MB download the install failed with a "Invalid zip file format" error.
-I might just have been unlucky with a corrupted download but I did try it twice, once through "Software Updates..." and once by selecting "Archive" to install the downloaded Component Pack (which unlike v4.5.0 and v4.7.0 was a JAR, not a ZIP).
Using Eclipse 3.5.1 and the 1.1 component pack, I had no trouble installing the 5.0 JDE from the 1.1 component pack update site from within Eclipse - ie: using the update site http://www.blackberry.com/go/eclipseUpdate/3.5/java ...
It could be possible that Blackberry has fixed whatever problem you encountered in their latest beta, or the latest version of Eclipse just works better...but at any rate, I hope you've gotten your setup working, but if not, perhaps trying again with the latest versions will fix things!
They (rim support) did experience some issue with the zip they have on the site for you to install.
See this thread
If you see Unconnected sockets not implemented just before your Invalid zip file format, like:
osgi.bundle,net.rim.eide.doc,1.0.0.67.
Exception connecting to
https://www.blackberry.com/Downloads/auth/contactFormPreload.do?code=DC727151E5D55DDE1E950767CF861CA5&dl=A7B283681EA93067610F5EE0EEB46A29.
Unconnected sockets not implemented Exception connecting to
https://www.blackberry.com/Downloads/auth/contactFormPreload.do?code=DC727151E5D55DDE1E950767CF861CA5&dl=A7B283681EA93067610F5EE0EEB46A29.
Unconnected sockets not implemented
Error closing the output stream for
net.rim.eide.feature.componentpack4.3.0/org.eclipse.update.feature/4.3.0.16
on repository file:/C:/eclipse/. Error unzipping
C:\DOCUME~1\tysonl\LOCALS~1\Temp\net.rim.eide.feature.componentpack4.3.0_4.3.0.169073623197643742544.jar:
Invalid zip file format Error closing the output stream for
net.rim.eide.feature.componentpack4.5.0/org.eclipse.update.feature/4.5.0.16
, the support mentions:
The "Unconnected sockets not implemented" is caused by a bug in current versions of JDK 1.6.
You can work around this by downgrading to JDK 1.5 (modify your PATH and JAVA_HOME variables) to install the plug-ins. You may need to delete the files in your windows temp folder as well (Eclipse could have cached bad copies of the file).
This should be fixed in JDK 1.6 update 14.
(so what version of java are you using?)
As mentioned in the same thread:
The following is from the "blackberry plugin for eclipse" download page:
It is recommended that users outside of North American or users who have experienced problems with the BlackBerry update site use the links below to manually download and install the components.
Yep, I've read that bit. That's essentially what I tried to do. What that doesn't say is you need to remove the update site from your site list before trying to install the manual downloads via the archive function.
Helpful to me:
http://supportforums.blackberry.com/t5/Java-Development/Invalid-zip-file-format-trying-to-add-4-7-0-components-to/td-p/411105;jsessionid=32490C8741FEE961B9436E453DFF7430