4

I have started to read a book with Rpi Hacks in which I want to build the kernel. Unfotunately everywhere I search there are crosscompilers for linux only. I want to use Eclipse and rsync executable to the Pi, run from an SSH connection all from a Windows latop WITHOUT VMware.

I found this guide http://www.a2p.it/wordpress/tech-stuff/development/remote-debugging-raspberrypi/ but I am not able to understand what all things to install from cygwin and how to set it up with the Eclipse IDE.

Can you please tell me how to setup the cross compiling environment on a windows machine with Eclipse IDE?

Thanks you in advance.

5
  • 2
    I think this is a lengthy serious of steps someone has already written out -- except you say you did not understand it. Someone else may come along who's willing to do it all again, but presuming they don't (partially because there's no reason to assume you will understand it a second time), you are probably better examining each "Step" in the blog you linked, and asking specific questions in the appropriate place about them. E.g., the first one is setting up Cygwin. Have you done that? The next one is installing a specific toolchain. Have you done that?
    – goldilocks
    Commented Jan 28, 2015 at 20:02
  • in the tutorial they haven't specified which Cygwin packages to install that's the problem. Commented Jan 28, 2015 at 20:36
  • 1
    I'm the author of the mentioned article :) As described in Step 1, you should "Be sure to install the python package, the shell and the make tool".
    – Dexter
    Commented Jan 29, 2015 at 7:22
  • Is there any specific problem you're stuck with ? Posting any error messages would be the first step to figuring out if there are possibly any CygWin packages missing. Apart from that, cross-compiling - even on Linux - is definitely not an easy feat; doing this on Windows is even harder. You could walk through the process once on Linux to get a feel for things and then tackle the job on Windows. Takes patience, but might be the more successful approach in the longer run.
    – ssc
    Commented Jan 29, 2015 at 21:33
  • I wasn't able to do it in Windows....so now I use Ubuntu 14.04 on Virtual Machine. Works like a charm! :-) thanks for your answers. Commented Mar 7, 2015 at 20:28

4 Answers 4

1

Basically the main things you need for the cross compliations is the toolchain you could get this at http://gnutoolchains.com/raspberry/

Once you are on it then its as same steps to set up the eclipse as in linux. if you are working with linux system, its always advisable to use another linux.

1

I have just put together a post on how to setup cross compilation and cross debugging to the RPi from eclipse on Windows. I have tried to make it as simple to follow as possible and use a pre-build cross compiler which greatly simplifies the process. Cross development for RPi from Windows using eclipse

1

I keep an updated set of instructions here - https://github.com/ballle98/AqualinkD/wiki#cross-compile-and-eclipse-ide

  1. start with these instructions based on https://www.cososo.co.uk/2015/12/cross-development-using-eclipse-and-gcc-for-the-rpi/
    1. Install GCC Cross compiler from http://gnutoolchains.com/raspberry/ (alternatively you can get the toolchain here https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads)
    2. Synchronise header file and library versions
      1. with older versions of the tool chain use c:\SysGCC\Raspberry\TOOLS\UpdateSysroot.bat
      2. With newer versions download and install https://sysprogs.com/SmarTTY/download/ then execute something like this to update sysroot

"C:\Program Files (x86)\Sysprogs\SmarTTY\SmarTTY.exe" /UpdateSysroot:C:\SysGCC\raspberry64\aarch64-linux-gnu\sysroot

  1. import project from github
  2. configure as makefile project
  3. Use these instructions to configure the toolchain https://stackoverflow.com/a/27180772/454658
    1. Unfortunately it's not obvious or intuitive, how to set the properties for a particular (cross-)toolchain, that should be bound to a project. To make these property settings available, first go to the C++ Build/Builder Settings Tab in the project properties dialog and check the Generate Makefiles automatically option. Don't click the Apply or OK button now!
    2. Proceed to the C++ Build->Settings sub page and fill in the cross-toolchain prefix, and path where the binaries are actually located.
    3. Go back to the C++ Build/Builder Settings Tab and uncheck the Generate Makefiles automatically
  4. Configure Build Output Parser compiler pattern https://help.eclipse.org/2020-06/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Fconcepts%2Fcdt_c_scanner_discovery.htm
    1. Go to either "Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery Tab -> CDT GCC Build Output Parser" or "Project -> Properties -> C/C++ General -> Preprocessor Include... -> Providers -> CDT GCC Build Output Parser"
    2. Change compiler pattern to add wildcard match in front of gcc so it will match arm-linux-gnueabihf-gcc (.*g?cc)|(.*[gc]\+\+)|(clang)
    3. When you build you should see wrench icons on the c files and the grey out sections in the editor related to #ifdef should be correct. Note you may need to change the active build configuration or select "Project -> C/C++ Index -> Rebuild"
0

i'm currently trying to update the sysroot. But, i don't understand what you meant when you said :

then execute something like this to update sysroot "C:\Program Files (x86)\Sysprogs\SmarTTY\SmarTTY.exe" /UpdateSysroot:C:\SysGCC\raspberry64\aarch64-linux-gnu\sysroot

Did you mean to execute a similar command in the terminal of SmarTTY?

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.