Showing posts with label Pi. Show all posts
Showing posts with label Pi. Show all posts

Tuesday, 4 December 2012

New Company Culture... be Obstructive


It is a new world we live in, with new rules and new concepts... Here's a concept for you... I mentioned a few weeks ago I was working on the Raspberry Pi at work...

Well, that work is near completion, so I went to ask "Where are the Pi's belonging to the company?"... Since we've been working exclusively on hardware I bought and brought in, I thought it a little strange we've still not seen any actual kit belonging to the company.

And the answers I got, from two different individuals, begger belief... First I was told... "We're not ordering anything until its all proven they can work"... They do work, and the Raspberry Pi use is only a stop gap measure whilst the real hardware team work on things, but we need to do a demo of this for a trade show in February and the real hardware will not be ready until June, so the idea was to use the Pi and get proof of concept and demo done...

Well, the proof of concept is ready, we just need real company Pi's to run it on for the demo... I point this out.



"Well, we can't just order them, they have weeks and weeks lead time on RS & Farnell".... he is right, they do... "so we've not bothered to order them yet, until the lead time gets shorter"... The logic of this one started to make me boil.  They take a lot of time to deliver, so we won't order until the time to wait is shorter... so rather than wait and get that time over with so they turn up soon ish, they're waiting to wait for their wait... and then ordering them whilst not waiting... the logic... just... makes me cry... Order the things now, get them in the pipeline, then IF we can't get them before January 14th, hit ebay.

Or, better yet, order them from ebay sellers (like I have personally) now and get them next week (like I did and my boss did and the head if IT did and the hardware department did)... No, we can't use a company credit card on ebay... You don't you tard, you use the credit card with PayPal, which is safer than you're clearly aware of with your "t'internet is too new" attitude.  Get with the times, order the things on ebay... No...

Right, I'll order them, and the company can give me the money back as petty cash, or in my next pay day... "No because"... get ready for it... he actually said this... "no because that looks like the company is buying you special toys".

Special Toys... And buying Me...?... So, I bought something the company needs, which I already own and hence don't actually need any more of, and then I charge the company for the equipment it will own and he says it looks like the company buying me toys.

So, at this point, I went to ask a higher power... A director no less... His attitude...

1. We can't buy them until you prove their purpose
2. We shouldn't be using your personal ones
3. We can't buy off of ebay.

So... I'll just delete all this work then, put a hammer through my own personal Pi and wait for Farnell or RS, with the huge long lead times?

And, this whole they won't pay for things on ebay... I bought a book, £45 worth... It proved so useful the company simply took the receipt and paid me the difference back in my wage packet... WHAT IS DIFFERENT BETWEEN THAT AND MY BUYING THESE PI'S AND CHARGING IT BACK?

I swear to god, when you're bringing into your work better tech than they purchase and you are offering every possible avenue to not block work and progress, and all you get is slogging messy stupid obstructive attitudes it really sucks the life out of your efforts.

I have just had a massive rant about this situation to my manager, his answer... go and tell the original idiot I was ranting... Not tell him why, not empathise with my frustration, or even just tell me to calm down, no, his answer was... "haha, he's ranting"...



It is all so tiresome... If I just didn't bother, NOTHING would get done around here... and with NOTHING getting done, I'd be the first fired, this is the irony of it all.

Tuesday, 27 November 2012

Unstable Pi Reports


I have also spent a lot of time today talking to the hardware types who work with me, I'm very much a software guy, beyond wiring a plug or sorting out my ethernet cables I try to stay away from hardware engineering.

I have been known to assemble my own computers, some people call this making, but really you're just taking pre-fabricated items and slotting them together, the kind of hardware guy I'm talking about are the kind who tinker with soldering guns and the like.

And one thing they've overwhelmingly said about their Raspberry Pi's is how unstable they are, how they crash on them and how slow they are...

Where as, I'm a software guy, I've never had my Pi crash, I've never had it be overly slow... I admit its not quick to compile complex C/C++ languages, especially when the latter is using the Boost libraries... but it has been stable.

In actual fact I've only had it crash out once, and that was not its fault, it was the fault of the SD card going dead midway through a compile!

So... What is this difference?... Are the hardware tinkerers, playing with the GPIO port causing themselves issues?  (I think so)... 

As a software tinkerer however I have no complaints...

Saturday, 17 November 2012

New Pi Code and Toast

So, you may guess I've got a Raspberry Pi, and I've been building code for it... In actual fact I've been porting a few of my support classes from other projects so I can start to build things of some use.  I've ported my XML parser of choice, I've ported a bunch of network code and I'm tonight going to be setting up to bring in some of my Linux console manipulation code, so I can colour and highlight areas of interest in apps.

