Announcing DB48X, RPL for DM42
Announcing DB48X, RPL for DM42
I am happy to announce the first baby steps of DB48X, a project to recreate an HP48-like RPL environment on the DB42. Early this morning, it successfully ran its first RPL program, so I think it is time to share. Here is a quick video of the current state: https://youtu.be/WYlU2oSehoA. Please understand that this is still _very_ rough and incomplete (I started this about 20 days ago).
The project repository is here: https://github.com/c3d/DB48X-on-DM42/tree/sim. You can build the firmware, but there is also a DM42 simulator in it, which makes it easier to develop and run tests.
Please note that there is also an earlier attempt at https://github.com/c3d/db48x/tree/dm42, which you should ignore. It proved a bit too big to fit in the DM42 without claiming the QSPI, which makes installation unnecessarily complex. I'll try to fit in the 704K of available storage as much as possible.
Here is where the community can already help:
1. Improving the on-line documentation: https://github.com/c3d/DB48X-on-DM42/tree/sim/doc. You can read it, suggest corrections, etc. The on-line documentation is written using quasi-standard markdown, but *italics* and _keyboard_ are distinct styles. Also, in "my" flavor of markdown, _ X _ is valid, and is a key `X` with two spaces around it.
2. Making comments and suggestions on the proposed design
3. Submitting code, if you feel like it.
Please use GitHub to report issues or make suggestions, rather than this forum.
The project repository is here: https://github.com/c3d/DB48X-on-DM42/tree/sim. You can build the firmware, but there is also a DM42 simulator in it, which makes it easier to develop and run tests.
Please note that there is also an earlier attempt at https://github.com/c3d/db48x/tree/dm42, which you should ignore. It proved a bit too big to fit in the DM42 without claiming the QSPI, which makes installation unnecessarily complex. I'll try to fit in the 704K of available storage as much as possible.
Here is where the community can already help:
1. Improving the on-line documentation: https://github.com/c3d/DB48X-on-DM42/tree/sim/doc. You can read it, suggest corrections, etc. The on-line documentation is written using quasi-standard markdown, but *italics* and _keyboard_ are distinct styles. Also, in "my" flavor of markdown, _ X _ is valid, and is a key `X` with two spaces around it.
2. Making comments and suggestions on the proposed design
3. Submitting code, if you feel like it.
Please use GitHub to report issues or make suggestions, rather than this forum.
-
- Posts: 130
- Joined: Fri Jul 21, 2017 11:08 pm
Re: Announcing DB48X, RPL for DM42
This looks great! However, I'm having a problem building the code. Having cloned it, I notice that the "recorder/" folder is linked to a submodule. So I've run and then to get the code. However, I get this error message:
What am I doing wrong?
Thanks in advance for your help!
Nigel (UK)
Code: Select all
git submodule init
Code: Select all
git submodule update
Code: Select all
Cloning into '/home/nd/programs/db48x/DB48X-on-DM42/recorder'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:c3d/recorder' into submodule path '/home/nd/programs/db48x/DB48X-on-DM42/recorder' failed
Thanks in advance for your help!
Nigel (UK)
-
- Posts: 1107
- Joined: Tue May 02, 2017 5:48 pm
- Location: Netherlands
- Contact:
Re: Announcing DB48X, RPL for DM42
Very nice!!
Re: Announcing DB48X, RPL for DM42
You are doing nothing wrong. I will fix the submodule path.Nigel (UK) wrote: ↑Sun Oct 30, 2022 10:58 pmThis looks great! However, I'm having a problem building the code. Having cloned it, I notice that the "recorder/" folder is linked to a submodule. So I've runand thenCode: Select all
git submodule init
to get the code. However, I get this error message:Code: Select all
git submodule update
What am I doing wrong?Code: Select all
Cloning into '/home/nd/programs/db48x/DB48X-on-DM42/recorder'... git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. fatal: clone of 'git@github.com:c3d/recorder' into submodule path '/home/nd/programs/db48x/DB48X-on-DM42/recorder' failed
Thanks in advance for your help!
Nigel (UK)
Re: Announcing DB48X, RPL for DM42
This problem should be fixed now. Can you try again?Nigel (UK) wrote: ↑Sun Oct 30, 2022 10:58 pmand the repository exists.
fatal: clone of 'git@github.com:c3d/recorder' into submodule path '/home/nd/programs/db48x/DB48X-on-DM42/recorder' failed
[/code]
-
- Posts: 130
- Joined: Fri Jul 21, 2017 11:08 pm
Re: Announcing DB48X, RPL for DM42
Thank you, this now works. Both "recorder" and "make-it-quick" now appear where they should. However, running "make" gives an error :
Adding #include <cerrno> at line 44 of ttf2font.cpp fixes this.
I now have a .pgm file to try! I'll try to build the simulator tomorrow. Many thanks.
Nigel (UK)
Code: Select all
ttf2font.cpp: In function ‘void processFont(cstring, cstring, cstring, int, int)’:
ttf2font.cpp:185:41: error: ‘errno’ was not declared in this scope
185 | fprintf(stderr, "Error %d: %s", errno, strerror(errno));
| ^~~~~
ttf2font.cpp:75:1: note: ‘errno’ is defined in header ‘<cerrno>’; did you forget to ‘#include <cerrno>’?
74 | #include "ids.tbl"
+++ |+#include <cerrno>
75 | };
I now have a .pgm file to try! I'll try to build the simulator tomorrow. Many thanks.
Nigel (UK)
-
- Posts: 130
- Joined: Fri Jul 21, 2017 11:08 pm
Re: Announcing DB48X, RPL for DM42
Just to confirm that I have successfully built the simulator. If anyone else wants to try, here's a few things that I had to change to get it to work.
1: 001: Integer addition Segmentation fault (core dumped)
but it's early days yet!
Nigel (UK)
- I had to install Qt development packages. I already had some, but not enough!
- I had to add the Intel Decimal floating-point maths library gcc111libbid.a for my machine (which I already had) to the lib/ folder. If you don't already have this you have to download the source and build it.
- My compiler wasn't finding a definition for wchar_t (type for wide characters). This is supposed to be in stddefs.h, but for some reason on my machine it isn't. I added typedef unsigned int wchar_t; to recorder.c and recorder_ring.c to get around this.
- I had to add -fpermissive to the CXXFLAGS and CFLAGS in simulator.mak to get the code to compile. simulator.mak is generated by qmake from simulator.pro, so this change will have to be reapplied if make sim is run again from scratch.
- I had to replace the line return test(first).test(args...); (line 205 in tests.h) with return test(first, args...);
for the code to compile without error.
1: 001: Integer addition Segmentation fault (core dumped)
but it's early days yet!
Nigel (UK)
Re: Announcing DB48X, RPL for DM42
Hi Nigel,
Could you tell me which errors you get without -fpermissive?
Also, which compiler / OS are you building on?
Thanks,
Christophe
Could you tell me which errors you get without -fpermissive?
Also, which compiler / OS are you building on?
Thanks,
Christophe
-
- Posts: 130
- Joined: Fri Jul 21, 2017 11:08 pm
Re: Announcing DB48X, RPL for DM42
Here is a sample of the error messages:
I took the appearance of [-fpermissive] after the error to be a Sign of how to overcome the problem!
I'm using Ubuntu 22.04.1 LTS. The compiler is gcc 11.3.0.
Nigel (UK)
Code: Select all
In file included from ../src/arithmetic.h:34,
from ../src/input.cc:32:
../src/decimal-64.h: In constructor ‘decimal64::decimal64(uint64_t, object::id)’:
../src/decimal-64.h:70:39: error: invalid conversion from ‘uint64_t*’ {aka ‘long unsigned int*’} to ‘BID_UINT64*’ {aka ‘long long unsigned int*’} [-fpermissive]
70 | bid64_from_uint64(&num.value, &value);
| ^~~~~~
| |
| uint64_t* {aka long unsigned int*}
^~
In file included from ../src/arithmetic.h:34,
from ../src/input.cc:32:
../src/decimal-64.h: In constructor ‘decimal64::decimal64(int64_t, object::id)’:
../src/decimal-64.h:78:38: error: invalid conversion from ‘int64_t*’ {aka ‘long int*’} to ‘BID_SINT64*’ {aka ‘long long int*’} [-fpermissive]
78 | bid64_from_int64(&num.value, &value);
| ^~~~~~
| |
| int64_t* {aka long int*}
In file included from ../src/arithmetic.h:35,
from ../src/input.cc:32:
../src/decimal128.h: In constructor ‘decimal128::decimal128(uint64_t, object::id)’:
../src/decimal128.h:70:40: error: invalid conversion from ‘uint64_t*’ {aka ‘long unsigned int*’} to ‘BID_UINT64*’ {aka ‘long long unsigned int*’} [-fpermissive]
70 | bid128_from_uint64(&num.value, &value);
| ^~~~~~
| |
| uint64_t* {aka long unsigned int*}
I'm using Ubuntu 22.04.1 LTS. The compiler is gcc 11.3.0.
Nigel (UK)
Re: Announcing DB48X, RPL for DM42
So is this building fine on UNIX (and Mac) systems now, or are there still library problems?
What's the current state of the DM42 build?
What's the current state of the DM42 build?
DM42, DM16L, and a menagerie of HPs thanks to CAS (Calc Acq Syndrome)!