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):
git libelf-dev libudev-dev
If using other distros, verify that these other packages are installed:
gcc g++ libc6-dev
and for Qt, some 3D related headers (even though not used by newRPL) are needed, therefore these packages need to be installed as well:
libgl-dev
Time to install the Qt framework.
qt-unified-…
;Desktop gcc 64-bits
. Make sure at least that component is checked.freeBSD
In order to use Qt Creator, a graphical desktop needs to be installed (that's outside the scope of this article).
Packages to install (either using pkg or OctoPkg):
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,
Tools
, Options…
, Build&Run
, Kits
and select the Desktop
(default) configuration;System GDB at /usr/local/bin/gdb
which is the version of gdb that was just installed. This is needed only to debug the code, not needed if the objective is simply to have a running version of newRPL Desktop.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):
gcc-arm-none-eabi
Other packages like
binutils-arm-none-eabi
will be installed automatically, on other distros this might be different and it needs to be installed separately.
freeBSD
Packages to install (either use pkg or OctoPkg):
arm-none-eabi-gcc
Linux and freeBSD
While at your user's home, open a terminal and run:
git clone https://git.code.sf.net/p/newrpl/sources newrpl-sources
The first tool that needs building is elf2rom
.
Open Project
, and go into newrpl-sources/tools/elf2rom
;elf2rom.pro
project file;Configure project
;Debug
: change it to Release
;Projects
to access the build settings;Release
is the selected configuration, then Add Build Step
/ Make
, and in the Make arguments:
box type install
;Build
, Run QMake
, then Rebuild All
;Compile Output
pane to see if everything went well. Quite often, the last step make install
says there's nothing new to install when there's actually a newly built executable. Another round of Run QMake
and Rebuild All
usually shows in the output pane that the file is being copied to newrpl/tools-bin
which is the expected result.
It's done: the elf2rom
tool was built and installed in the appropriate location to be used by the other projects. Select Close all projects and editors
from the main menu to end the session.
Open Project
, and go into newrpl-sources/tools/fonts/bmp2font
;bmp2font.pro
project file;Configure project
;Debug
: change it to Release
;Projects
to access the build settings;Release
is the selected configuration, then Add Build Step
/ Make
, and in the Make arguments:
box type install
;Build
, Run QMake
, then Rebuild All
;Compile Output
pane to see if everything went well. Quite often, the last step make install
says there's nothing new to install when there's actually a newly built executable. Another round of Run QMake
and Rebuild All
usually shows in the output pane that the file is being copied to newrpl/tools-bin
which is the expected result.
It's done: the bmp2font
tool was built and installed in the appropriate location to be used by the other projects. Select Close all projects and editors
from the main menu to end the session.
Open Project
, and go into newrpl-sources
;newrpl-comp.pro
project file;Configure project
;Debug
: change it to Release
;Projects
to access the build settings;Release
is the selected configuration, then Add Build Step
/ Make
, and in the Make arguments:
box type install
;Build
, Run QMake
, then Rebuild All
;Compile Output
pane to see if everything went well. Quite often, the last step make install
says there's nothing new to install when there's actually a newly built executable. Another round of Run QMake
and Rebuild All
usually shows in the output pane that the file is being copied to newrpl/tools-bin
which is the expected result.
It's done: the newrpl-comp
tool was built and installed in the appropriate location to be used by the other projects. Select Close all projects and editors
from the main menu to end the session.
Open Project
, and go into newrpl-sources
;newrpl-ui.pro
project file;Configure project
;Debug
: change it to Release
;Projects
to access the build settings;Release
is the selected configuration, then Add Build Step
/ Make
, and in the Make arguments:
box type install
;Build
, Run QMake
, then Rebuild All
;Compile Output
pane to see if everything went well. Quite often, the last step make install
says there's nothing new to install when there's actually a newly built executable. Another round of Run QMake
and Rebuild All
usually shows in the output pane that the file is being copied to newrpl-sources
which is the expected result.
It's done: the newrpl-ui
tool was built and installed in the appropriate location to be used by the other projects. Select Close all projects and editors
from the main menu to end the session.
At the lower left area of the screen, use the upper Play button (Run without debugging) to start the application.
Open Project
, and go into newrpl-sources
, then select the relevant project file: newrpl-fw.pro
for the 50g target, newrpl-fw39.pro
for the 39g+ / 39gs target, newrpl-fw40.pro
for the 40gs target;Configure project
;arm-none-eabi-gcc -print-libgcc-file-name
It will print the full path to a file called libgcc.a
. Remember that path (without the /libgcc.a
part);
newrpl-fw.pro
, and scroll down to a line that readsGCC_LIBDIR = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Change that path to match exactly the path we got from the previous step;
INCLUDEPATH += firmware/include newrpl xxxxxxxxxxxxxxx
The xxxxxxxxxxxxxxx
should point to suitable headers. In particular on a 64-bit system the system headers might be incompatible and cause errors. The first attempt should be to keep the defaults, and if any errors appear, to change it to /usr/include/newlib
(or wherever there's a suitable 32-bit library). While newRPL will not link to or use the library in any way, some standard headers are expected to provide definitions;
libc6-dev-i386
which in most cases should allow to keep the default directories. For Ubuntu it works with the defaults, for other systems change that to /usr/include/newlib
, so the line reads
INCLUDEPATH += firmware/include newrpl /usr/include/newlib
Build
, Run QMake
, then Rebuild All
;Compile Output
pane to see if everything went well. There might be some warnings, but there should be no hard errors. There could be many warnings, depending on your version of gcc and your system: these warnings change all the time but they are harmless.To verify that it completed the build, the last output line should read
Binary image written to “newrplfw.bin”
(for HP50g target) or
Binary image written to “newrpl39.bin”
(for HP39g+ / 39gs target) or
Binary image written to “newrpl40.bin”
(for HP40gs target)
If you see that line, everything went well, and your build directory (usually named build-newrpl-fw-Desktop…
) will contain the firmware file, which is the ROM that needs to be flashed on the calculator.
When updates are made to the source tree
newrpl-sources
), and issuegit pull
This will update the source code to the lastest version;
newrpl/tools-bin
, if not then repeat the steps Run QMake
and Rebuild all
;Run QMake
step is not optional, it needs to be manually executed to make sure the build number is updated, otherwise the VERSION
command will report the incorrect build number;