[fusion_builder_container backgroundcolor=”no” backgroundimage=”” backgroundrepeat=”no-repeat” backgroundposition=”left top” backgroundattachment=”scroll” video_webm=”” video_mp4=”” video_ogv=”” video_preview_image=”” overlay_color=”” video_mute=”yes” video_loop=”yes” fade=”no” bordersize=”0px” bordercolor=”” borderstyle=”” paddingtop=”0px” paddingbottom=”0px” paddingleft=”0px” paddingright=”0px” menu_anchor=”” equal_height_columns=”no” hundred_percent=”no” class=”” id=””][fusion_builder_row][fusion_builder_column type=”1_1″ layout=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none” last=”no” hover_type=”none” link=”” border_position=”all”][fusion_title size=”1″ content_align=”left” style_type=”single solid” sep_color=”” class=”” id=””]Introduction[/fusion_title][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]
This is the chapter web page to support the content in Chapter 7 of the book: Exploring BeagleBone – Tools and Techniques for Building with Embedded Linux. The summary introduction to the chapter is as follows:
To this point in the book, all of the code is built and executed directly on the Beagle boards. However, for larger projects this can be impractical, as you may need to manage many source files within a single project. In addition, compilation times can be slow on the Beagle boards for building large projects. This chapter first describes how you can use your desktop computer to develop applications that can be deployed directly to any Beagle board. The Eclipse integrated development environment (IDE) is then introduced, which allows for advanced development capabilities, such as remote debugging. The chapter finishes by outlining how you can build and deploy a custom Linux kernel.
[/fusion_text][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container][fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”3_5″ layout=”3_5″ last=”no” spacing=”yes” background_color=”” background_image=”” background_repeat=”no-repeat” background_position=”left top” border_size=”0px” border_color=”” border_style=”” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” class=”” id=”” min_height=”” hover_type=”none” link=”” border_position=”all”][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]
Learning Outcomes
After completing this chapter, you should be able to:
- Install a cross-compilation toolchain under desktop Linux that can be used to build applications for the Beagle boards using your desktop PC.
- Use a package manager to install multi-architecture third party libraries that may be required for cross-compilation.
- Emulate the ARM architecture on the desktop PC using QEMU.
- Install and configure the Eclipse integrated development environment (IDE) for cross-compilation to build Linux applications.
- Configure Eclipse for remote deployment of applications, remote debugging, GitHub integration, and automated documentation.
- Build a custom Linux kernel and Poky Linux distribution.
[/fusion_text][/fusion_builder_column][fusion_builder_column type=”2_5″ layout=”2_5″ last=”yes” spacing=”yes” background_color=”” background_image=”” background_repeat=”no-repeat” background_position=”left top” border_size=”0px” border_color=”” border_style=”” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” class=”” id=”” min_height=”” hover_type=”none” link=”” border_position=”all”][fusion_text][toc][/fusion_text][fusion_sharing tagline=”Share this page:” tagline_color=”” title=”Exploring BeagleBone: Chapter 1″ link=”http://exploringbeaglebone.com/chapter1/” description=”” pinterest_image=”” icons_boxed=”” icons_boxed_radius=”4px” box_colors=”” icon_colors=”” tooltip_placement=”” backgroundcolor=”” class=”” id=”” /][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container][fusion_builder_container backgroundcolor=”no” backgroundimage=”” backgroundrepeat=”no-repeat” backgroundposition=”left top” backgroundattachment=”scroll” video_webm=”” video_mp4=”” video_ogv=”” video_preview_image=”” overlay_color=”” video_mute=”yes” video_loop=”yes” fade=”no” bordersize=”0px” bordercolor=”” borderstyle=”” paddingtop=”0px” paddingbottom=”0px” paddingleft=”0px” paddingright=”0px” menu_anchor=”” equal_height_columns=”no” hundred_percent=”no” class=”” id=””][fusion_builder_row][fusion_builder_column type=”1_1″ layout=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none” last=”no” hover_type=”none” link=”” border_position=”all”][fusion_tagline_box backgroundcolor=”” shadow=”yes” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”C/C++ Cross-compilation on the BeagleBone Platform” description=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ class=”” id=””]
[fusion_youtube id=”T9yFyWsyyGk” width=”720″ height=”420″ autoplay=”no” api_params=”” class=””/]
This video introduces C/C++ cross-compilation on the BeagleBone platform under Debian (Jessie), and is applicable to any embedded Linux development. I show the steps that are necessary to set up a toolchain, the Eclipse CDT (Luna) environment and use the Target Management RSE (Remote System Environment) plugin to communicate with the BeagleBone. Finally, I demonstrate how you can set up a cross-platform debugging environment within Eclipse, where you can use gdbserver on the ARM device and gdb-multiarch on the client device to establish a full debugging environment.
[/fusion_tagline_box][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container][fusion_builder_container backgroundcolor=”no” backgroundimage=”” backgroundrepeat=”no-repeat” backgroundposition=”left top” backgroundattachment=”scroll” video_webm=”” video_mp4=”” video_ogv=”” video_preview_image=”” overlay_color=”” video_mute=”yes” video_loop=”yes” fade=”no” bordersize=”0px” bordercolor=”” borderstyle=”” paddingtop=”0px” paddingbottom=”0px” paddingleft=”0px” paddingright=”0px” menu_anchor=”” equal_height_columns=”no” hundred_percent=”no” class=”” id=””][fusion_builder_row][fusion_builder_column type=”1_1″ layout=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none” last=”no” hover_type=”none” link=”” border_position=”all”][fusion_title size=”1″ content_align=”left” style_type=”single solid” sep_color=”” class=”” id=””]Errata[/fusion_title][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]
Second Edition
- None so far
First Edition
- Page 261. (loc. 7667). In the first paragraph of the section “Configuring Eclipse for Cross-Compilation” the sentence “Then click Finish.” should not be present. The remaining instructions are complete and correct.
- Page 263. The include paths has changed to “/usr/include/arm-linux-gnueabihf/” from “/usr/arm-linux-gnueabihf/include/”
[/fusion_text][/fusion_builder_column][fusion_builder_column type=”1_1″ layout=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none” last=”no” hover_type=”none” link=”” border_position=”all”][fusion_sharing tagline=”Share This Story, Choose Your Platform!” tagline_color=”” title=”” link=”” description=”” pinterest_image=”” icons_boxed=”” icons_boxed_radius=”4px” box_colors=”” icon_colors=”” tooltip_placement=”” backgroundcolor=”” class=”” id=”” /][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]
Loc 7667: In the section on “Configuring Eclipse for Cross-Compilation,” you say this…
********************************************
“…set the project name to BBBTest, pick the project type ‘Hello World C++ Project,’ and the Toolchain to be ‘Corss GCC.’ Then click Finish. Repeatedly click Next… ”
********************************************
You can’t click “Finish” there…it’s disabled. You can only click Next. Note that if you choose the standard empty C++ application, then you CAN choose Finish at this point–but then the GUI wizard closes and you never get the chance to set up your cross-compilation toolchain without editing the project’s properties. So I think that you just need to adjust the verbiage there in that section, and simply remove the part about clicking “Finish” until after you’ve set up the toolchain. At least it should work that way for the version of Eclipse Luna I just downloaded and installed tonight. Please let me know if you have different behavior on your end.
Thanks Tom. The sentence “Then click Finish” should not be there. I retrospectively updated the text to account for the changes from Eclipse Kepler to Eclipse Luna and forgot to remove this sentence. Added to the list of errata. Derek.
Makes sense. I like Luna–it seems to be a bit easier for helping you with cross-compilation. However I keep getting library path errors because it keeps looking in /lib/ for stuff like ld-linux-armhf.so.3. I even added the real path (/usr/arm-linux-gnueabihf/lib) to the project, but it still seems to be looking in the wrong directory. So I need to debug that today. But otherwise, Luna seems very nice–I especially like the ability to remotely deploy the executable as a post-build step, just like with Qt. The Eclipse folks seem to have gotten that pretty stable, unlike some of the earlier versions of the IDE.
Eclipse remote debugging is still very clunky compared to Qt-Creator. Wow. I got the library path issue resolved by simply creating a symlink in /lib/ (because it didn’t care that I included the correct library path…sigh), but now the debugger isn’t happy. Lots of settings in the Debug Configuration wizard, and not all of them are necessarily intuitive. So there’s definitely a “learning curve” in play here…lol.
Where did you add /usr/arm-linux-gnueabihf/lib to the project?
I’ve got this added to “Paths and Symbols” under the “Library Paths” tab.
This is in the dialog “Properties for (Project Name)” which comes up
from the top menu bar:
Project -> Properties
I haven’t seen an issue yet, but also I haven’t got past “Hello World” yet either!
Hi Greg, it is a good idea to add it as you have done, but g++ automatically searches the “user/include/target” path (or “user/target/include”, and /usr/include, and /usr/local/include) where target is “arm-linux-gnueabihf” in this case (type: g++ -v). This works similarly for the library paths. Derek.
Loc 7814: In the section (paragraph) where you talk about setting the path for the gdbserver executable and port, it would be helpful to mention something to the effect of “Finally, under the Gdbserver Settings tab in the Debugger Options section…” Your text never actually instructs us to go to the main “Debugger” tab, so it’s a bit clunky to find the Gdbserver Settings tab the first time.
Thanks for that. Hopefully your clarification here helps anyone who gets stuck. I’ll keep it in mind for any revisions.
I missed it too. In my case, I had to use the scroll bar to see the remote absolute path setting. It is in fact shown in Figure 7.7.
Another point, I was using the version of Eclipse installed using Ubuntu 14.04. It’s an old version! Some of the configuration dialogs/tabs are slightly different. Fortunately the latest version from eclipse.org (C++ developer version) installs easily, and it was able to convert my already running project. to the new version. Lesson learned.
Remote debugging is working! (The only thing that concerns me is that some of the steps pause for a while before allowing the next step.) This is really great, and I can see how this could be extremely useful in getting the bugs out of an embedded device platform.
Hi all.
1) Clicking on “build All”, the executable is downloaded to the board. I know that because I can run the test using the terminals tab, but…
…if clicking “BBBtest Debugging” (down arrow at bug”, the executable is downloaded to the board (*) but I receive a messagebox saying:
Problem Ocurred
‘Launching BBBtest Debug’ has encountered a
problem.
Error during file upload
<< Details
Error during file upload.
Missing element for: "
Missing element for: "
Missing element for: "
(*) – I know that the binary was downloades because I made an text modification and can run the test using the terminal
Manually switching to the Debug perspective, the buttons are grey (resume, suspend, step into,…)
Thank You for your attention.
Hi there, I have seen that error before! I think the issue is that you need to set the “Remote Absolute File Path for the C/C++ Application” as in Figure 7-7 to have the exact same name as your executable name. In my case it is /home/molloyd/tmp/BBBTest where that is the path on the BeagleBoneBlack connection. Hope that helps, Derek. P.S. I think I will do a short video on this topic.
Hi Derek.
Thank You. That was the problem. It is running now.
Vidal
Hello,
Location 7429 A Toolchain for Debian.
Install embedian-archive-keyring.
after editing the sources.list as directed and running the following command.
root@ debian: ~# apt‐get install emdebian‐archive‐keyring
I get the following error
E: GPG error: http://www.embedian.org unstable Release: The following signatures were invalid: NODATA 1 NODATA
The embedian toolchain wiki states The emdebian archive keyring is considered to be compromised
The updated version of the package contains a revocation of the previous key and no replacement key. The old archives signed by this key are therefore to be treated as unsigned.
Running root@ debian: ~# apt‐cache search gnueabihf results in no availiable packages
Is there another way to update the repository lists to use hard-float tools?
Thanks.
Hi Andy, I am putting a video together today on the steps involved to support the text — however, I haven’t seen this error before. Please double check the entries that you added to the end of the sources.list file, as I only ran this last night and it worked fine. I should have the video available later today and I will add it to the Chapter 7 web page. Derek. (update: I just noticed a typo in your URL – check the spelling of emdebian (not embedian) in the file entry — I think that is the problem)
Hello Derek,Thanks. I have re edited the sources.list.
I got the following warning during install.
emdebian-archive-keyring (2.0.4) unstable; urgency=medium
The only key in this keyring has been revoked due to a
possible compromise on the server which was due for replacement. .
Emdebian Grip is no longer being updated and the toolchain
repository has not been updated since before the compromise
as work is ongoing for multiarch-compliant toolchains in Debian.
There is no replacement key for this keyring.
The emdebian-archive-keyring 2.0.3 was replaced by 2.0.4 during the install which appears to have succeeded.
Running ~# apt-cache search gnueabihf gave predicted results.
Thanks.
Desktop Debian 7.4 or 7.7 corrupted after Chapter 7.
Hi Dr. Malloy! Thank you for this excellent project, and the book I recently received. However, I have experienced a serious problem a number of times now.
When I create a fresh VirtualBox Debian 7.4, or 7.7, an ONLY DO THE STEPS IN THE VIDEO for this chapter, all goes well through Eclipse remote debugging . However, if during the process I try to apt-get, or use the Synaptic package installer, to install filezilla, or other zenmap, or do this after completing the video, it looks like apt-get fetches a very large number of packages, to update Debian, and then corrupts Debian to not be loadable following reboot.
Could this be caused by the change you make to /etc/apt/sources.list? You have us add under #Emdebian entries
deb http://www.emdebian.org/debian unstable main
deb http://ftp.us.debian.org/debian unstable main contrib non-free
My plan is to comment these out, once I have only followed all the steps in the video, and then attempt to install further packages.
If you have any comments, I would be grateful for them!
Thanks
RE:Desktop Debian 7.4 or 7.7 corrupted after Chapter 7
Hi again! Commenting out the Emdebian entries in /etc/apt/sources.list now allows me further successful package installations.
Has anybody else had the same experience?
Thanks Mike. Fortunately, it hasn’t happened to me. You are right though — adding the unstable source entries is likely to cause difficulties when updates are performed to the online Debian repositories. I’ll add a note to the video and to the page to recommend that these entries should be removed after the installation of the toolchain. Please let me know if you notice any other difficulties. Thanks, Derek.
Hello Derek,
I’m trying to do this on a latest Ubuntu release (14.04). Cross deployment is only working when using arm-linux-gnueabi-g++ (and not arm-linux-gnueabihf-g++.). How does this come?
And when trying to do a remote debugging session I can’t get rid of the shared library errors (tried both arm-linux-gnueabi and arm-linux-gnueabihf libs ).
Thanks a lot.
Hi Denis, Make sure that your compiler uses hard floats — e.g., by using http://packages.ubuntu.com/trusty/g++-4.7-arm-linux-gnueabihf under Trusty 14.04 (or http://packages.ubuntu.com/precise/devel/g++-4.6-arm-linux-gnueabihf under Precise 12.04) and deploying to a BBB image that was built to use hard floats. If you are using a BBB image with soft floats (e.g., Angstrom) then stick to the gnueabi version. Derek.
Hello Derek:
thanks for your videos and they are really helpful.
I learned a lot from your videos.
I have successfully set the RSE developing environment in ubuntu 12.04 LTS in virtualbox.
I could write codes and debug for program. while so many input/output pins on the BBB borad.
I do want to check values of each register of TI ARM microchip.
by checking so many materials, it seems a JTAG debugger is needed.however, it seems comparatively expensive.
do you have any idea for debugging the inner register of Beagle Bone Black?
thanks so much for your help
Hi there. I discuss the hardware requirements of JTAG briefly in Chapter 1, but you might want to look at the BeagleBone White instead. It is more expensive, largely because it has USB JTAG debugging. Derek.
Hi Derek! I am trying to use the function clock_gettime(..).in Eclipse. I see it is defined under POSIX in the header time.h, which is in the arm-Linux-gnueabihf includes path. However, when I build I get an error “..undefined reference to `clock_gettime’..” Does this cross platform library support this function? thanks
Sorry for the distraction, but I solved it. I am using clock_gettime() which requires entering ‘rt’ as a library on the Project->Properties->C/C++ General->Paths and Symbols->Libraries->Add tab.
trying to install multiarch, the apt-get update returns lots of these errors.
Atingido http://ppa.launchpad.net trusty/main armhf Packages
Err http://br.archive.ubuntu.com trusty/main armhf Packages
404 Not Found [IP: 200.236.31.4 80]
Err http://br.archive.ubuntu.com trusty/restricted armhf Packages
404 Not Found [IP: 200.236.31.4 80]
Hi Vidal, I don’t use Ubuntu for the desktop in the book for such reasons. You will have to seek support on Ubuntu directly from their mailing lists. Derek.
Dear Derek
I am newbie to linux, and I am using this only to study. I can easily reinstall everything to restart.
What debian dist do you think must I use to do the books exercises without pain ? If you have the download link I will apreciate.
Vidal
In time.
I am not using virtual machine. I have a note with a dedicated partition to instal linux.
Vidal
Hi Vidal, https://www.debian.org/distrib/netinst and choose the appropriate architecture, which is most likely to be amd64. Download the Small CD ISO file, which you can use to create an install disk. Derek.
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f4fc997873f, pid=4108, tid=139981352777472
#
# JRE version: Java(TM) SE Runtime Environment (8.0_31-b13) (build 1.8.0_31-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.31-b07 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libgdk-x11-2.0.so.0+0x5173f] gdk_display_open+0x3f
#
# Core dump written. Default location: /home/floaty/eclipse/core or core.4108
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
got this after trying to run eclipse after installing java which seemed to install and return correct version.
java -version
java version “1.8.0_31”
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
Hi Simon. Unfortunately that appears to be a known issue with Eclipse with certain hardware configurations (C [libgdk-x11-2.0.so.0+0x5173f] gdk_display_open+0x3f). See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=430736 for information and a workaround. If the workarounds to not “work”, you may have to roll back to Kepler until it is fully resolved. Kind regards, Derek.
***Emdebian toolchains are no longer supported ***
Hi Derek. Can you just clear a few things up. I have successfully setup a development environment using your origional videos and the cloud rocket tutorial. It was a labour of love but I did manage in the end.
I have been waiting for your book which I now have.
I was going to re flash my bbb to follow your book properly. I have ubunto on my pc and angstrom on my BBB.
I clicked the link in chapter 7 but it says “Emdebian toolchains are no longer supported ” are you aware of this?
Should I still go down this road.
Thanks for your book. Made me feel sane again, especially after reading your note about QT not compiling changes, I was convinced I was doing something wrong.
Thanks Andy
Hi Andrew, Yes and unfortunately the Debian cross-toolchains are presently unstable. I think we are stuck between a rock and a hard place for the moment. I think it is best to stick with the Emdebian toolchains for the moment and I will provide a guide on changing to cross-toolchains when things settle down. The current configuration works fine but it will need an update before too long. Fortunately it doesn’t affect too much in the chapter — all of the Eclipse part still works fine. This book was written for a moving target, which is why I felt that a website was necessary to keep some of the (rapidly changing) content up to date — particularly for this chapter. Let me know how you get on, Derek.
hello again,
im trying to run the arm-linux-gnueabihf-g++ testArm.cpp -o testArm
and the message i get is :
-su:command not found
what should i do?
ok, found it.i should have added arm-linux-gnueabihf-g++-4.7 in the command
Hello
I have a background in electronics and microcontrollers. But I have no experience with Linux.
I hoped this book would get me up with the bb.and linux.
I’m trying to install the toolchain by performing the steps in chapter 7.
But I’m stuck here:
root@debian:~# apt-get install build-essential libc6-armhf-cross libc6-dev-armhf-cross
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libcairo2 : Breaks: libwebkitgtk-1.0-0 (< 2.4.5-2~) but 1.8.1-3.4 is to be installed
libglib2.0-0 : Breaks: glib-networking (< 2.33.12) but 2.32.3-1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
root@debian:~#
A couple of searches in google regarding these erros don't bring me anywhere.
Any idea where I can search?
The step by step approach of the book doesn't say anything about linux problem solving.
In fact, I'm trying to follow the guide for the fourth time from scratch. But I run into troubles
each time.
I have a tought time to accept the fact you have to problem solve in order to install a simple toolchain.
It's like the world on it's head compared to installing a commercial sdk (the likes of PIC, Zilog, Keil).
Sincerely
esprout
Hi Esprout, Yes, it can be difficult to get a cross-development toolchain in place and this is perhaps one of the downsides of a non-commercial deployment. I made explicit reference to this issue at the start of the chapter — there are constant changes and updates that will break any installation process. I released a video at the top of the Chapter 7 web page that shows how I install the full toolchain from start to finish on a completely blank Debian distribution — can you please follow that video and see if it helps you?
Debugging Linux installation problems is so unique to each individual’s platform that it could not be covered within the book — rather the book tries to show you the steps that you should undertake. Libcairo2 is a 2-D vector graphics library — does this relate to a different package that you failed to install on your Debian image? Please try the following steps before trying again:
sudo apt-get clean
sudo apt-get -f install
Start with the video and see how you get on. Kind regards, Derek.
Thank you for your advice, I’ve got it up and running now.
Best Regards
Hi Derek – Great book! It’s really helping me learn about embedded Linux on BBB.
I am installing a cross-compilation toolchain on my Desktop machine (Ubuntu Linux 14.04). Like some others, I had issues with invalid keys when adding the emdebian sources and when I checked the emdebian website I saw a banner stating “Emdebian toolchains are no longer supported…”.
In fact things are very simple on Ubuntu Linux – all the necessary cross-compilation packages are available in the default distribution. The apt-get install statements listed near the top of page 254 all work without needing any changes to /etc/apt/sources.list. For more information on Ubuntu Linux’s support for cross-compilation, see:
https://wiki.ubuntu.com/ToolChain#Cross_development_toolchain
All the best, Tony
Thanks Tony — that is great to know. Derek.
Hi Dr Molloy. I very much appreciate your videos and your new book! I have successfully setup Eclipse for cross-compilation on a desktop running Debian in Virtual Box. I have also setup remote debugging.
The debugger works and produces no errors, it prints what it should on the console, makes the correct logic jumps within the code (running “makeLED.cpp” from your code collection). But, when writing to the sysfs file to make usr3 flash, the write is not successful (i.e., “trigger” is not set to “timer” and the delay times are not changed). It throws no errors and to all the world, seems to be executing the lines of code.
If I go directly to the BeagleBone, the code that was copied to the BB post-build, runs and functions correctly. I’d appreciate any thoughts you may have as to the cause.
Thanks.
Kent
Hi Kent, Thanks for the feedback. At a glance sounds like a superuser issue I think. Are you executing the gdbserver as root? Derek.
Thanks for the suggestion. After some tribulations I realized that my remote connection needed to be to root. Now it works great. Thanks again!
This is an amazing book. In chapter 7, I followed all the steps, QEMU’d the thing. The testARM.cpp worked like a champ. Installed Eclipse (which I am familiar with) but when I build and try to run the BBBTest project it i get the follwing error:
“/lib/ld-linux-armhf.so.3: No such file or directory”
I went back and I am pretty sure I followd all the step verbatime (I created a brand new VM in VBox with just the things explained in the chapter).
I did put the paths in the project settings as well (to also include that library link) but nothing.
Thanks for the help
Cos
Thanks Cos. I’m not sure if you are executing the compiled program on the BeagleBone or the VirtualBox image. I checked the BeagleBone and this is what I get for the library. This should be installed by default in the libc6 package.
If you wish to execute the built executable on the Linux VM using QEMU you should try using a shell to go to the build directory in your Eclipse workspace directory and execute it there directly to see if QEMU is invoked. Honestly, executing an ARM executable within an x86 Eclipse instance is not something I have ever tried and I can imagine that there could be difficulties, particularly related to debugging. Apologies if I misunderstood the question, Derek.
Hi Derek,
I think I know what Cos meant as I got the same issue. I followed the Ch7 and got stuck at page 261 “Configuring Eclipse for Cross-Compilation”. I couldn’t get the result as Figure 7-2. Did you get the Figure 7-2 on Linux VM?
Thanks!
Karl
Hi Karl, I had forgotten that. Yes, I did get this output on the Linux VM with QEMU installed. I didn’t actually configure it explicitly — it just happened. It is curious that it is no longer happening automatically and I can’t think what could have changed in the QEMU configuration to prevent this from happening. My comment still stands on debugging though: I’m not sure how a debugger would be configured to work with this configuration — perhaps gdbmulti would work? but I’m not so sure. Interesting! Derek.
Thanks Derek! My built executable can run on the chroot. But it still doesn’t run on the Linux VM ( I went to the build directory in my Eclipse workspace directory and execute it there directly, but same problem). I’m bit confused about the QEMU. Like you said, when I do this (executing an ARM executable on Linux VM), QEMU should be invoked, is that right? Sorry about the stupid questions 🙂 – Karl
Hi Karl, Apologies for the delay in replying, but this issue was much more significant than I expected. There is now a known and very serious issue affecting cross-development tools under Debian Wheezy. As a result, I have added a full new guide to the top of the Chapter 7 web page. I added an optional Step 7 that illustrates the installation of QEMU and how it can be used to execute an armhf application under an x86 platform. Hope that helps, Derek.
Thanks so much for that Derek!
Hi Derek,
in paragraph “Emulating the armhf Architecture” you write that after copying the qemu-arm-static you can chroot into the environment. This fails with the following error on my system: “chroot: failed to run command ‘/bin/bash’: Exec format error”. I’ve found the following site where the chrooting into an ARM environment is explained: https://wiki.sabayon.org/index.php?title=Hitchhikers_Guide_to_the_BeagleBone_%28and_ARMv7a%29
After adjusting and executing the command mentioned in the section “The_ARMEL_interpreter_for_binfmt_misc” I was able to successfully chroot into the Debian ARM environment.
Regards
Martin
Hi Martin, thanks for that. I have added a new guide on the Chapter 7 web page that relates to the installation of the cross-compilation tools under Debian Jessie in order to deal with the serious server problems that are now described at the top of that page. Your feedback was very useful. Kind regards, Derek.
Love the YouTube stuff, just got the book. Thanks for all this! I presume this nastiness after an apt-get update is related to your note above:
W: Failed to fetch http://www.emdebian.org/debian/dists/unstable/Release Unable to find expected entry ‘main/binary-armhf/Packages’ in Release file (Wrong sources.list entry or malformed file)
Am I better off waiting for emdebian.org to put the Wheezy bits back or should I bite the bullet and go Jessie?
Hi Scott, I haven’t spent enough time with Jessie so far to really advise properly, but my initial experience was good, especially in relation to the cross-compilation functionality. I still haven’t tried installing a change root or doing anything with Qt. I get the impression from the Debian website and discussion forums that the appetite isn’t there to fix Wheezy, as they are short handed and focused on Jessie. Maybe I’m reading it completely wrong. I’m going to play with Jessie for a while — if you are using a VM installation then give Jessie a try. If it’s your day-to-day mission-critical work machine, I would think twice. Thanks for your support! Derek. P.S. Thanks for your kind review on Amazon — much appreciated!
Happy to do my part. It’s a great resource.
I’ve installed Jessie. Seems harmless, however after spending the evening getting Boost installed in my cross compile environment, I’m wondering if I need to move the BBB to Jessie as well?
/root/RemoteBuilds/Totem: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.20′ not found (required by /root/RemoteBuilds/Totem)
sudo apt-get install libstdc++6 says it’s the latest version.
Hi Scott, Yes, I suspected as much. The last time I used Jessie on the BBB there was no capemanager support — that will likely be resolved before too long, but there is a real “stuck between a rock and a hard place” going on here at the moment! I will do a full pass on the book content with the next official release of Debian for the BBB, which is coming soon! Kind regards, Derek.
Hi Derek,
I’ve watched several of your videos in depth and they are great. The problem I’m having is that I’m fairly new to Linux (know just enough to be dangerous), been in electronics all of my life though. Trying to develop a project using the BBB and can’t seem to even get started. All of the information I’ve found is OLD and no longer available, and I’ve spent literally weeks trying to get something going. I was pleased to find that you have started a new section for those trying Debian Jessie. I have a fresh install of Debian-8-Jessie-RC1 running in VM Virtualbox and it shows…
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: Jessie
I’ve performed the steps above all the way thru the “sudo apt-get update” without any issues. On the next step of
“sudo apt-get install crossbuild-essential armhf” I get the following errors…
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:
The following packages have unmet dependencies:
crossbuild-essential-armhf : Depends: libc6-dev:armhf but it is not installable
Depends: gcc-arm-linux-gnueabihf (>=4.9.1-1) but it is not going to be installed
Depends: g++-arm-linux-gnueabihf (>=4.9.1-1) but it is not going to be installed
Depends: dpkg-cross but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Can you help me move past this point? Where I need to be is cross compile capability to the BBB and would like to get QT Creator/Designer up running. My development machine is Windows 7 Ultimate- 64 bit, I7-950 (3.07ghz), 24gb onboard ram, 250gb ssd for OS, 3x1TB Ultrastar drives in Raid5, using Oracle VirtualBox 4.3.22 for the Debian machine.
Thanks!
Anthony
Hi Anthony, I’m not sure what is happening there — I literally only wrote that guide today using Jessie and it all worked perfectly — I hope it hasn’t broken already! Can you please double check the stages in Step 2 above? It is like as if the crosstools.list entry is not being picked up correctly. Please check that the file has the exact line:
And that you achieve a successful outcome for this command:
Then perform an update. The reason I suspect those entries is because the package “libc6-dev:armhf” is being picked up for my installation. Also, I’m not certain that you have to perform the step on adding armhf as a foreign architecture (Step 5) in order to get a successful outcome but it is worth doing anyway. Can you please let me know how you get on, or if you spot the problem so that I can advise others. Thanks, Derek.
Just installed the cross build tools on my Jessie desktop per the new step by step instructions. worked perfectly. Perhaps Anthony needs to apt-get clean and redownload the packages?
Hi Derek,
I went back and absolutely verified that the crosstools.list entry is exactly as in the steps above. The curl command was successful. I even tried Brad’s idea above with the “apt-get clean” and redownload and got the same results.
So I had an idea. When installing my version of Debian-Jessie, I had download the entire 3xDVD set of RC1 and installed from that. It only wanted me to install the first of the DVD’s so I stopped there and didn’t install the remaining DVD’s. I decided to start from scratch just to be sure.
I created a new VM, assigned it some 60gb of space w/8gb of avail memory. This time, I downloaded the netinstall version instead of using the full version. I’m currently installing and will re-attempt the same processes above and let you know the outcome. My thinking is that something may be different using the full DVD set or is it possible that something may be different in the US mirror vs the mirror that you are using? I’ll post the results in a little bit.
Thanks
Anthony
Hi Anthony, I performed a net install using debian-jessie-D1-rc1-amd64.netinst.iso and I used a US localization (rather than Irish) to try to be as applicable to as many people as possible. In my /etc/apt/sources.list all of my entries have a http://ftp.us.debian.org or security.debian.org location. Hope that helps, Derek.
Hi Derek,
Just to let you know, it does appear that there is some problem that I don’t quite understand when installing using the debian-jessie-DI-rc1-amd64-DVD-1.iso. Last night, I did create a separate VM and installed just as you described in your last post using the netinst.iso and it went perfect. I did have one hiccup as I did install curl but forgot to import the correct key. After fixing that… all was great.
I then went back and re-downloaded the dvd series and put them on actual dvd’s. I then reinstalled using them on the previous VM, ran into the same problem again. So then I decided to try it a different way installing, using the downloaded .iso images from a separate SSD raid array that I have here and guess what… same problem. So unless somebody can figure out what is happening, I’d recommend NOT to use the dvd .iso’s but use net install instead.
I want to thank you again for all of your help and such quick response. I am very new to linux and C++ and probably taken on a task to come up with a solution and while I can definitely do the electronics portion of the project from the initial design thru the final hardware stage, the coding to make it work is going to be a real challenge. I’ve never been scared of a challenge. Project will be in multiple stages of development but in short utilizing as many as 64 digital inputs via i2C bus (4x MCP23017 surface mount), multiple rs-232 ports to send commands to a digital 2-way trunking system via radio, FIFO buffering of commands, input cross reference table(s) and future stages are supposed to include direct udp communication to the trunking system itself via microwave, touchscreen interface for configuration, and add’l boards for analog inputs (0-20vdc & 0-100mv for use with current shunts), digital outputs, temp sensors, etc. I’m sure in another blog I might need to ask your help again. I’d love to be able to participate in your class where you lecture however it might be a rather long daily commute between Ireland and the United States.
Again, Thanks
Anthony
ps I’ve already ordered your book from Amazon, can’t wait till it gets here.
I got the same error as Anthony where it could not find some packages when installing crossbuild-esssential-armhf. I got it to install by adding unstable to my sources (deb http://ftp.debian.org/debian unstable main). Then, I compiled the small code snippet given by Derek and ran it successfully on my BeagleBone Black.
Derek, there seems to be a typo in the code you posted, is missing after #include.
I meant to say that iostream (/) is missing after #include. I think you need to escape the greater than and smaller than symbols or else they don’t appear on the webpage.
Thanks Samuel, I have fixed that. The site automatically parses out angle brackets to prevent code injection — I just have to remember to keep adding them back in! Thanks, Derek.
Hi Derek,
I’ve bought your book it is a good guide line in working with the BeagleBone.
I have the same problem as: Anthony March 1, 2015 at 10:25 pm
Did not solve the problem yet, also not by repeating the steps as you suggested.
Have you got any update on solving this issue?
With Kind Regards,
Hans Dam, Netherlands
Solved by including deb http://ftp.debian.org/debian unstable main suggestion from samuel austin
Hi Derek,
Love your book and the videos. I am trying to build a cross build environment and followed your steps *exactly* as your Debian 8 Jessie description, including build the VM. In step 2, I can verify the correct output, but I got the same error as in Anthony message:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
crossbuild-essential-armhf : Depends: gcc-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
Depends: g++-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
When I start looking some individual packages, I notice some version has changed to 4.9.2… I am new to Linux, but I am wondering if the tools has update on the repo in the past couple of days and made the installation broken…
I built another VM on a different computer, and got the same result…
Thanks
Thanks Wayne, Yes, a few people have had this problem and I need to look into it. Have you tried adding “deb http://ftp.debian.org/debian unstable main” to the sources as suggested by Samuel in the comments and then performing an apt-get update? Please let me know if that works for you and I will update the guide. Kind regards, Derek.
Hi Derek,
Adding”deb http://ftp.debian.org/debian unstable main” worked perfectly!
Thanks again for the wonderful book and videos!
Regards,
Wayne
Thanks Wayne (and all), I will update the guide. Derek
Hi Derek,
Did you ever succeed in installing code composer on your virtual debian machine?
I did not succeed.
I would like to use the C compiler TI has released for programming the PRU.
With kind regards,
Hans
Hi Hans, unfortunately no. I only installed the compiler on the BeagleBone itself. I found writing C code for the PRU-ICSS to be much more complex that writing assembly code so I wasn’t hugely motivated. I’m sure that will improve over time, but for the moment it is a difficult task! Kind regards, Derek.
I am using arm-linux-gnueabihf-g++ to compile my code. A simple Hello World program. According to the last command line on pg 252 I am running VERSION=”8 (jessie)” on my x86 desktop and VERSION=”7 (wheezy)” on my BeagleBone. When I compile the code with the above compiler the code runs on both machines ???
I understand that they have different architectures, machine code, etc. and this shouldn’t happen. So how am I getting fooled here ?
Hi Mike, did you install QEMU? (page 258 or the guide on the Chapter 7 web page). If you did (or it is installed already) then QEMU will automatically detect that you are trying to run armhf code on your x86 machine and it will emulate the armhf architecture on your x86 machine. You can test if QEMU is installed using:
molloyd@DebianJessieVM:~/$ dpkg -l|grep qemu
ii qemu-user-static 1:2.1+dfsg-11 amd64 QEMU user mode emulation binaries (static version)
Hope that it is it — or I am fooled too! Kind regards, Derek.
Derek,
Yes that command shows it is installed. I do remember installing it and then I had to go and back up in the chapter because something wasn’t working right. Thanks, now I’ll just have to figure out how to shut it off. Things are making sense again.
Thanks again,
Mike
Hi Derek, Is there a simple way of getting Boost installed in my cross compile Eclipse environment?
Thanks to your great book and guidelines, I am all setup under Wheezy 7.0 (Eclipse CDT armhf crosscompiling as well as GDB remote BBB debugging)
But in order to fully benefit from C++, installing BOOST libraries under Eclipse would be great, but there is no simple guide to do this actually…
Cheers and thanks again for this great book.
Jean-Francois
Hi Jean-Francois, third-party libraries are always problematic! The easiest way is if Boost installs under a multi-package install (this is more likely to work under Jessie than Wheezy). Other than that you may have to download it directly from Sourceforge and build it directly using your cross compiler. However, you run the risk that the version on the BeagleBone is incompatible with the version on your desktop computer. The easiest way to address this is to find out the version of Boost on the BeagleBone (e.g., using something like “dpkg -s libboost-dev | grep Version”) and download the source for that version of Boost. As I said, third party libraries are never easy and it could take you some time to get everything in place! Kind regards, Derek.
Great job. I think I must buy your book. Just one question at this point – what is the significance of adding the armhf architecture with the “dpkg …” command? Is it only needed if you “install” a cross-toolchain? In my case, the linaro tool chain was included with a TI SDK that I installed and that architecture wasn’t “added”, but things seem to work (mostly). I did need to add i386 architecture and install some packages to get Eclipse to install.
Hi Derek, Excellent book & accompanying videos. I have followed through the setup of Eclipse for remote debugging and finally got it all to work. I used my existing Eclipse Luna for Java SE, with hindsight not a good idea. At one point I got stuck for a number of hours with Remote connection failure errors when attempting to connect to my BBB:
“Connect”. loader constraint violation: loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) previously initiated loading for a different type with name “com/jcraft/jsch/Session”.
I believe these are caused by conflicting & different versions of the same plugins, In the end after several wasted hours, I did a complete re-install of Eclipse Luna for Java SE, re-installed all the required C++ and RSE plugins and everything worked fine. For the record these are the plugins you will need to install if you want to use Eclipse Java SE:
C/C++ Autotools Support
C/C++ Development Tools
C/C++ GCC Cross Compiler Support
C/C++ GDB Hardware Debugging
C/C++ Remote Launch
Remote System Explorer End-User Runtime
Remote System Explorer User Actions
Thanks Andy, that is very useful. Derek.
Hi,
I was given the same error message Andy received when I tried to connect.
To resolve the problem instead of re-installing Eclipse I navigated to the location I installed Eclipse in and searched for
“jcraft” (as in jcraft in -> “com/jcraft/jsch/Session”). This search returned two jar files whereupon I cut the oldest one out of its location and placed it in a backup folder (in case I needed to put it back where I found it).
After doing this I was then able to connect to a Linux Desktop from my Windows PC
Hope this helps.
Stephen
Hi Stephen, That is good to know (even though I have no idea why it is happening!) and great to know that other DCU Schools are working on this topic! Thanks, Derek.
Hi
Thank you for your informative book.
I followed the exact steps in chapter 7 for cross compiling with eclipse. and everything sounds work except the output. when I run my hello word (which I named it as test3) I get noting in output console what should I do to fix it?
Thank You
Iman
Hi
I saw in you book when you setup everything you run the program and in figure 7.2 !!hello world!! shows up.
But i couldn’t reproduce that output.
I just Moved on and went to the next section and as you explain, I put the program on BBB and in this time it’s work.
When I see your youtube video I noticed you said hello world program is not working on PC.
I’m wondering is this the text error on your book or my system has a problem?
Thank you
Iman
Hi Iman, for the ARM program to execute on your desktop machine you must follow the steps on installing QEMU. See Step 6/7 at the top of the page or pages 258/259. It’s not too important to have QEMU installed if you are building for a physical BeagleBone board, so I wouldn’t spend too much time on it. Kind regards, Derek.
Hi Derek,
Thank you for your clarification.
Iman
Hi Derek,
there’s a typo on page 263 (chapter 7) for the include paths: instead of /usr/include/arm-linux-gnueabihf/…, you have written /usr/arm-linux-gnueabihf/include/…
Anyway, IMHO the best book to learn embedded software development under Linux in a professional way and well worth its money!
Kind regards
Frank.
Thanks Frank for your kind words. Yes, it moved. I have added it to the list of errata. Kind regards, Derek.
Hi Derek,
I’m still having trouble installing the crossbuild tools on debian 8 (Jessie) desktop in spite of your very clear instructions.
When I run sudo apt-get install cross-build-essential-armhf I get:
The following packages have unmet dependencies:
crossbuild-essential-armhf :
Depends: gcc-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
Depends: g++-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
If I run sudo apt-get install gcc-4.9-arm-linux-gnueabihf I get:
The following packages have unmet dependencies:
gcc-4.9-arm-linux-gnueabihf :
Depends: libgcc-4.9-dev:armhf (=4.9.2-10)but 4.9.2-15 is to be installed
Recommends: libc6-dev:armhf (>= 2.13-5) but it is not going to be installed
I started again with a new download of debian repeated all the installation steps and still got the same results. This doesn’t guarantee that I followed the instructions correctly but it gives me some confidence I did.
I can successfully cross-compile and deploy from Eclipse running on Windows 7 using the linaro toolchain but I’m trying to set up a debian VM to more closely match your terrific book.
Any ideas?
well this seems to be broken now the 3rd of may
everything was going well till the update of sources
Err http://ftp.debian.org unstable/main armhf Packages
resulting in
root@debian8:/etc/apt/sources.list.d# apt-get install crossbuild-essential-armhf
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
crossbuild-essential-armhf : Depends: gcc-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
Depends: g++-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
so now what do we do.
Hi there, I have updated the process above and I tested it today (4th May) under Debian Jessie. The only thing I have changed is to remove the addition of deb http://ftp.debian.org/debian/ unstable main to the sources.list file. You should be able to remove that line and perform an apt-get update to fix your configuration. The reason for this change is that Debian Jessie went official on the 26th of April. Hopefully this stays stable for quite some time as I have to reinstall a new image to test it each time! Hope that helps. Please let me know how you get on. Kind regards, Derek.
The Debian package docs say:
Package A depends on Package B if B absolutely must be installed in order to run A. In some cases, A depends not only on B, but on a version of B.
That makes me wonder if in the error message
“Depends: libgcc-4.9-dev:armhf (=4.9.2-10)but 4.9.2-15 is to be installed”
could be the cause of the problems.
May be a red herring; this is really kind of above my pay grade.
Hi Ron, I have updated the process above and I tested it today (4th May) under Debian Jessie. The only thing I have changed is to remove the addition of deb http://ftp.debian.org/debian/ unstable main to the sources.list file. You should be able to remove that line and perform an apt-get update to fix your configuration. The reason for this change is that Debian Jessie went official on the 26th of April. Hopefully this stays stable for quite some time as I have to reinstall a new image to test it each time! Hope that helps. Please let me know how you get on. Kind regards, Derek.
I am having the same problem….
debian:~$ sudo apt-get install crossbuild-essential-armhf
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
crossbuild-essential-armhf : Depends: gcc-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
Depends: g++-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Hi Mervyn, I have updated the process above and I tested it today (4th May) under Debian Jessie. The only thing I have changed is to remove the addition of deb http://ftp.debian.org/debian/ unstable main to the sources.list file. You should be able to remove that line and perform an apt-get update to fix your configuration. The reason for this change is that Debian Jessie went official on the 26th of April. Hopefully this stays stable for quite some time as I have to reinstall a new image to test it each time! Hope that helps. Please let me know how you get on. Kind regards, Derek.
Glad (sort of) to see I am not the only one having this problem. The iso file I have used for the debian install is
debian-8.0.0-amd64-netinst.iso
I am having the same issue as Mervyn, wulfman and Ron.
Hi there, I have updated the process above and I tested it today (4th May) under Debian Jessie. The only thing I have changed is to remove the addition of deb http://ftp.debian.org/debian/ unstable main to the sources.list file. You should be able to remove that line and perform an apt-get update to fix your configuration. The reason for this change is that Debian Jessie went official on the 26th of April. Hopefully this stays stable for quite some time as I have to reinstall a new image to test it each time! Hope that helps. Please let me know how you get on. Kind regards, Derek.
Derek, that worked for me! Leaving out “deb http://ftp.debian.org/debian/ unstable main” did the trick! Thanks.
Success! Thanks, Derek, for the quick fix. And thanks for the terrifically useful book and support materials. (It’s even a good advertisement for Dublin City University.)
last time i did much C programming was on a univac 1100 in the 80s but i can see the error that #include needs a filename but it worked for you ?
root@debian8:~# arm-linux-gnueabihf-g++ testARM.cpp -o testARM
testARM.cpp:1:9: error: #include expects “FILENAME” or
#include
^
testARM.cpp: In function âint main()â:
testARM.cpp:3:3: error: âcoutâ is not a member of âstdâ
std::cout << "Testing Toolchain" << std::endl;
^
testARM.cpp:3:39: error: âendlâ is not a member of âstdâ
std::cout << "Testing Toolchain" << std::endl;
Hi there, the angle brackets are sometimes removed by WordPress and sometimes they are not! There should be a < iostream > after the #include. I have fixed the text. Kind regards, Derek.
Hi Derek,
Editing the sources.list file worked a treat for me. Many thanks for the great book and the great support you provide. Regards, Mervyn.
Hi Derek …
For days I was struggling with the same two unmet dependencies as reported on May 4 by Ron Burke, wulfman, and Mervyn. Finally today when I visited this page I was excited to see that there was a fix for this. So I went ahead and removed the “unstable” line from my sources.list file, and did an apt-get update followed by the install.
However, unfortunately, the fix is not working for me; in fact, I now have one additional unmet dependency, for a new total of three:
conib@debian:~$ sudo apt-get install crossbuild-essential-armhf
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
crossbuild-essential-armhf : Depends: libc6-dev:armhf but it is not going to be installed
Depends: gcc-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
Depends: g++-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
conib@debian:~$
I then tried doing an apt-get clean, then an update followed by the install but still no dice. Same three unmet dependencies.
I then tried doing an apt-get dist-upgrade, then an update followed by the install but I still got the same three unmet dependencies.
While I’ve been waiting for these jessie problems to resolve I’ve been able to successfully run a “Hello World” app cross-built with a Linaro toolchain under Win 7 SP1 both via command line (cygwin bash shell) and via Eclipse CDT so I’m not exactly dead in the water. But I would very much like to get cross-development for the BBB going in Debian jessie (VirtualBox hosted on my Win 7 SP1 workstation).
Hi Conib, I’m not sure what is going wrong there. You should check Step 2 above again in case that there is a typo somewhere. Also, I don’t know if it is any help, but I just released a video on this topic: https://www.youtube.com/watch?v=T9yFyWsyyGk Kind regards, Derek.
Thanks for your help with this issue! I double-checked the spelling (one more time) in step 2, and watched your new video up to the start of the Eclipse install. Nothing seems amiss on my end until I attempt the crossbuild-essential-armhf install, which still abends exactly as I posted earlier.
I’ve been trying to back-track through the dependencies, trying to debug what’s screwing up to see at what point I’m able to actually install something in the chain. No luck there, but I am seeing something strange when I get to libgcc1:armhf
conib@debian:~$ sudo apt-get install libgcc1:armhf
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgcc1 : Breaks: libgcc1:armhf (!= 1:5.1.1-2) but 1:4.9.2-10 is to be installed
libgcc1:armhf : Depends: gcc-4.9-base:armhf (= 4.9.2-10) but it is not going to be installed
Breaks: libgcc1 (!= 1:4.9.2-10) but 1:5.1.1-2 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
conib@debian:~$ sudo apt-cache policy libgcc1
libgcc1:
Installed: 1:5.1.1-2
Candidate: 1:5.1.1-2
Version table:
*** 1:5.1.1-2 0
100 /var/lib/dpkg/status
1:4.9.2-10 0
500 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages
conib@debian:~$
It *seems* to be saying that I’ve somehow got a version of libgcc1 that’s newer than what’s on debian.org, and that’s what’s making everyone unhappy. (Unfortunately I’ve only barely got a clue about this stuff, so it’s probable that I’m misunderstanding this whole mess.) Am I on the right track with it, or way off base?
Anyway, I then attempted to uninstall libgcc1 but it wouldn’t let me do that because of dependencies. When I attempted to back-track those dependencies from libgcc1 to find something that *would* uninstall I eventually got to multiarch-support. That opened up a can of worms! So I punted.
I really don’t want to reinstall Debian from scratch if it’s not necessary but at this point I simply don’t have the knowledge needed to debug and repair this issue.
Any further pointers/insight/critique would be hugely appreciated.
Hi there, you are definitely taking a valid approach to solving a difficult problem. Unfortunately I think that this problem can be caused by upgrading a pre-release distribution. Like you I would locate any “broken” packages and then remove them. Unhold any held packages using sudo apt-mark unhold XXX. Double check the logs in /var/log/apt in case that they give you an additional clue about what is going wrong. If the alternative is a re-install I think that you should ruthlessly remove packages (e.g., using the -f flag in apt-get) in the hope that you get back to a point from which you can begin installing again — make sure you back up any files before doing that. I hope something there works, Derek.
After looking into this issue some more, it appeared to me (from the couple of google hits on the library name and its rev number) that libgcc1 v1:5.1.1-2 0 was the current rev of that particular library for “jessie unstable”. It then occurred to me that the wrong libgcc1 was probably downloaded and installed into my jessie stable installation when the “deb http://ftp.debian.org/debian unstable main” line was still present in my /etc/apt/sources.list file. With that thought, I began thinking that if that was indeed what had happened, then this particular gotcha may only be the first issue, that there may be more unwanted items that were erroneously installed and were not (yet) apparent.
So I decided to punt and just do a new install. I also decided to create a shared drive between my host Win 7 SP1 and my Debian jessie VirtualBox installation, so in the event that I needed/wanted to start from scratch again I would at least have all my working files readily available to both OSs as well as to a new installation. (I made good use of that shared drive during this re-install: I created the shared drive for the old installation, and copied onto it as many config files and other useful stuff — .bashrc, .vimrc, the eclipse download, notes, etc. — as I could think of onto it.
I then created a new VirtualBox Debian jessie installation and configured it. And today I finally finished going through your video and am going forward with Chapter 7 in your excellent book.
Your book, and the video I just finished, have saved me truly countless hours of flailing. I really can’t thank you enough.
Excellent. Thanks for the update, Derek.
Not sure if it’s helpful.
1) It might be easier to set up the new sources file by saying (if people are cutting and pasting the code)
` echo “deb http://emdebian.org/tools/debian jessie main” | sudo tee /etc/apt/sources.list/d/crosstools.list
2) Instead of installing curl you can use `wget -O -`
Great book. I bought a copy.
Thanks Alec, great points! Derek.
From yesterday I tried this many times. When I do:
sudo apt-get update
I got :W: Failed to fetch http://emdebian.org/tools/debian/dists/jessie/main/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://emdebian.org/tools/debian/dists/jessie/main/binary-armhf/Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/emdebian.org_tools_debian_dists_jessie_main_i18n_Translation-en%5fUS.gz Invalid file format
W: Failed to fetch gzip:/var/lib/apt/lists/partial/emdebian.org_tools_debian_dists_jessie_main_i18n_Translation-en.gz Invalid file format
Anyone can help please? Thanks!
Hi there. Hash sum mismatches can often be fixed by cleaning up your apt lists. Use the following steps:
molloyd@debianJessie:~$ sudo rm -r /var/lib/apt/lists/*
molloyd@debianJessie:~$ sudo apt-get clean
molloyd@debianJessie:~$ sudo apt-get update
Alternatively, I would suspect a proxy problem. Kind regards, Derek.
Hi Derek, Thanks for the reply. I did those, it doesn’t work. I did everything in my company, does the company network do something bad for it?
Hi Bing, it is difficult to know, but a company firewall is a common cause of that problem. Kind regards, Derek.
Hi Derek, I got success to update package index at home. So, I think you are right. Thank you for the reply.
Hi Derek,
I was just wondering if this installation would work for the Raspberry Pi or would I have to install a different version of the ARM cross-compiler?
Regards,
Mervyn
Hi Mervyn, I believe that it should work fine, particularly if you are using Raspbian as it has ARMHF support. Kind regards, Derek.
Hi, Derek I’ve just follow all your instructions, but when I tried to compile test.cpp I’ve got these two linker errors
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libstdc++.so: undefined reference to `__cxa_thread_atexit_impl@GLIBC_2.18′
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libstdc++.so: undefined reference to `clock_gettime@GLIBC_2.17′
collect2: error: ld returned 1 exit status
Can yo help me? Thanks
Hi Javier, I’m afraid I have not seen that problem before on test.cpp — from the look of the error it looks like you have added timing code and need to add -lrt to the g++ call in order to include the real-time library. I’m not sure why that is the case. Kind regards, Derek.
Hello Derek;
I’m from Argentina and is very difficult write and talk english for mi, but i will try to explain mi problem as best as possible. Sorry.
I’m using Ubuntu 14.04.02 now, and this tutorial not works with Ubuntu. I have been working a lot for for it work, but i haven’t been able to do it. I remember, that you have a similar tutorial with Ubuntu. ¿Could you give me this tutorial?. Please.
Thanks.
Cordials regards.
Gevasoni, Bruno.
Hi Bruno, there is a video on the YouTube channel that uses Angstrom. However the instructions are now outdated and are unlikely to work. I would highly recommend that you use Debian desktop for cross developing to the BeagleBone Debian distribution. The steps are almost the same for Ubuntu desktop (with the exception of the cross-compiler). Watch the video on this page so that you understand the broad steps and then seek out an Internet guide for Ubuntu Desktop that will provide you with the differences. Kind regards, Derek.
Hi Derek, I have a problem when I start to build all my project using parts of your book in Eclipse. I tried to build the test_callback.cpp example of GPIO in chapter 6 in Eclipse but it always shows me errors like these:
“reference at ‘pthread_create’ without define” —-> for this code line: “if(pthread_create(&this->thread, NULL, &th…….)” inside “int GPIO::toggleOutput(int numbersOfTimes, int Time)” in GPIO.cpp
The same error in GPIO::waitForEdge(CallbackType callback).
(Errors were in Spanish I translate to english “referencia a ‘pthread_create’ sin definir”)
Algo one warning:
“Member “thread” was not initialized in this constructor” inside “GPIO::GPIO(int number)” in GPIO.cpp
I can’t do nothing, please need your help.
Hi Carlos, It is not that clear from your description, but I think that you need to add -pthread to your build options in Eclipse to match the build script in the directories and you need to check carefully that the code has not changed (especially if you broke it into multiple files). Kind regards, Derek.
Hi Derek,
i gone through your whole book, but no where i found the program code for timer interrupt in user space.
could you please provide me the link or any sample code of any frequency if you have? please.
Thanks in advane
Hi there, I’m not sure that I understand the questions, but interrupts are not easily supported in Linux user space and for that reason it is not covered in the book. Kind regards, Derek.
Hi Derek,
I would like to generate 1msec timer interrupt of anyone from four Timers available in beagleBone Black through GPIO pin from user space.
Meaning for every 1msec timer interrut should get generated when we assign GPIO as timer interrupt. for that i didn’t found any sample C code.
Rakesh K
Hi there,
In Set up the build environment and then build u-boot STEP i am Getting Below ERROR:
~/u-boot$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
~/u-boot$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x_evm_config
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:106:23: fatal error: sys/types.h: No such file or directory
#include
^
compilation terminated.
scripts/Makefile.host:91: recipe for target ‘scripts/basic/fixdep’ failed
make[1]: *** [scripts/basic/fixdep] Error 1
Makefile:395: recipe for target ‘scripts_basic’ failed
make: *** [scripts_basic] Error 2
I also went through latest document for process update:
http://eewiki.net/display/linuxonarm/BeagleBone
Same error is coming.Please Help for solving the task.
Hi, just tried it there and it builds perfectly under Debian Jessie. It appears that your desktop Linux setup does not have the standard Linux headers — it should be default if you have followed the steps in the book to this point. Regards, Derek.
Hi ,
I give it up after having wasted 2 beautiful weekends with Mint, Wheezy, Jessie,
VMware, virtual box, guest additions, vmware tools, defective key rings. Nothing
fits together, files that cannot be found, guest additions that seem not to exist for
Jessie, so the display is like a VGA keyhole and copy and paste from the host
does not work, graphics scaling is done by cpu…
Why can’t there be a prepackaged virtual machine somewhere that has just
the cross compiler, Eclipse, debugger and that’s it? As it’s now, everybody
has to pick up the pieces, and they are a constantly moving target.
I should have stayed with ssh, vi and native gcc on the BBB, then my few
port bits would work by now.
Setting up my daughter’s Win8.1 was a fast and surprisingly pleasant
experience in comparison, and I’ve been on Unix since PDP-11 times.
regards, Gerhard
Hi Derek,
In building a BB Kernel above, under “Downloading a Root File System” – the link http://rcn-ee.net/deb/minfs/ -gives 404 Not Found – URL /deb/minfs/ was not found on this server.
Poking around I found http://rcn-ee.net/rootfs/eewiki/minfs/ – I’m guessing these are the required files… Yes??
Thanks Rod, I have updated the guide with the new URL. Kind regards, Derek.
In attempting to create a bootable SD card I ran into a couple of issues. I was able to solve one of them, but would like some input on the other.
In order to partition the SD card, I used
conib@debian:~/git_repo/BBB$ sudo sfdisk –in-order –Linux –unit M ${DISK} < 1,48,0xE,*
> ,,,-
> __EOF__
and that worked out to create the two partitions that appear on our existing BeagleBone Black SD cards.
However, I’ve been struggling with the uEnv.txt file. Robert’s new system (see https://eewiki.net/display/linuxonarm/BeagleBone+Black) dd’s the x-loader and u-boot into the MBR and has eliminated the FAT16 boot partition altogether. It turns out (see https://eewiki.net/display/linuxonarm/BeagleBone+Black+Comments, Robert’s May 18 2015 post) that the virtual linux instances we’re all running won’t write raw onto SD cards and so this new system just isn’t a happenin’ thing for us.
So, I’ve been trying to figure out if it’s possible to create a bootable SD card configured “the old way”, with the MLO, u-boot.img, and zImage files in a FAT16 partition. Unfortunately, the uEnv.txt file you’ve spec’d above doesn’t work — uBoot can’t find the kernel, and so goes ahead and loads the one in eMMC.
Can you help?
Well okay, the sfdisk partitioning command got munged in my post. The double less-than followed by a dash then double underbar then EOF then double underbar then carriage return completely disappeared from what should have been the end of the first line. It should have preceded the less-than followed by 1,48,0xE,* that appears at the end of the first line, which in turn should have appeared on the next line, with its initial single less-than being the “continue” prompt from sfdisk. Hope that makes sense.
Hi there, very interesting. I looked through Robert’s new instructions and they are now much more straightforward in relation to preparing the SD card (https://eewiki.net/display/linuxonarm/BeagleBone+Black). I think that the new way is much better and I wouldn’t revert back to the instructions on this page. I’m not sure how to adapt the instructions here as the use of /boot has changed significantly and it’s not clear how that will affect the new kernel. I think that I’ll shortly remove the instructions on this page and direct people to Robert’s new process. Kind regards, Derek.
Hey, nice book!
I’ve also been struggling with getting arm binaries to run under the x86 (and Eclipse) environment as described in chapter 7, even with the help provided here (and updated Optional Step 7) on Ubuntu 14.04.
I found hints that led me to set the QEMU_LD_PREFIX variable here:
https://wiki.debian.org/QemuUserEmulation
http://nairobi-embedded.org/qemu_usermode.html
so that from a command prompt I can run the arm binaries
>export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf”
>./BBBTest
!!!Hello World!!!
And in Eclipse (Luna) creating an Environment Variable in the Launch Configuration
Project->Properties->Run/Debug Settings->BBBTest->Edit…
Select the Environment tab and create a New Environment Variable
QEMU_LD_PREFIX with the Value “/usr/arm-linux-gnueabihf”
And things then work “as advertised”
(I had started with Eclipse Mars and things seemed even “worse” so backed off to Luna which you use in the book).
-Ken
Thanks Ken, that is very helpful and good to know, Derek.
Thanks Ken. I had no trouble getting Eclipse to cross-compile the code, but was having a heck of a time getting it to run using QEMU. Adding that single environment variable to the Run As configuration in Eclipse did the trick.
Hi Derek,
I am struggling with one problem.
Currently i am measuring external frequency signal (Less than 1KHz ie 80Hz) via GPIO input pin by detecting rising Edge.
Meaning 80Hz external frequency signal connected to GPIO input pin.
i would like to measure higher external frequency signal (more that 1KHz) via GPIO input pin by detecting Edge rising.
Could you please tell me how could you do that?
Please HELP……Many Thanks.
Hi Rakesh, that is covered in Chapter 6 and Chapter 13. Kind regards, Derek.
Hi Derek, I have a problem with the Remote System in Eclipse Mars, the option ‘Ssh Terminal’ at the end of the New Connection setup is missing, where one should be able to press ‘Next’ to see the Ssh Terminal option selected by default, the ‘Next’ button is grayed out. This happened both in the Mars installation locally on the PC and in the VirtualBox, however in an older Eclipse Kepler installation the option is present and shows in the left Remote System panel! Very strange… Any ideas? Is there something wrong with the Eclipse Mars distribution? Also thank you for these great tutorials and your book! Stephan.
To add to my previous question: The older Eclipse Kepler installation is locally under Windows 7, not under VirtualBox.
I had to install ‘New Software’: ‘TM Terminal’, then one can select ‘Open Terminal’ under the Ssh Shells. Then it asks for user name & password and it connects to the BeagleBone just fine! But there is still no Ssh Terminal’ option.
Thanks Stephan, with Mars you only have the standalone terminal window as you have stated and the “SSh Shells” option in the Remote Systems panel. I’m not too keen on the UI for the SSh Shells panel though. Kind regards, Derek.
I uninstalled Eclipse Mars and installed Luna instead…
So now the Ssh Terminal works as shown in your video!
For some odd reason, when restarting the VirtualBox and the opening Eclipse, it would not find the previous generated project files in the workspace. However, it would find them if I would just exit Eclipse and then restart it again without closing the Virtual Machine. I tried many things but only after I selected the option ‘Save the machine state’ when closing the Virtual Machine, Eclipse would then open the workspace with the stored project files! I wonder if I missed this step somewhere in the tutorials or if something went wrong with my Virtual Machine & Eclipse installation? Everything works now perfectly!
Hi Stephan, I have never seen that issue before — thanks for letting us know the solution in case that it happens to someone else, Derek.
Dear Derek,
Your book, web and videos are fantastic.
About the Cross-Compilation I have the Fedora 22 installed on my laptop.
I’ve installed the arm-linux-gnu-g++ from https://apps.fedoraproject.org/packages/cross-gcc but when make the:
arm-linux-gnu-g++ test1.cpp -o test1
The result is:
test1.cpp:1:20: error fatal: iostream: No existe el fichero o el directorio
compilación terminada.
This is the program:
#include
int main(){
std::cout << "Testing Toolchain" << std::endl;
return 0;
}
What is the trouble?
Thanks,
I’ve found more information about that but I cannot understand:
https://fedoraproject.org/wiki/Packaging_Cross_Compiling_Toolchains
This the arm-linux-g++ version.
BullT@linuxYoga:~$ arm-linux-gnu-g++ –version
arm-linux-gnu-g++ (GCC) 5.1.1 20150618 (Red Hat Cross 5.1.1-3)
Copyright (C) 2015 Free Software Foundation, Inc.
Esto es software libre; vea el código para las condiciones de copia. NO hay
garantía; ni siquiera para MERCANTIBILIDAD o IDONEIDAD PARA UN PROPÓSITO EN
PARTICULAR
Do you recommend me to change from Fedora to Devian?
Hi BullT, I’m afraid that I have never used Fedora so I’m not sure what is happening. It looks like the C/C++ libraries are not installed as part of the cross build tools installations. I don’t know why that would be. Unfortunately, I could only test everything in this book on one distro, and Debian made the most sense for the BBB. Kind regards, Derek.
Thanks Derek,
I’m going to install Debian.
Hello Dr. Molloy;
I recently purchased the second edition of your ExploringBeaglebone book and was flying along, when CRASH the dreaded.
The following packages have unmet dependencies:
crossbuild-essential-armhf : Depends: gcc-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
Depends: g++-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
After trying all the suggestions in the comments section and getting no love, I decided to rtfm! The steps taken in this chapter are outlined at https://wiki.debian.org/CrossToolchains#Status_of_cross-toolchains_in_the_Debian_archive .
One statement stood out: “These packages did not make it into Jessie so you need to install them from….”, which is the purpose of the creation of the crosstools.list and getting the key to the archive. So with that in mind I decided to jump over this wall and see what else will get in the way.
Here’s the steps I took:
Windows 10 i7
VirtualBox 6.0 2gig memory allocated
Debian Stretch 9.7.0
Installed sudo
Installed cairo-dock
sudo dpkg –add-architecture armhf
sudo apt-get update
sudo apt-get install crossbuild-essential-armhf
The clouds parted, golden rays of light came through the window. I believe the problem to be the (as was suggested) the particular release of jessie (I tried 8.11.0 and 8.11.1). I think this is where the library version chain breaks. If you go back far enough in the jessie releases the dependencies will resolve, but with jessie at EOL, just move on!
Thanks for all your efforts.
Great book and support material
Thanks Kenton,
That is really great advice and will be very helpful for anyone who has similar problems.
Derek.
Now that embedebian is defunct and arm is fully supported in “core” Debian has anyone got a some minimal instructions to get this working using crossbuild-essential-armhf?
There are a Debian wiki pages here
https://wiki.debian.org/CrossCompiling
But the suggested process is complicated — it makes sense on a workstation but if you are using a closed environment (e.g. a VM or a container) I assume there must be a simpler way that does not require a chroot environment.
Any suggestions please?
I’m at the same point on a Win 10 laptop with Virtualbox. My debian 10 doesn’t have any of the crossbuild-essential packages installed and using the apt install doesn’t locate the packages. I stumbled across the same wiki pages and its a bit daunting for a Linux newbie,
If you have found a solution please post 😉
Brian
Hi Derek,
I’m enjoying the latest Beaglebone book, but I’ve run into a problem getting RSE set up in Eclipse. I’m running the latest version of Eclipse (2019-03), and I’m running Ubuntu 18.04.1 LTS under Hyper-V on a Win 10 PC.
I’m following the instructions on pg. 318 of your book (2nd edition) and when I get to the New Connection dialog, the dialog is blank except for the “System type:” box at the top. The box has “type filter text” highlighted; there is nothing to select. I am able to type in “Linux,” but there’s no way to accept it because the “Next” button at the bottom of the dialog is grayed out. There is nothing else in the box, so there is no way to set the IP address, etc.
Do you have any advice?
Cheers,
Ed
Hi Ed, That sounds like a problem with your RSE setup. You may need to check that you have both “Remote System Explorer User Actions” and “Remote System Explorer End-User Runtime” installed. If they are, I would remove them and try a fresh install, ensuring that you have chosen the correct version (e.g., Oxygen) Kind regards, Derek.
Hi Derek,
I only had “Remote System Explorer User Actions” installed. When I installed “Remote System Explorer End-User Runtime,” I got the filled-in dialog. Brilliant! Thank you sir!
I also set up a dedicated Debian 9.8.0 machine and this is working more smoothly than Ubuntu under Hyper-V.
Cheers,
Ed
Hi Derek,I don’t install gdbserver,why?
debian@beaglebone:~$ sudo apt-get install gdbserver
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package gdbserver is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘gdbserver’ has no installation candidate
Hi there, it is available under Stretch (https://packages.debian.org/stretch/gdbserver). Check that you are using a recent Debian image and use apt rather than apt-get. Derek
Hi,
I have Debian 10 (Buster) in a VirtualBox 6.0 VM on a Windows 10 laptop.In chapter 7 (page 309) when I give command apt-cache search cross-build-essential there is no response, just prompt root@debian:~#
When I issue command sudo apt install crossbuild-essential-armhf I get
reading package list … done
building dependency tree
reading state information … done
E: unable to locate package crossbuild-essential-armhf
I installed Debian using 3 iso DVD images. When I upgrade I get prompted to mount a DVD.
Any suggestions how to proceed?
Hi Derek,
I found your book very handy for learning Beaglebone.
I have a Ubuntu 14.04 Host PC and BeagleBone Black Stretch
I followed your video and book until the post build SCP in Eclipse. Everything is working upto that point.
But when I try building the project it runs for 30%-60% and stays there without further action.
I used Eclipse Luna and Oxygen. Both same issue.
What I noticed was when I try to Remote Connect to the BeagleBone it always comes up with root and asking for password. I tried several passwords like “temppwd”, “root”, “” . Nothing working and I know that we can’t ssh with root. So I changed the user to debian and then it connects.
But the SCP is not working
Can you please guide me on this.
Thanks
Cham
Hi Derek,
First off all great book
I followed the instructions of chapter 7 and I cannot run the Hello World at Eclipse IDE even after installing the QEMU tool.
I’m using Eclipse 2019-12 but following error occurs when i try to run the program:
/lib/ld-linux-armhf.so.3: No such file or directory
In this chapter in the section when installing the QEMU there are a instruction to solve this problem when running direct from the shell :
qemu-arm-static -L /usr/arm-linux-gnueabihf/ testcross
and it works.
But in my case i running the Hello world c++ application from Eclipse IDE and getting this error can you help me?
Derek,
Let me start off by saying thank you for writing Exploring BeagleBone. It’s been very instructive, and has shed light on many of the concepts that I read about in the Embedded Linux Primer. That having been said, I’ve been running into some problems. Ultimately I would like to have a dedicated Linux desktop to do a lot of development work, and to that end I have a machine running Ubuntu 18.04.4 LTS (Bionic Beaver).
Here is the error message that I receive when I try and run makeLEDC:
bblessing@beaglebone:~$ sudo ./makeLEDC flash
./makeLEDC: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21′ not found (required by ./makeLEDC)
bblessing@beaglebone:~$ ldd makeLEDC
./makeLEDC: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21′ not found (required by ./makeLEDC)
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6efe000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6e92000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6e6e000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d89000)
/lib/ld-linux-armhf.so.3 (0xb6fcd000)
Since the book that I have is the first edition, I’ve been trying to run a version of Linux on the BBB (SD card) that is closer in age to the book. Here is the output from uname -a:
Linux beaglebone 3.8.13-bone70 #1 SMP Fri Jan 23 02:15:42 UTC 2015 armv7l GNU/Linux
To be honest, I’m pretty stumped on what to do about the libstdc++.so.6 issue. The link points to libstdc++.so.6.0.17 in the /usr/lib/arm-linux-gnueabihf directory on the BBB. I cloned the exploringBB repository as per the book’s instructions and simply put the makeLEDC program on the BBB via sftp. Is this because I’m using such an old version of Linux on the BBB?
I tried the latest version of Debian for the BBB and it now works. Sorry for the silly comment.
When running the first hello world example in Eclipse I couldn’t get it to run at first, was getting “/lib/ld-linux-armhf.so.3:No such file or directory error”. I had to add a -static to the Properties>C/C++ build>settings>Cross++ linker>Misc>linker flags and then I could run the example on my Linux AMD64 inside the Eclipse console.
You outline why -static is needed on pg 313 2nd ed, but it doesn’t seem like you specify this in Eclipse?? Not sure what I’m missing here. I tried adding the /usr/arm-linux-gnueabihf/ path to the compiler include and linker library search, but same errors.
Hi Derek, I have a big project and I am using Clion IDE for development, the problem is with the remote connection Beaglebone Black can not create and build large files!
Any help and small clues can be helpful!
Thankful
Hi Derek, I bought your book a few years ago and now I have time to dive into it. I installed Eclipse on my Ubuntu desktop but due to some crosstool issues I am having I am thinking about switching it to Debian. Is https://www.debian.org/releases/buster//installmanual a good place to start? It’s not Jessie but I’m hoping buster will work as well. I’m not well versed in linux so it would be easier for me to install the latest. Would I also want to update the BBB to buster?
Thanks!
Hi Derek: I went ahead and installed Debian buster on my desktop (previously Ubuntu), and was able to get everything running through chapter 7, I left the BBB at wheezy and it worked fine. Your book and video have been extremely helpful, thanks!
Hi Derek, Thanks for a great tutorial, I have learned a lot. I have one problem that i can’t figure out. When i make a new connection in Remote systems, I am able to select ‘Linux’, setup my host name, then select, ssh.files, processes.shell.linux, and ssh.shells, but then the ‘Next’ button is inactive and i can only select ‘Finish’, which means i cannot add the terminal. I am running Debian stretch, and installed the Remote Systems from ‘Latest Eclipse Release’. I am able to connect to the BBB with the shell, but I don’t have the terminal, and the terminal would be much better. Any idea what went wrong? thanks!