Hi,
one can compare documentation level of open-source Numworks calculator with DM42 APIs:
https://hackaday.com/2018/05/18/open-so ... mentation/
How to say politely? Light years ahead ...
DMCP_SDK Hello World
Re: DMCP_SDK Hello World
Hi,
I used the advice in this thread to build DMCP_SDK, SDK-Demo & DM42PGM successfully on Windows 10.
- I did not check the hash checksums.
- I did load the PGM files into the DM42 and all 3 worked!
It took me many hours of trying different ARM tools and diiferent MINGW downloads and some hours to figure out that only "mingw-get-setup.exe" V1.0 and only "gcc-arm-none-eabi-7-2017-q4-major-win32.exe" works. Without this combination, many different unrelated compile errors are coming and the target is not built.
Thank you so much for the advice in this thread which enabled me to set up a build system. It is not difficult (I am not a software dev), just heed the above advice, and the old version of gcc-arm tools - it does work.
Jaco
I used the advice in this thread to build DMCP_SDK, SDK-Demo & DM42PGM successfully on Windows 10.
- I did not check the hash checksums.
- I did load the PGM files into the DM42 and all 3 worked!
It took me many hours of trying different ARM tools and diiferent MINGW downloads and some hours to figure out that only "mingw-get-setup.exe" V1.0 and only "gcc-arm-none-eabi-7-2017-q4-major-win32.exe" works. Without this combination, many different unrelated compile errors are coming and the target is not built.
Thank you so much for the advice in this thread which enabled me to set up a build system. It is not difficult (I am not a software dev), just heed the above advice, and the old version of gcc-arm tools - it does work.
Jaco
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
Re: DMCP_SDK Hello World
Hi,
Maybe I will create a separate forum thread about environment settings for Windows.
BR,Vitali
P.S. I have switched from Lnux laptop to a new one, under Windows 10. And I stopped to use old command line tool - PowerShell works very well.
Good that it works now!
Maybe I will create a separate forum thread about environment settings for Windows.
BR,Vitali
P.S. I have switched from Lnux laptop to a new one, under Windows 10. And I stopped to use old command line tool - PowerShell works very well.
Re: DMCP_SDK Hello World
Hi,
I thought I'd report on my efforts to get this working.
I installed arm-binutils, arm-gcc and arm-gdb on a Linux system (Slackware 15.0).
That's the arm-none-eabi- tools (v. 2.35, 10.2.0 and 10.1 respectively).
I found I also needed to install newlib (v 3.0.0) -- not mentioned anywhere?
Then I got the error:
And indeed src/qspi_crc.h was:
It turns out that I didn't have a crc32 command and bin/check_qspi_crc was failing silently.
I installed the crc_simple package.
Then I ran make (twice) and all is ok.
I still get two odd warnings:
The first one is weird, because 'len' is an int, not a char.
The second one, I have no idea.
So, basically, I had to install newlib and crc32 in addition to the normal arm-none-eabi toolchain.
I thought I'd report on my efforts to get this working.
I installed arm-binutils, arm-gcc and arm-gdb on a Linux system (Slackware 15.0).
That's the arm-none-eabi- tools (v. 2.35, 10.2.0 and 10.1 respectively).
I found I also needed to install newlib (v 3.0.0) -- not mentioned anywhere?
Then I got the error:
Code: Select all
In file included from dmcp/sys/pgm_syscalls.c:56:
src/qspi_crc.h:3:24: error: invalid suffix "x" on integer constant
3 | #define QSPI_DATA_CRC 0x
| ^~
dmcp/sys/pgm_syscalls.c:71:2: note: in expansion of macro 'QSPI_DATA_CRC'
71 | QSPI_DATA_CRC, // uint32_t qspi_crc;
| ^~~~~~~~~~~~~
Code: Select all
#define QSPI_DATA_SIZE 1370864
#define QSPI_DATA_CRC 0x
I installed the crc_simple package.
Then I ran make (twice) and all is ok.
I still get two odd warnings:
Code: Select all
In file included from src/main.c:46:
src/main.c: In function 'add_edit_key':
src/main.c:482:83: warning: array subscript has type 'char' [-Wchar-subscripts]
482 | if ( !dot && ((len == 1 && ed[0] == '0') || (ed[len-1] == '0' && !isdigit(ed[len-2]))) )
| ~~^~~~~~~
src/main.c: In function 'num_format':
src/main.c:283:7: warning: 'strncat' output truncated copying between 0 and 3 bytes from a string of length 38 [-Wstringop-truncation]
283 | strncat(str, zeros, zfad); mode_digits-=zfad;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
The first one is weird, because 'len' is an int, not a char.
The second one, I have no idea.
So, basically, I had to install newlib and crc32 in addition to the normal arm-none-eabi toolchain.
Re: DMCP_SDK Hello World
..and a stupid question
Can one load/run a .pgm file on the simulator (C47 or any other)? There doesn't appear to be SETUP->SYSTEM or SETUP->DMCP.
Can one compile c47 such that it runs an arbitrary .pgm file ?
PS. could someone define the terms 'simulator' and 'emulator'?
Can one load/run a .pgm file on the simulator (C47 or any other)? There doesn't appear to be SETUP->SYSTEM or SETUP->DMCP.
Can one compile c47 such that it runs an arbitrary .pgm file ?
PS. could someone define the terms 'simulator' and 'emulator'?
Re: DMCP_SDK Hello World
No because a .pgm is a program compiled to run on the real calculator hardware (ARM CPU) on top of the DMCP OS, while a simulator such the one for the C47 or the WP43 is running on top of Windows or macOS with a x86 or Apple Mx CPU.
An emulator would emulate the calculator hardware and CPU, allowing to run DMCP and .pgm programs as on the the real calculator.
For example the DM1x are running an emulator of the HP Voyager hardware and CPU and run the original ROMS.
No.
DM42: 00425 - DM41X: β00066 - WP43: 00042
Re: DMCP_SDK Hello World
Ah thanks. Yes, that makes sense.
Re: DMCP_SDK Hello World
Just in case someone tries to run C++ programs, you need a couple of simple patches to DMCP.
https://github.com/swissmicros/DMCP5_SD ... SDK:master
https://github.com/swissmicros/SDKdemo/ ... M42:master
https://github.com/swissmicros/DMCP5_SD ... SDK:master
https://github.com/swissmicros/SDKdemo/ ... M42:master