Post Reply 
HPGCC3 - discussion and troubleshooting
11-02-2023, 06:47 PM (This post was last modified: 11-02-2023 07:04 PM by ramon_ea1gth.)
Post: #1
HPGCC3 - discussion and troubleshooting
After reading about HPGCC and NewRPL for some time, and testing in my HP50g some HPGCC2 programs from hpcalc.org, I decided it was time to give HPGCC3 a try, as the idea to use C in the HP50g looks awesome.

I'm following the Installation instructions, written by Claudio and I guess I'm close to it, as I was able to run the install_plugin.sh script in Eclipse.
Now I'm stuck at Chapter 3, 'Building the libraries', trying to build the project make_rom.

Most of the project gets built (I guess). But I get an error when coping the file thumb/libgcc.a as shown below:
Code:

14:38:51 **** Incremental Build of configuration Debug for project install_all ****
make all 
Creating target directories...
mkdir -p /home/user/hpgcc3/lib
mkdir -p /home/user/hpgcc3/include
mkdir -p /home/user/hpgcc3/rom
cp /usr/lib/gcc/arm-none-eabi/10.3.1/libgcc.a /home/user/hpgcc3/lib/libarmgcc.a
cp /usr/lib/gcc/arm-none-eabi/10.3.1/thumb/libgcc.a /home/user/hpgcc3/lib/libgcc.a

Checking the contents of that directory, there is no libgcc.a available, but under the directories:
Code:

user@:~$ ls /usr/lib/gcc/arm-none-eabi/10.3.1/thumb
nofp  v7-a       v7e-m     v7+fp       v7ve+simd        v8-a+simd  v8-m.main+dp
v6-m  v7-a+fp    v7e-m+dp  v7-m        v8.1-m.main+mve  v8-m.base  v8-m.main+fp
v7    v7-a+simd  v7e-m+fp  v7-r+fp.sp  v8-a             v8-m.main

So just to test, I copied updir nofp/libgcc.a to make it available to the builder, as seen now:
Code:

user@:~$ ls /usr/lib/gcc/arm-none-eabi/10.3.1/thumb
libgcc.a  v7-a       v7e-m+dp  v7-r+fp.sp       v8-a+simd     v8-m.main+fp
nofp      v7-a+fp    v7e-m+fp  v7ve+simd        v8-m.base
v6-m      v7-a+simd  v7+fp     v8.1-m.main+mve  v8-m.main
v7        v7e-m      v7-m      v8-a             v8-m.main+dp

After this, the building continued successfully (?) until trying cp romentries.list /home/user/hpgcc3/lib, because romentries.list doesn't exist in the directory. This is the listing when building:
Code:

