Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 05 Oct 2016 02:00 PM by  Michael Foss
Upgrade gcc to support C++ 11 or later
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Joshua Pagnotta
New Member
New Member
Posts:25


--
03 Mar 2016 06:23 PM

    We have code we need to compile and run in our LTIB image that requires C++ 11 or later. Is there a way to upgrade the cross compile environment and libraries in the LTIB image to support compiling and running this code on our LTIB image. We are running the latest BSP currently (2.4-4).

    Joshua Pagnotta
    New Member
    New Member
    Posts:25


    --
    04 Mar 2016 05:23 AM
    In doing some more research on this, it looks like we need a Toolchain with gcc 4.7 or later. I did notice the 2.4-4 BSP has the option to switch to a later Toolchain (gcc 4.6.1) than the default one it's set to, but this is still not recent enough. Do you have other toolchains available for support with gcc 4.7 or later?
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    04 Mar 2016 10:20 AM
    The only two toolchains we have tested have been the Code Sourcery 2009 and Code Sourcery 2011 in the BSP which you noted is still too old.

    I am going to ask one of the developers if he has any suggestions and I will get back to you. Any tool chain would be considered as 'use at your own risk' as it would not have gone through our quality group.

    adam
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    04 Mar 2016 10:49 AM
    Unfortunatly, our developer only used the 2011 version of Code Sourcery, so I don't have a lot of hope. There are tools like Buildroot that can help build toolchains. cross-ng is another.


    I found a newer Code Sourcery, but it seems to have some issues with Busybox.

    Here is a link with some compilers listed. I can't promise anything works, because none of it has been tested with our BSP. Whatever you do, I would highly suggest you use glibc as your clibrary otherwise you might have other issues.

    Here is a little arcticle. There 2014 Code Sourcery link is in there, but as I mentioned above, there some issues, so I stopped trying.

    http://elinux.org/ARMCompilers

    I wish I had better news for you. If you want us to spend some time trying to make th eBSP work with a newer compiler, we can certain do that under a services contract.

    adam

    Michael Foss
    New Member
    New Member
    Posts:1


    --
    05 Oct 2016 02:00 PM

    This may be coming a bit late for you, but I ran into a similar issue. In my case, I needed a Fortran compiler (amazing, right?), but that was not included by CodeSourcery. 

    I set up my BSP to run in Ubuntu 15.10 and installed arm-linux-gnueabihf-gcc. Note that Ubuntu 16.04 did not work for me, sadly, because the kernel supported by LogicPD was too old for the compiler. Then in the LTIB configuration, I set it to use the C library package from my toolchain only. I also set the toolchain to "custom". The path is "/usr". The prefix is "arm-linux-gnueabihf-". My CFLAGS are "-O2 -fsigned-char -std=gnu89".

    Rebuilding the image was a bit of a chore, particularly because the newer compiler's default GNU dialect is std=gnu11, which is a change from the older gnu89. I ended up removing many packages from the build due to compile errors. I fixed the errors for packages that I did need. I couldn't quite get the u-boot compile to work, so I just used the binary u-boot provided by logicpd.

    Things seem to work for me now. It's also nice that anyone with Ubuntu 15.10 can build for my system. The Fortran compiler was critical for our work, and that seems to be working so far.

    I hope this helps!

     

    ~Mike Foss

     

    You are not authorized to post a reply.