Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: New to Raspberry, old to programming

Fri Mar 15, 2019 11:12 am

AdamStanislav wrote:
Fri Mar 15, 2019 4:17 am
And it looks like I may have found the answer to my question (I think I did, but am still downloading it, so cannot be 100% certain: http://gnutoolchains.com/raspberry/ by the same people that make VisualGDB, but this one seems free (it even includes a section oncompiling it all yourself, which would certainly be free, but what I am downloading right now is precompiled).
Yup, this is the toolchain VisualGDB uses for its cross platform, and indeed you can use it independent of VisualGDB if you are knowledgeable enough to set up your chosen IDE to automate it all.

If free is important to you, look into the Community edition of VisualStudio 2017 and cross compiling options with and without this toolchain.

I'd still give the 30day trial of VisualGDB a go, to compare and contrast the effort. btw I'm not a salesman or getting any revenue from Sysprogs, I just find their tools to be the simplest and quickest to get going when I was trying to find a system that most closely resembled the way I code on Sony and Nintendo devices.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

User avatar
AdamStanislav
Posts: 124
Joined: Sun Mar 10, 2019 2:44 am
Location: Wisconsin
Contact: YouTube

Re: New to Raspberry, old to programming

Fri Mar 15, 2019 1:21 pm

Brian Beuken wrote:
Fri Mar 15, 2019 11:12 am
I'm not a salesman or getting any revenue from Sysprogs
Oh, I never thought you were. :P

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: New to Raspberry, old to programming

Fri Mar 15, 2019 3:36 pm

lol I wish I were, I do promote it a lot, just because its really very good, and I want to encourage them to keep up the support and continue its improvement for Raspberry.

I'm just very passionate about getting people coding in C/C++ and avoiding engines if they are serious about wanting to be game developers, using the right tools is part of the fight to make beginners into experts.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

User avatar
AdamStanislav
Posts: 124
Joined: Sun Mar 10, 2019 2:44 am
Location: Wisconsin
Contact: YouTube

Re: New to Raspberry, old to programming

Fri Mar 15, 2019 4:58 pm

Brian Beuken wrote:
Fri Mar 15, 2019 3:36 pm
lol I wish I were, I do promote it a lot
Maybe you should let them know about that, so they could pay you. ;)

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: New to Raspberry, old to programming

Fri Mar 15, 2019 5:45 pm

ah they know, I wrote a book where it is featured and I regularly pester them when things are going wrong and I need help, and get generous discounts when I need licences for coding classes. So its not as if they don't know I'm pushing the system. I don't mind though as long as more people take up coding I'm happy.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

User avatar
AdamStanislav
Posts: 124
Joined: Sun Mar 10, 2019 2:44 am
Location: Wisconsin
Contact: YouTube

Re: New to Raspberry, old to programming

Fri Mar 15, 2019 6:02 pm

Well, what you’re doing is certainly quite admirable.

User avatar
AdamStanislav
Posts: 124
Joined: Sun Mar 10, 2019 2:44 am
Location: Wisconsin
Contact: YouTube

Re: New to Raspberry, old to programming

Fri Mar 15, 2019 8:12 pm

Looks like I was too enthusiastic about gnutoolchains. For one, it never finished installing because it encountered an access denied error while trying to install python (which I do not care fore anyway), and it just froze there. And when I tried to cross compile a hello.c with its GCC, it said file was not found. :cry:

So much for that!

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: New to Raspberry, old to programming

Fri Mar 15, 2019 11:15 pm

time to try VisualGDB
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

User avatar
AdamStanislav
Posts: 124
Joined: Sun Mar 10, 2019 2:44 am
Location: Wisconsin
Contact: YouTube

Re: New to Raspberry, old to programming

Sat Mar 16, 2019 3:32 am

Brian Beuken wrote:
Fri Mar 15, 2019 11:15 pm
time to try VisualGDB
So I can debug what I cannot even compile? :lol:

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: New to Raspberry, old to programming

Sun Mar 17, 2019 7:18 pm

??? you can compile on VisualGDB, on PC, or on target :D debug and profile if you want too :D
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!
http://www.scratchpadgames.net/

hippy
Posts: 5587
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: New to Raspberry, old to programming

Fri May 03, 2019 12:48 am

AdamStanislav wrote:
Fri Mar 15, 2019 8:12 pm
Looks like I was too enthusiastic about gnutoolchains. For one, it never finished installing because it encountered an access denied error while trying to install python (which I do not care fore anyway), and it just froze there. And when I tried to cross compile a hello.c with its GCC, it said file was not found. :cry:

So much for that!
I am afraid I can't help with whatever problem you are having but the 6.3.0 / 2018-11-13-raspbian-stretch-full / raspberry-gcc6.3.0-r4.exe installed just fine for me on Windows 7.

For the OP; that won't install on XP, gives the not uncommon "not a valid win32 application" error, but the older 4.6.3 / 2013-07-26-wheezy-raspbian /raspberry-gcc4.6.3.exe does.

I tried that one because it was the oldest and smallest download. It would be worth trying a later version but I managed to compile a Pi program using the Arduino IDE with 4.6.3 on XP and the resulting binary ran on my Pi 3B so I would say it seems usable.

GPWaudio
Posts: 1
Joined: Wed May 08, 2019 5:39 pm