14:55:06 **** Incremental Build of configuration Debug for project install_all ****
make all 
Creating target directories...
mkdir -p /home/user/hpgcc3/lib
mkdir -p /home/user/hpgcc3/include
mkdir -p /home/user/hpgcc3/rom
cp /usr/lib/gcc/arm-none-eabi/10.3.1/libgcc.a /home/user/hpgcc3/lib/libarmgcc.a
cp /usr/lib/gcc/arm-none-eabi/10.3.1/thumb/libgcc.a /home/user/hpgcc3/lib/libgcc.a
Installing files...
cp "HPGCC3 License Agreement.txt" /home/user/hpgcc3
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/crt0'
cp *.o RLld.script /home/user/hpgcc3/lib
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/crt0'
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/decnumber'
cp libdecnumber.a /home/user/hpgcc3/lib
cp libarmdecnumber.a /home/user/hpgcc3/lib
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/decnumber'
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/fsystem'
cp libfsystem.a /home/user/hpgcc3/lib
cp libarmfsystem.a /home/user/hpgcc3/lib
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/fsystem'
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/ggl'
cp libggl.a /home/user/hpgcc3/lib
cp libarmggl.a /home/user/hpgcc3/lib
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/ggl'
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/gui'
cp libgui.a /home/user/hpgcc3/lib
cp libguivt.a /home/user/hpgcc3/lib
cp libarmgui.a /home/user/hpgcc3/lib
cp libarmguivt.a /home/user/hpgcc3/lib
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/gui'
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/headers'
cp *.h /home/user/hpgcc3/include
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/headers'
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/hpg'
cp libhpg.a /home/user/hpgcc3/lib
cp libarmhpg.a /home/user/hpgcc3/lib
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/hpg'
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/hplib'
cp libhplib.a /home/user/hpgcc3/lib
cp libarmhplib.a /home/user/hpgcc3/lib
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/hplib'
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/launchers'
cp liblaunchers.a /home/user/hpgcc3/lib
cp libarmlaunchers.a /home/user/hpgcc3/lib
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/launchers'
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/make_rom'
cp hpgccrom.bin /home/user/hpgcc3/rom/hpgccrom.bin
echo hpgccrom.bin > /home/user/hpgcc3/rom/update.scp
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/make_rom'
make[1]: se entra en el directorio '/home/user/hpgcc3/libs_workspace/romlib'
cp romentries.list /home/user/hpgcc3/lib
cp: no se puede efectuar `stat' sobre 'romentries.list': No existe el archivo o el directorio
make[1]: se sale del directorio '/home/user/hpgcc3/libs_workspace/romlib'
make[1]: *** [Makefile:11: install] Error 1
make: *** [Makefile:32: all] Error 2
"make all" terminated with exit code 2. Build might be incomplete.

14:55:06 Build Failed. 2 errors, 0 warnings. (took 517ms)


So I'm wondering if this is related to using the right toolchain or there is something else. Any help is appreciated.

This is my system info: Linux Mint 21.2 Cinnamon (based on Ubuntu 22.04 LTS, so it is roughly an Ubuntu system).
I installed gcc-arm-none-eabi from the packet manager. No gdb-arm-none-eabi packet was available so I guess it is embedded in the gcc packet. About the arm-none-eabi:
Code:

$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (15:10.3-2021.07-4) 10.3.1 20210621 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Ramón
Valladolid, Spain
TI-50, Casio fx-180P, HP48GX, HP50g, HP Prime G2
Visit this user's website Find all posts by this user
Quote this message in a reply
11-04-2023, 05:06 PM (This post was last modified: 11-04-2023 05:16 PM by Claudio L..)
Post: #2
RE: HPGCC3 - discussion and troubleshooting
You need an older gcc compiler. The chip in the 50g uses the armv4t which has been deprecated years ago. You'll need to google which was the last version of gcc with full support for armv4t.

https://www.phoronix.com/news/GCC-9-Dropping-Older-ARM

(Another edit...) The ARM Developer website led me to the Linaro project. I think the last one I tested with hpgcc3 was 6.3, but I see no reason why gcc7 or gcc8 wouldn't work better, as long as they still have support for armv4t.

http://releases.linaro.org/components/to.../binaries/
Find all posts by this user
Quote this message in a reply
11-04-2023, 05:27 PM
Post: #3
RE: HPGCC3 - discussion and troubleshooting
Besides needing the right compiler, the issue with romentries.list might be due to python: There's a small python script that extracts entry points and putputs romentries.list as part of its process. It may be failing either because of incompatibility with newer python, or maybe the newer toolchain (uses arm-none-eabi-objdump to extract information). So first try with an older toolchain, if that doesn't solve the issue you may need to debug that python script to see why it's failing, or downgrade to a python from 2014 Smile)
Find all posts by this user
Quote this message in a reply
11-06-2023, 10:42 AM
Post: #4
RE: HPGCC3 - discussion and troubleshooting
Both clues, the compiler and the romentries.list python script, look interesting directions to narrow the problem. I will take a look at both things and give feedback.
Thanks Claudio!

Ramón
Valladolid, Spain
TI-50, Casio fx-180P, HP48GX, HP50g, HP Prime G2
Visit this user's website Find all posts by this user
Quote this message in a reply
11-27-2023, 11:24 AM
Post: #5
RE: HPGCC3 - discussion and troubleshooting
I'm keeping an eye on this thread's progress. Similar Mint distro, I could not get it working either. I tried the MixiH Docker container from Github, after a couple of changes I got it to build, but have not gotten it to work yet.

I am able to run HPGCC2 native on Windows and produce binaries that work on my 49g+ so I'm sticking with that for the time being.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)