element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Windows C/C++ Cross Compilation Toolchain for Raspberry Pi
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 21 replies
  • Subscribers 668 subscribers
  • Views 4123 views
  • Users 0 members are here
  • research
  • raspberry
  • raspberry_pi
  • raspberrypi
Related

Windows C/C++ Cross Compilation Toolchain for Raspberry Pi

Former Member
Former Member over 12 years ago

Hi everyone, I am trying to compile my C/C++ project from Windows 7 machine, and use Eclipse Juno GDB to remote debug the application on RPi. So far I do not have any luck on getting the Toolchains to work correctly. Appreciate if you can share any gnu ARM toolchain for Windows 7. Alternatively, you may suggest me of any good C/C++ development solution for RPi, which will work right-out-of-the-box. Thank you.

 

Cheers,

Bryan

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    Former Member over 12 years ago

    Hi Bryan,

     

    We are looking at the same thing at the moment - it's clear there's no easy way to programming the Raspberry Pi in C/C++ currently which is crazy.  We're hoping to crack this and then create some kind of example set-up people can download for free.

     

    However we're not there yet so bear with us!

     

    Cheers

    Richard

     

    Hitex UK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mconners
    mconners over 12 years ago in reply to Former Member

    Richard Gledhill wrote:

    it's clear there's no easy way to programming the Raspberry Pi in C/C++ currently which is crazy. 

     

    If by easy you mean a gui dev environment, you are right, but all the dev tools are available on the pi for c, c++ programming. If they don't come with it they are certainly available via apt-get. And they are free. All my pi development consists of 3 or 4 terminal windows ssh'd into the pi. Just like my linux development on x86.

     

    You kids today and your fancy GUIs image

     

    Mike

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 12 years ago in reply to mconners

    Wouldn't real men do it with punch tape...?

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • mcb1
    mcb1 over 12 years ago in reply to mconners

    Wouldn't real men do it with punch tape...?

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • johnbeetem
    johnbeetem over 12 years ago in reply to mcb1

    Mark Beckett wrote:

     

    Wouldn't real men do it with punch tape...?

     

    Mark

    I've always thought of Unix as a very efficient way to process virtual decks of cards.  The whole stdin/stdout approach is like a card reader blasting in text and a card punch blasting out object code, with a teletype sitting on the side for stderr.

     

    When I used CMS at IBM in the 1980s you actually used a virtual card reader to receive e-mail and a virtual card punch to send e-mail.  IBM still had a fondness for punched cards since they used to make a large part of their income manufacturing and selling them.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 12 years ago in reply to johnbeetem

    I once had a boss that told me the tales of doing development on their mainframe after the normal day finsihed.

    They would have to load the new programme/configuration with punch tape, which wasn't quick.

     

    The older guys at work remember (with some fondness ...) the AFTN system (think teletype) where it spat out on punch tape, and then got loaded into wherever it needed to go.

    They could read the messages directly off the tape .....

     

    I guess that was their gui.

     

    We have come a long way in a short time...

     

    mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • guzunty
    guzunty over 12 years ago in reply to mcb1

    Mark Beckett wrote:

     

    Wouldn't real men do it with punch tape...?

     

    Mark

     

    Real men do it with neons and switches. Sheesh, you kids and your fancy EMUI's*

     

    Seriously, the Code Sourcery toolchain does the trick. Eclipse is designed to support cross compilers and remote debugging. I have configured it to do so for several devices. I have not so far had a reason to do so for the Pi but I'm sure it will be as straightforward as the others.

     

    I have read that Eclipse can run directly on the Pi, but having run the Arduino IDE on the Pi I would suggest you don't even try Eclipse.

     

    Derek

     

    * Electro-Mechanical User Interface

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mconners
    mconners over 12 years ago in reply to guzunty

    Yes, you can do it with eclipse, but not with the toolchain producing the error messages above, that is clearly the arm-none-eabi, the one he will want to get is found here

     

    http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/request?id=478dff82-62bc-44b2-afe2-4684d83b19b9&downloadlite=scblite2012&fmpath=/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/form

     

    that is

    Sourcery CodeBench Lite Edition for ARM GNU/Linux

    as I said I have done it with eclipse on linux I assume the same is available for windows. Also

    https://sourcery.mentor.com/sgpp/lite/arm/portal/kbentry34

     

    tells why there are 3 different arm-*-eabi toolchains.

     

     

    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mconners
    mconners over 12 years ago in reply to mconners

    Also if you look at the error messgaes spit out above it compiled fine. The issue was in the linking. It couldn't find the libraries it needed to do the simple "printf()"

    that he probably calls in his program.

     

    Well, they say the pi is a tool for education, this guy will learn alot by getting eclipse for windows to compile an executable for the pi.

     

    All good.

     

    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mconners
    mconners over 12 years ago in reply to mcb1

    Mark Beckett wrote:

     

    Wouldn't real men do it with punch tape...?

     

    Mark

    Yes

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mconners
    mconners over 12 years ago in reply to mconners

    Honestly, I've never used punch tape professionally. During my training we had to punch a diagnostic routine and I learned how to fix a punch and reader, but I never had to use one IRL.

     

     

    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to mconners

    Bringing this back on topic (and back into the 21st century...) we've now cracked it!  We can now develop code on a PC in an Eclipse-based environment and then remotely debug it on the PC, with the application running on the Pi.  We can run to main(), single-step, watch variables, all that good stuff :-)

     

    Top-secret how we did it for now image but we'll be putting up a guide how to do it in the next few days...

     

    Cheers

     

    Richard

    Hitex UK Ltd

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    Hi Richard,

      Nice to hear that. Hopefully we can include all kinds of libraries as well, include libc, opengl, libbcm, etc.

      Hope to hear to good news from you.

     

    Cheers,

    Bryan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • bbolo1
    bbolo1 over 12 years ago in reply to Former Member

    HI Richard,

     

    Great idea. Would we need anything else other than the GDB server on the RPI?

    Right now, this is how I am developing my apps.

    App compilation and debugging are being done onto the PC side. After compiling the app with debug symbols, I need to copy the PC cross-compiled executable onto the RPI and run it using the GDB server.

    On the PC side, the GDB (coming with the cross-compile package) will connect to the RPI GDB server through ethernet. Afterwards, happy debugging.

     

    Is this setup similar to what are you going to present in the guide?

     

    Cheers,

     

    Bogdan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube