Tags:
view all tags
---+ Preparing Ubuntu on the PC for Raspberry Pi development ---++ Exercises: Create your own user and add him to the sudo group (usermod -a -G sudo yourUserName).<br />Go through the exercises of the first student session and try everything. If something does not work (e.g. the tree command does not work or the some environment variables are not set, then mark these down and solve the problems by adding the corresponding commands with _apt install_ or by adding the corresponding environment variables in ~/.bash_profile or ~/.bashrc. ---++ Adding additional commands I personally prefer to use emacs, which is not installed by default on Ubuntu. Please install it if it is not there. Are there other commands you are missing? Install them. If you want to use an IDE (Integrated Development Environment) then <span> _eclipse_ </span> is a good candidate. You may also want to install Qt5 and qtcreator. This however is only useful if you cross compile at least the base Qt5 system (all the necessary libraries) for the raspberry Pi. <a href="https://wiki.qt.io/RaspberryPi2EGLFS" title="https://wiki.qt.io/RaspberryPi2EGLFS">https://wiki.qt.io/RaspberryPi2EGLFS</a> explains how to do this. Don't be mistaken however: this is not for the faint hearted and it will take some 2-3 h for the compilation to terminate if everything goes well. gnuplot is not installed but needed in the next session on programming. Install it. Create a text file with some data and test gnuplot by plotting them. The problem is that my PC is now fully configured including everything that is needed for cross compilation, which is not the case if you only just installed the base OS. <br />Make sure the file system looks similar to mine:<br />I have: /opt/ucc as base directory for everything concerning the course. In /opt/ucc I have * include * lib * lectures * micros * projects Under lectures create subdirectories * Lectures-2017 * exercises * problems * solutions * images * slides ---++ Cross Compilation tools Install the cross compilation tools for the Raspberry Pi: * arm-linux-gnueabihf-gcc * arm-linux-gnueabihf-g++ These go to /opt/ucc/micros/raspberry/tools. Use git clone https://github.com/raspberrypi/tools to get the compilers. Set up the CROSS_COMPILE environment variable to contain arm-linux-gnueabihf-<br />Try to compile a hello world program with the gcc compiler on the PC as well as using the cross tools you just copied. Create Makefiles to do the compilation. Make sure these are easily accessible by adding their binary directory to the execution path in your .bash_profile.<br />Install qemu-arm and try the ARM emulator to run your cross compiled program on the PC. If you statically link your arm program the emulator should be able to run it straight away. If you dynamically link, then you will probably miss the shared library ld-linux.so.3. This can be solved by copying part of the Raspberry Pi root file system to the PC. I put these into /opt/ucc/micros/raspberry/sysroot. You will need * /lib * /usr/lib * /usr/include * /opt/vc Now try to find ld-linux.so.3 and set up the environment variable QEMU_LD_PREFIX correspondingly. If this is correct you should be able to run also dynamically linked ARM binaries on your PC. -- %USERSIG{UliRaich - 2017-09-04}% ---++ Comments %COMMENT%
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2017-09-04
-
uli
Home
Site map
AFNOG web
Embedded_Systems web
IoT_Course_English web
IoT_Course_French web
Main web
Sandbox web
TWiki web
Embedded_Systems Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
Edit
Attach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback