2013. szeptember 29., vasárnap

Hyperion

Elkezdtem olvasni a Hyperiont, amit Szárnyó vett Cuppa kishíján lejáró könyvutalványaiból.
Nem volt rossz döntés erre a könyvre bízni az Ábrahámhegyig tartó út unalmának elûzését, A megmentõ c. Frei Tamás könyv után üdítõ, hogy értelmes karakterkidolgozásokkal találkozok, akikrõl elhiszem, hogy valóban létezhetnek.

Sajnos A megmentõben az egyetlen szereplõ akivel azonosulni tudtam az a Zarko nevû félig orosz, félig szerb bérgyilkos-állat volt, de zsörtölõdõ-bosszankodó tökéletlen személyisége viszont mégis szerethetõvé tette. Vagy csak én is beteg vagyok kicsit.

2013. szeptember 24., kedd

Building BeagleBone Black Cross compiler environment. UPDATED TOOLCHAIN LINKS


Ok, I'll write this post in English, so it might be helpful to someone else having the same problems.
So what I'm trying to do here is to use Eclipse in Ubuntu to develop C/C++ software for my BeagleBone Black. The goal is to have Eclipse to Cross Compile and upload the software, and then debug remotely, from Eclipse.
You might want to ask, why did you make another tutorial, there are loads of them on the internet. Well, because this works. I've followed 4(!) separate tutorials, but since I'm a linux-noob, something always went wrong.
Michael Leonard has a fairly well written article about building the cross compiler environment, but it has several errors. The end result is a "Segmentation fault" error. And that's that.
Also, I have discovered the post of Garagelab about building the environment, but nothing about the remote execution. This one works though, but not quite as I wanted. After following the steps carefully I ended up giving over the ownership of my "Downloads" folder to the root. Don't ask how, I'm a linux noob, remember?
My good news is this though: If you are a noob as well, but you follow what I write here, you'll see that reassuring "Hello Beagle" (or whatever makes you happy) line on the bottom of your virtual console.
Anyone reading this, please feel free to comment below.
So let's dig into it!

1)

First step is to install Eclipse. Some tutorial-writers skip certain steps, because they seem to be obvious, but that causes a lot of problems to the students sometimes.
So install Eclipse C/C++ edition using the Ubuntu software manager. It should be very simple.
sudo apt-get install eclipse eclipse-cdt g++ gcc
This will also make sure thet our system has c/c++ compiler ready.
So now we can develop C/C++ applications for our desktop system.

UPDATE:
For whatever mysterious reason the Angstrom Distribution has deleted the toolchains from its website.
It can still be accessed through this link:
http://web.archive.org/web/20130823131954/http://www.angstrom-distribution.org/toolchains/

Moreover, I have downloaded the whole bunch and stored it in multiple cloud services, so it's always available.
I published the downloaded files here:
 

2)

Next, you need to download the proper cross-compilers. VERY IMPORTANT! I don't know, whether I had segmentation fault errors because of my 64bit OS or not, but download the proper package from here: http://www.angstrom-distribution.org/toolchains/For me, angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2 worked fine. x86_64 because of my OS, armv7a because the Cortex M8 in the BeagleBone Black is ARMv7-A chip.After you have downloaded it, don't extract it right there for god's sake, because it contains root-owned directories. Instead, create a directory named "angstrom" and open the package with your Archive manager. You need to extract the /./usr/local/angstrom/arm folder wherever you want, then copy it to the angstrom folder you have just created.



3)

Start eclipse. Install (Help->Install new software) Remote System Explorer (select indigo update site, then search for remote, then select Remote System Explorer End-User Runtime)



4)

Good, now create a C or C++ project. I had problems with C++, but now I think it would work as well. But I'll show the C++ version here, because the C version works already, and I wonder if this will as well or not.So File->New->C++ project. Select Hello world project, then just accept and ignore everything else, we'll change them later.



5) Configure cross compiler environment:

Right click on your project in the Project explorer, then select properties. C/C++ Build -> Settings.Here we need to specify the compilers. Remember where you've copied the Angstrom compilers? Now is the time to find them. Locate the angstrom folder, and then replace/add the following (don't change anything else):



CrossGCC compiler: /home/fodi/Documents/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gcc
Includes: /home/fodi/Documents/angstrom/arm/include
CrossG++ compiler: /home/fodi/Documents/angstrom/arm/bin/arm-angstrom-linux-gnueabi-g++
Includes: /home/fodi/Documents/angstrom/arm/include
CrossG++ Linker: /home/fodi/Documents/angstrom/arm/bin/arm-angstrom-linux-gnueabi-g++
Libraries -> Library search path panel: /home/fodi/Documents/angstrom/arm/lib
CrossGCC Assembler: /home/fodi/Documents/angstrom/arm/bin/arm-angstrom-linux-gnueabi-as
Apply and close. At this point you should be able to build the project without errors:

