2

How do I setup eclipse CDT to cross compile the kernel for the Raspberry Pi?

Is it as simple as File -> New -> Makefile Project with Existing Code?

What else has to be considered?

sergej
  • 121
  • 5

1 Answers1

2

This can be done if you use a distribution designed for
embedded development, such as my project Nard SDK
http://www.arbetsmyra.dyndns.org/nard/
(but there are others too!).

A short guide:

  1. Follow the instructions at the website to build the example product.
  2. When the example has been built successfully once; open Eclipse.
  3. Menu: File > Import > C/C++ > Existing Code as Makefile Project
  4. Set Code Location = /path/to/extracted/nard/
  5. Set Toolchain = "Cross GCC"
  6. Click "Finish"
  7. Take a coffe, Eclipse will index the big tree...
  8. In the Project Explorer you can find the kernel source in nard > apps > linux-kernel > linux-kernel
  9. Hack away...
  10. Rebuild the firmware with menu: Project > Build Project
  11. The website has documentation for how to push your custom kernel/firmware to the target. You can likely setup Eclipse to run the necessary shell commands automatically.
Ronny Nilsson
  • 878
  • 5
  • 13