Re: New to Raspberry, old to programming

Wed May 08, 2019 6:07 pm

Interesting thread, although it looks a bit stale as all the discussion was in March LOL.

I've been programming in C since 1985 on a variety of platforms and never found an issue with editing, revision control, compiling, debugging and valgrinding on the Pi3B or B+. I can't really see why people think it's better to cross-compile unless perhaps my particular program set just happens to suit the Pi dev. environment. I tend to use C, PHP, Gnu make and Bash for the work I do, with the Vim editor.

Sometimes I develop using an NFS drive for the project, other times a fast SDcard in the Pi3B+, but firstly I use Git to store all my stuff, and the Pi runs Git, gitgui and gitk perfectly well and X-windows on my Mac enables the graphics to pop up when required. Even if the Pi suddenly died I'd not lose anything, but in practice they appear to be very reliable. My personal view is anyone not using Git is mad :)
Mainly while I'm editing/compiling.debugging it's also streaming audio, serving webpages, the odd rsync in the background etc - it just trudges through it without complaining.

I have still yet to 'miss' anything on the Pi, a quick 'apt-get install' fetches anything I need in seconds, like any Debian linux platform.
Compilation speed on the 3B+ is comparable to that of a 32bit Linux on VirtualBox on a modern Win10 i7 Laptop so not really an issue. Ok so a desktop i7 running Linux blows it away for speed, but it's fast enough. My current project is around 30,000 lines of C.

Another nice feature of the Pi is that I have set it up as a WiFi hotspot so I can pick up a Laptop and my Pi + USB power-pack and carry on dev and programming in a cafe etc., which I did the other day, as it's so small !! In fact I'm struggling to find a reason to keep the Linux server that whirs away in the background up and running as the B+ is pretty much there on speed.

What the Pi does for me is provide a FULL Linux computer in a tiny box that doesn't seem to limit anything I did with any other Linux box, so for C programming I've found it absolutely ideal and without any issue. So yes, the Pi is great for old programmers :)

hippy
Posts: 5587
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: New to Raspberry, old to programming

Thu May 09, 2019 12:59 pm

GPWaudio wrote:
Wed May 08, 2019 6:07 pm
I can't really see why people think it's better to cross-compile unless perhaps my particular program set just happens to suit the Pi dev. environment.
For me it's simply that I prefer using the same PC I sit in front of most of the day and have done for years. I am used to that environment, comfortable with it, so it's what I would prefer to develop on, no matter what I am developing for.

It fits with how I develop for other microcontrollers and other platforms. Cross-developing isn't alien or new for me. So, even when I don't have to, I often choose to do things that way.

Cross-developing can sometimes be more difficult. Especially in setting things up, getting things to work, finding and settling into a smooth workflow. But short term pain can be offset through longer term gains. And there's even learning, knowledge and understanding gained along the way.

The main advantages for me are that I don't have to leave the desk I've chosen to 'nail myself to' during most of my day, the Pi can be entirely headless, or left as such when not needing to test or debug using the actual Pi itself. I can rely on PC-based backups as part of my development workflow and don't have to worry about having a backup regime as I would if working directly on the Pi.

That makes me happy, makes me most productive, but that's me. Everyone has to decide for themselves; there's no right or wrong.

jahboater
Posts: 4595
Joined: Wed Feb 04, 2015 6:38 pm

Re: New to Raspberry, old to programming

Thu May 09, 2019 2:38 pm

hippy wrote:
Thu May 09, 2019 12:59 pm
GPWaudio wrote:
Wed May 08, 2019 6:07 pm
I can't really see why people think it's better to cross-compile unless perhaps my particular program set just happens to suit the Pi dev. environment.
For me it's simply that I prefer using the same PC I sit in front of most of the day and have done for years.
Same here. But I ssh into various headless computers and then work native.

For many years at work, I sat in front of the PC and telnet'd into various servers which were usually in a remote lab somewhere in the world. I had to use whatever development tools were available on the server. Since they were often some kind of UNIX, that was not a problem.

Working with a headless Pi is oddly reminiscent of that!

Heater
Posts: 12960
Joined: Tue Jul 17, 2012 3:02 pm

Re: New to Raspberry, old to programming

Thu May 09, 2019 7:22 pm

jahboater,
Working with a headless Pi is oddly reminiscent of that!
"reminiscent"?

That is very pertinent in the modern world. It's how we work with all these new fangled "cloud" and IoT systems.

jahboater
Posts: 4595
Joined: Wed Feb 04, 2015 6:38 pm

Re: New to Raspberry, old to programming

Fri May 10, 2019 8:23 am

Heater wrote:
Thu May 09, 2019 7:22 pm
That is very pertinent in the modern world. It's how we work with all these new fangled "cloud" and IoT systems.
Yes indeed.

I meant the old way, just logging in with telnet and using vi and other local tools to fix things.
The server was typically a "mini" computer of some description, the size of a fridge or larger.

What is odd, is that I can do exactly the same thing now with ssh into a headless Pi. Nostalgia!

But then I have to remind myself that the server is in fact a Pi Zero, a tiny tiny silent little thing on my desk that I got free with a magazine, running a full UNIX like OS :) Wonderful new technology!

For a software engineer in those days, having access to UNIX was a luxury.

Return to “C/C++”