Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connecting a Pi to a Pi?
#1
I'm never really going to get my head around the idea that people will actively refuse to use the best systems, because they hate Windows, or hate MS or hate VS or hate PC's or whatever, thats just being stubborn and self damaging for not valid reason. But I do accept that some people simply may not have access to a PC running windows.

But for me there is no doubt that having 1 machine as your dev system and one machine as your target is far and away the simplest way to code any kind of project.

So here's a question....how could I set up a Raspberry Pi, to run an IDE, (preferably code::blocks or similar) and have it build then send code to another Rpi to run and debug?

Since SSH connections between Pi's are perfectly possible, and GDB is also available, how can we recreate the functionality of VisualStudio/VisualGDB with a pair of PI's?

Or indeed any other SBC..

I'm very curious to know what people here think.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#2
Hi Brian,

I used to work with windows machines and I still use them when they are convenient for the work at hand.
I started with DOS, and from then I've used all the versions of Windows up to the current Windows 10.

I used many versions of Visual Studio (up to the 15) and I have to say that the IDE is good and easy to work with.

Two or three years ago I've discovered Qt and its IDE qtcreator.

Qt is a framework (more or less like the MFC one of Windows) actively developed and I've immediately found it very friendly and simple to use. I greately appreciate that Qt is available for all the machines I use (Windows, Linux ...) and furthermore I can easily deploy my apps also in Android.

Regarding the Raspberry... I have 1 RPi2, 1 RPi 2B and 4 Rpi3. I've tried to use qtcreator with the Rpi2 and frankly it is too slow to be useful. Also with the 2B model the speed is not satisfying (unless overclocking) but with the Rpi3 the speed is enough to be useful and the need to cross compile is much lesser. Of course much it depends on the size of the problem at hand but I very much appreciate the support that Linux machines have from the community.

Gabriele
Reply
#3
So are you able to use Qt to connect to a target Pi from a dev Pi?


I'm pretty sure its quite viable to run Code::Blocks as a dev IDE, and send code to a target to run and debug, build speeds wouldn't be great but the freedom of separating your target and dev gives much faster debug and profiling turn around.

I can't look at it yet though as I an snowed with work, and still completing the code review of book code to make sure all source is updated and in place. But I will get in to this soon.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#4
(03-16-2019, 04:35 PM)Brian Beuken Wrote: So are you able to use Qt to connect to a target Pi from a dev Pi?
I use a different approach.
I use VNC to connect to the target and develop/debug the software directly on the destination Pi. The OpenGLES Window is not transferred via VNC but is shown only on the monitor connected to the Raspberry. So I have both the graphical window (on the target Raspberry) and the IDE/Debug window in the dev screen.

Simple but effective.
Reply
#5
(03-16-2019, 07:21 PM)GSalvato Wrote:
(03-16-2019, 04:35 PM)Brian Beuken Wrote: So are you able to use Qt to connect to a target Pi from a dev Pi?
I use a different approach.
I use VNC to connect to the target and develop/debug the software directly on the destination Pi. The OpenGLES Window is not transferred via VNC but is shown only on the monitor connected to the Raspberry. So I have both the graphical window (on the target Raspberry) and the IDE/Debug window in the dev screen.

Simple but effective.

you can send the gles window to vnc, there's an option, in troubleshooting on the pi side vnc, on early version its called experiemantal, on new version its called direct capture mode.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#6
(03-16-2019, 10:04 PM)Brian Beuken Wrote:
(03-16-2019, 07:21 PM)GSalvato Wrote:
(03-16-2019, 04:35 PM)Brian Beuken Wrote: So are you able to use Qt to connect to a target Pi from a dev Pi?
I use a different approach.
I use VNC to connect to the target and develop/debug the software directly on the destination Pi. The OpenGLES Window is not transferred via VNC but is shown only on the monitor connected to the Raspberry. So I have both the graphical window (on the target Raspberry) and the IDE/Debug window in the dev screen.

Simple but effective.

you can send the gles window to vnc, there's an option, in troubleshooting on the pi side vnc, on early version its called experiemantal, on new version its called direct capture mode.
Good to know ! I'll give a try.
Reply
#7
Outside of understanding of why you would do this, you could create a shared mount between the systems and compile the code locally on one Pi.

Another IDE to look at is Atom.

The other options if you are looking for a Linux to Pi solution, you could use something like Virtual Box and create a Linux VM on a Windows system and use that to remote dev on the Pi.

Or, install the Raspberry Pi OS on Windowsor Mac OS
https://thepi.io/how-to-run-raspberry-pi...-or-macos/

Oh, you could build the code on one pi and use something like SCP to transfer the code to the other.
Reply
#8
Why is easy...editing and compiling on one machine then sending to another to run and debuh is how all professional game coders work, Ideally use a Pc like they do, but its clear some people just hate the idea of using a windows pc, or can't afford it, so 2 Pis, gives another option

Why would you install raspberry on a pc?? Think you've misunderstood the intention.

I think building and using SCP or similar is the one of thebest options, code needs to be transferred, but then also need GDB to run on the target so that needs and SSH style connection and an IDE on the dev system thats receptive to it....

I still say, use a Pc..use the right tools for the job.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#9
(03-18-2019, 08:44 AM)Brian Beuken Wrote: Why is easy...editing and compiling on one machine then sending to another to run and debuh is how all professional game coders work, Ideally use a Pc like they do, but its clear some people just hate the idea of using a windows pc, or can't afford it, so 2 Pis, gives another option

Why would you install raspberry on a pc?? Think you've misunderstood the intention.

I think building and using SCP or similar is the one of thebest options, code needs to be transferred, but then also need GDB to run on the target so that needs and SSH style connection and an IDE on the dev system thats receptive to it....

I still say, use a Pc..use the right tools for the job.

Well.. apart from compilation speed (that is the same if you use another Pi) the only reason I see to use two connected Pis is that the Ide use a lot of RAM.
Apart this I continue to prefer to use VNC to connect to mi Pi and develop/debug on the same.

Gabriele
Reply
#10
... Rethinking ...

of course your situation is very different because you are developing for many different architectures.
In your case, your setup is the preferred one since you can have a single version (with appropriate #ifdef...)
centralized in a single machine.

Gabriele
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)