Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
manual:chapter1:buildfromsource [2017/12/24 12:49] claudio [Preparing a system for cross compiling] |
manual:chapter1:buildfromsource [2019/11/20 14:43] jojo1973 Added bmp2font compiling instructions |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Building newRPL from source code ====== | + | ===== Building newRPL from source code ===== |
- | + | ==== Preparing a system for compiling | |
- | ===== Preparing a system for cross compiling | + | |
**Linux** | **Linux** | ||
- | The following instructions are for Ubuntu, package names might change slightly on other distros. | ||
- | Packages to install (either use synaptic package manager, or apt): | + | The following instructions are for //Ubuntu//, package names might change slightly on other distros. |
+ | Packages to install (either use // | ||
+ | |||
+ | < | ||
git | git | ||
libelf-dev | libelf-dev | ||
libudev-dev | libudev-dev | ||
+ | </ | ||
If using other distros, verify that these other packages are installed: | If using other distros, verify that these other packages are installed: | ||
+ | < | ||
gcc | gcc | ||
g++ | g++ | ||
libc6-dev | libc6-dev | ||
+ | </ | ||
- | For Qt, go to [[http://qt-project.org]] and download the open source version. It will download a file named ' | + | and for //Qt//, some 3D related headers (even though not used by **newRPL**) are needed, therefore these packages need to be installed |
- | When it's time to select components, install the latest Qt version (5.10.0 at the time of this writing), the only component needed is the one labeled " | + | < |
+ | libgl-dev | ||
+ | </ | ||
+ | Time to install the //Qt// framework. | ||
+ | - Go to [[http:// | ||
+ | - change the permissions to allow executing it as a program and run it to install //Qt//; | ||
+ | - when it's time to select components, it's very important to open the lists and select a library version and target. **The installer will not select a library version by default**, and failing to select one will leave you without a proper library and unable to build **newRPL**. Select the latest //Qt// version (5.10.0 at the time of this writing), the only component needed is the one labeled '' | ||
+ | **freeBSD** | ||
- | ===== Getting | + | In order to use //Qt Creator//, a graphical desktop needs to be installed (that' |
+ | |||
+ | Packages to install (either using //pkg// or // | ||
+ | |||
+ | < | ||
+ | git | ||
+ | qt5 | ||
+ | qtcreator | ||
+ | </ | ||
+ | |||
+ | And that's all that's required. | ||
+ | |||
+ | For developers wishing to cooperate with the project, another package is needed: | ||
+ | < | ||
+ | gdb | ||
+ | </ | ||
+ | |||
+ | Once the packages are installed, | ||
+ | - start //Qt Creator//, and navigate the menus and dialogs through '' | ||
+ | - verify that everything is populated, and change the Debugger to '' | ||
+ | |||
+ | |||
+ | ==== Preparing a system for cross-compiling | ||
**Linux** | **Linux** | ||
- | git clone https:// | + | The following instructions are for //Ubuntu//, package names might change slightly on other distros. |
+ | |||
+ | Packages to install (either use // | ||
+ | < | ||
+ | gcc-arm-none-eabi | ||
+ | </ | ||
+ | |||
+ | Other packages like | ||
+ | < | ||
+ | binutils-arm-none-eabi | ||
+ | </ | ||
+ | will be installed automatically, | ||
+ | |||
+ | **freeBSD** | ||
+ | |||
+ | Packages to install (either use //pkg// or // | ||
+ | < | ||
+ | arm-none-eabi-gcc | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Getting the source code ==== | ||
+ | |||
+ | **Linux** and **freeBSD** | ||
+ | |||
+ | While at your user's home, open a terminal and run: | ||
+ | |||
+ | '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Building the tools ==== | ||
+ | |||
+ | === elf2rom === | ||
+ | |||
+ | The first tool that needs building is '' | ||
+ | |||
+ | - Open //Qt Creator//, select '' | ||
+ | - select the '' | ||
+ | - when prompted, just click on '' | ||
+ | - at the bottom-left of the screen, there will be an icon that looks like a screen and shows '' | ||
+ | - on the left toolbox, select the wrench '' | ||
+ | - make sure '' | ||
+ | - now from the top menu, '' | ||
+ | - from the bottom of the screen, check the '' | ||
+ | |||
+ | It's done: the '' | ||
+ | |||
+ | === bmp2font === | ||
+ | |||
+ | - Open //Qt Creator//, select '' | ||
+ | - select the '' | ||
+ | - when prompted, just click on '' | ||
+ | - at the bottom-left of the screen, there will be an icon that looks like a screen and shows '' | ||
+ | - on the left toolbox, select the wrench '' | ||
+ | - make sure '' | ||
+ | - now from the top menu, '' | ||
+ | - from the bottom of the screen, check the '' | ||
+ | |||
+ | It's done: the '' | ||
+ | |||
+ | === newRPL standalone compiler === | ||
+ | |||
+ | - Open //Qt Creator//, select '' | ||
+ | - select the '' | ||
+ | - when prompted, just click on '' | ||
+ | - at the bottom-left of the screen, there will be an icon that looks like a screen and shows '' | ||
+ | - on the left toolbox, select the wrench '' | ||
+ | - make sure '' | ||
+ | - now from the top menu, '' | ||
+ | - from the bottom of the screen, check the '' | ||
+ | |||
+ | It's done: the '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Building the newRPL desktop simulator ==== | ||
+ | |||
+ | - Open //Qt Creator//, select '' | ||
+ | - select the '' | ||
+ | - when prompted, just click on '' | ||
+ | - at the bottom-left of the screen, there will be an icon that looks like a screen and shows '' | ||
+ | - on the left toolbox, select the wrench '' | ||
+ | - make sure '' | ||
+ | - now from the top menu, '' | ||
+ | - from the bottom of the screen, check the '' | ||
+ | |||
+ | It's done: the '' | ||
+ | |||
+ | At the lower left area of the screen, use the upper //Play// button (Run without debugging) to start the application. | ||
+ | |||
+ | ==== Building the firmware ==== | ||
+ | |||
+ | - Open //Qt Creator//, select '' | ||
+ | - when prompted, just click on '' | ||
+ | - open a Terminal window and type< | ||
+ | arm-none-eabi-gcc -print-libgcc-file-name | ||
+ | </ | ||
+ | - back to //Qt Creator//, from the left pane open the file '' | ||
+ | GCC_LIBDIR = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</ | ||
+ | - one last check: locate the line that reads< | ||
+ | INCLUDEPATH += firmware/ | ||
+ | </ | ||
+ | - another possible alternative for 64-bit systems is to install the package< | ||
+ | libc6-dev-i386 | ||
+ | </ | ||
+ | INCLUDEPATH += firmware/ | ||
+ | - save and close the file; | ||
+ | - now from the top menu, '' | ||
+ | - from the bottom of the screen, check the '' | ||
+ | |||
+ | To verify that it completed the build, the last output line should read | ||
+ | |||
+ | '' | ||
+ | '' | ||
+ | '' | ||
+ | |||
+ | If you see that line, everything went well, and your build directory (usually named '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Updating the source tree to a new version ==== | ||
+ | When updates are made to the source tree | ||
+ | - open a terminal session and go inside the main source directory (usually '' | ||
+ | git pull | ||
+ | </ | ||
+ | - [[buildfromsource# | ||
+ | - check the compile output to make sure the new version was copied to '' | ||
+ | - with the updated compiler in place, close all projects and [[buildfromsource# | ||
+ | - finally, close all projects and [[buildfromsource# |