6) Set up remote connection:Open your remote systems explorer (Window -> show view -> other... -> Remote Systems).



Right click in that window, New->Connection. Select Linux, then Next.



Set the Host to the address of your Beaglebone Black (192.168.7.2 for everyone)Give your connection a name -> NEXT -> select ssh.files -> NEXT -> select processes.shell.linux -> NEXT -> ssh.shells -> NEXT -> ssh.terminals -> Finish.



Now right click on your connection and select "connect". Log in as root.



7) Executing remotely:

Ok, we're almost there. Select the connection you have just created.Don't change the C/C++ Application part, it should say Debug/Whateverproject on your side, leave it like that. However, fill out the Remote Absolute File Path like I have, and the Commands to execute before application editbox as well. This former is required to give execution rights to your program. Now hit run and it should work.



8) Debugging

If you have any problems, you should refer to the other tutorial I have linked. I made this work based on those, so all the information is there, if I could do it you can as well.

Have fun!

2013. szeptember 23., hétfő

My New Beagle

Tegnap este végre a kezeim közé kaparinthattam a rendelt BeagleBone Black-et. Sürgősen ki kell próbálni, hogy működik-e HDMI-ről, mert ez egy ismert probléma, de eddig megfelelőnek tűnik.


A fejlesztési ciklus reményeim szerint ma délutánra összeáll a következő menetrend szerint:

Eclipse CrossCompile (CC) ===> BeagleBone Black (BBB) ütemező keretrendszer (Shell) remote debug lehetőségekkel.
MATLAB ===> ARM generált C kód (RobonAUT-hoz)
CPython ===> BBB - - - > HLI (BMESHIP)
Shell - - - > CMATLAB / CPython

Ezt kellene összelőni ma délután fél 4-ig, hogy még oda is érjek a RobonAUT konzultációra...

Szerencsére találtam egy értelmes leírást, ami alapján egész jól lehet haladni:
http://www.michaelhleonard.com/cross-compile-for-beaglebone-black/

2013. szeptember 4., szerda

Félévkezdés

Na, kibuliztam magam augusztusban, szóval akár fel is lehet pörgetni az eseményeket:

A tervezett témakiírásom Önlab 2-re a következő:

"Autonóm felszíni oceanográf fejlesztése (II):
A tengeri mérések elvégzése általában idő és költségigényes feladat, pedig nagy hatással lehetnek a kutatás térségére. A feladat egy autonóm GPS vezérlésű felszíni kutatóhajó tervezése és építése, mely előre kijelölt térségben képes önállóan navigálni és méréseket végezni.
Féléves feladatok:
A hajó alacsony szintű vezérlésének implementálása (motorvezérlés, kommunikáció, MIMO irány és sebességszabályozás). A hajó dinamikus modelljének meghatározása, hajótest elkészítése. Elektronika elkészítése, működés tesztelése. A rendszer kombinálása az előző féléves eredményekkel (pályatervezés, navigáció). Vitorlázó-üzem energetikai és megvalósíthatósági vizsgálata, széltől függő pályatervezés, vezérlés."


Egy idő után csak leesett, hogy a vízen egy vitorla segítségével lehet a legtovább mozgásban maradni, a vitorlakezeléshez szükséges szervomotorok energiaellátását pedig napelem is biztosítani tudja. Persze lesznek kiegészítő motorok is (NQD-757).

http://www.ensta-bretagne.eu/images/contenu//actualite/VAIMOS.jpg

A másik pozitív hozománya a vitorlázásnak, hogy nem vethetik a szememre, csak egy távirányítós hajót építek, hanem lesz valami kutatás-szaga is a dolognak. Egyébként már számos ilyen design létezik, erre szakosodott versenyeket is kiírtak, ami tök jó. Már csak egy életképes koncepció kell. El is kezdtem olvasni a XY-tól a Vitorlázás c. könyvet, a Műszaki Könyvkiadótól. Mintha direkt nekem írták volna azt a könyvet, alaposan bemutat mindent de nem virágnyelven, hanem nyomásgradiensekkel.

Azért nem telt teljesen haszontalanul augusztus, kitaláltam egy módszert a hajótest legyártására: Térben kijelölt pontokat megfelelően paraméterezett Dealuney háromszögeléses módszerrel háromszögekre bontunk. Ezeket kivágjuk egyesével rétegelt lemezből, majd a megfelelő oldalakat epoxyval összeragasztjuk, felépítve az eredeti térbeli modellt. Ahogy egy jó barátom jellemezte az ötletet:
"Szegény ember 3D nyomtatója"
Még várom a konzulensem reakcióját a témakiírásra és a vitorlázós ötletre. Remélem zöld utat kapok.