Though, strangely, I've already come across some strange differences between code which has does and will compile on gcc v4.6.2 on ubuntu 12.04 and which won't compile under gcc v4.6.2 under Raspbian... I'll post more about that when I understand it, for now just understand this... All I have to do is move a "typename" definition about... Its really obscure... And maybe just be doing something wrong...

So, more Pi code from me in the near to mid future, the reason none of it is going to come out now is because until this week I've only been tinkering with the Pi... Now I actually have remit at work to officially perform a project with one... and its all quite exciting, there's nothing like having a project in work which overlaps your leisure time.

The only problem is, my boss (well my bosses boss) is such a tight wad he's not sprung for a Pi himself, no I've had to take my own in!... Bit cheeky, but once the Pi was mentioned I jumped at the chance to take mine in and get on with something.

However, it did cause some friction, another member of staff whom shall remain nameless was eyeing it up for days.  They didn't seem to want to engage through the old blue eyed devil with me, so they let themselves, and others cool off, before they came drooling all over it... However, they came in such a way as  to insinuate there'd be no work/code actually working on the Pi... Of course I have 50% of the project done... the proof of concept at the very least, proving I could produce and hence need to be left alone... And this flabbergasted them, so much so they were very nasty not an hour later.  So nasty in fact I send an email to my immediate boss complaining.  I don't get paid to deal with other people having a tantrum because they're stuck on the same project they've been on for two years... a project they should have delivered a year ago... So, I don;t want to hear it when they're complaining, and proclaiming, they could do it better...

"Really, you can do it better?... Well you bring in your Pi, oh you've not bought one"... was the thought which ran through my mind as I engaged stare mode and ignored them.

Anyway, toast... Why is Toast in my post header?  You may recall I have one post about sweets to help code.. well, I never got around to buying any more sweets to try... I've not had a hard boiled or mint sweet since that post.  I have however had toast...

When I was a kid my favourite toast was really insanely fresh white sliced bread, lathered in salted butter... This is still a favourite today, but I don't go into for the lathering  nor the heat... Strangely, my taste has taken to letting the toast cool.  I do remember once at Uni placing nearly 8 slices of toast into the fridge to cool before buttering them... and I seem now, a decade later, to be going through that phase again, I stack up a good number of slices, let them cool whilst there's tea brewing and I then butter them and just glance them with lemon marmalade.... It is heaven.

And because its cold already, its perfect to take to the office and get some code done with.

Friday, 16 November 2012

Guide To Building a Raspberry Pi C/C++ compiler on Ubuntu


These are personal notes on setting up a Cross Compiler for C/C++ on my Ubuntu 12.04 machine, so I can build programs for the Raspberry Pi.

Of course my reason for this is that my PC's are far more powerful than my Pi, even compiling the most trivial program can result in waiting a duration or two on the Pi.  So, I want to employ my heavy PC metal to generate the ARM architecture code for me.

The first steps were to install all the pre-requisites, I'm assuming you have Ubuntu 12.04 32bit LTS installed fresh and clean (either as a real machine, or as a virtual one) and that you know how to use your Linux Machine, here we go.

sudo apt-get update
sudo apt-get upgrade
sudo shutdown -r now

Reboot... Log back in etc....

sudo apt-get install subversion bison flex gperf build-essential texinfo gawk libtool automake

Download ncurses tar ball from "http://ftp.gnu.org/pub/gnu/ncurses" extract it and then within its folder:

./configure
sudo make install

Download crosstool-ng from "http://www.crosstool-ng.org", extract its tar ball and from its folder:

./configure --prefix=/opt/cross
sudo make install

Now we need to add this built item to the path:

PATH=$PATH:/opt/cross

And now we need a space to do the building of the cross compiler:

cd ~
mkdir Pi
cd Pi
/opt/cross/bin/ct-ng menuconfig

Goto "Paths and misc options" and then turn ON "Try features marked as EXPERIMENTAL".

Goto "Target Options" and into "Target Archetecture" and select "ARM".
Go into "Target Options" and set Endieness to "little".
Go into "Bitness" and set it to "32bit".

Goto "Operation System"
Go into "Target OS" and select "Linux".

Goto "Binary Utilities" and then select "Binary Utilities" latest version (2.22 as of writing).

Goto "C Compiler" and enable "Show Lincro Version" these are the 4.7+ versions supporting C++11, and enable C++.

Exit and save.

And now we kick off the building of the tool chain:

/opt/cross/bin/ct-ng build

The output for me ended up in "~/x-tools/" as per the paths selected in the paths & misc options.