Author Topic: Cross Compiling/Remote Debugging with the Rasberry Pi  (Read 19310 times)

Offline nabberuk

  • Single posting newcomer
  • *
  • Posts: 2
Cross Compiling/Remote Debugging with the Rasberry Pi
« on: July 22, 2012, 08:35:09 pm »
I have Debian Minimal installed on the Raspberry Pi and would like to develop on my Windows based machine and then deploy/debug to the RPi itself. I've installed the ARM tool chain from http://www.codesourcery.com/sgpp/lite/arm.

I've also installed the gdp server on the RPi, what do i need to do in order to get this environment up and running? are there any guides available?

thanks,
Nathan

Offline nabberuk

  • Single posting newcomer
  • *
  • Posts: 2
Re: Cross Compiling/Remote Debugging with the Rasberry Pi
« Reply #1 on: July 22, 2012, 09:44:16 pm »
I see i can already select a new ARM project and that there's already a ARM GCC Compiler. What i'm having an issue with is selecting the evaluation board, is there a way to add new one's? for instance the rasberry pi (it's based on the Broadcom bcm2835)

thanks

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Cross Compiling/Remote Debugging with the Rasberry Pi
« Reply #2 on: July 22, 2012, 11:30:04 pm »
It depends on the needed options, but you can manually add options to the compiler/linker.
See
Project->Build options -> Compiler -> Other
and
Project->Build options -> Linker -> Other
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

jcsalem

  • Guest
Re: Cross Compiling/Remote Debugging with the Rasberry Pi
« Reply #3 on: October 20, 2012, 05:57:28 pm »
Since there was no further response, I was wondering whether anyone had success cross-compiling for the RPi using CodeBlocks.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Cross Compiling/Remote Debugging with the Rasberry Pi
« Reply #4 on: October 21, 2012, 12:04:22 pm »
The problem is not the cross-compiling here but the debugging part. You can edit and build your ARM project by using CB with an appropriate compiler (if there exits any). But for the debugging, to connect a board of your choice there must be a 'gdb-server' to establish communications between the 'gdb' and the board itself, like 'avarice' for the AVR target for example. That's not in anyway related to CB. So to debug your microcontroller, first you have to program your compiled code into the mcu (tools menu is useful here to define shortcuts for command line programmer software) then launch the corresponding 'gdb-server' for your mcu and connect to it again with the corresponding 'gdb' for your mcu. That's basically how it works.