Installing WP43S on OSX (Mac)

This area is for discussion about these families of custom high-end Scientific Calculator applications for SwissMicros devices.
hoverbeek
Posts: 17
Joined: Sat Sep 21, 2019 3:54 pm

Re: Installing WP43S on OSX (Mac)

Post by hoverbeek »

Hi Jaymos,

Issue is fixed now :lol: :lol: :lol: :lol:

For the Mac users. I tend to use XCode now for just presenting the C files, the colours and such.
I also use vi for editing and do most of the things on the terminal.
On the terminal I use git and make. In most case I start the application with ./wp43s.
Sometimes from the debugger.
DM41X SN: 00070 DM42 SN: 00754
HP35, ..., HP67, HP41(C,CV,CX), ..., HP48GX, ..., HP33S, HP35S, WP34S, WP43S
User avatar
Jaymos
Posts: 1651
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: Installing WP43S on OSX (Mac)

Post by Jaymos »

hoverbeek wrote:
Fri May 08, 2020 4:27 pm
Hi Jaymos,

Issue is fixed now :lol: :lol: :lol: :lol:

For the Mac users. I tend to use XCode now for just presenting the C files, the colours and such.
I also use vi for editing and do most of the things on the terminal.
On the terminal I use git and make. In most case I start the application with ./wp43s.
Sometimes from the debugger.
True, it works on the Mac, but there is still the same crashing and recently endless loop issue for huge long integers that seems hard to find on the DM42.

Currently on Mac I compile via make and the the terminal. I use Sublime Text for editing as the colours and IQ is good.
On my Mac I have no debugger working to trace, step and check variables. Do you know how to install that? Is it even possible?
The big pain often is XQuartz which very often stops working, and does not want to open a screen when you start the wp43* from the terminal.
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.
hoverbeek
Posts: 17
Joined: Sat Sep 21, 2019 3:54 pm

Re: Installing WP43S on OSX (Mac)

Post by hoverbeek »

The trick is adding:
CFLAGS += -g -O0 -v
to Makefile

Then 'make rebuild'.
Then run the app from the debugger: lldb wp43s
Then type r for run. The calculator now comes up and you can do whatever you want to test.
If the application crashes, type bt (back trace).
This will tell you exactly where the app crashes!

After that either type qy (quit, yes) or r (run) for another go.

(-g: generates additional symbolic debugging information for use with gdb debugger.
Apple does not use gdb, but instead lldb which is more or less the same.)

Type man lldb for more stuff you can do with the debugger.
DM41X SN: 00070 DM42 SN: 00754
HP35, ..., HP67, HP41(C,CV,CX), ..., HP48GX, ..., HP33S, HP35S, WP34S, WP43S
User avatar
Jaymos
Posts: 1651
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: Installing WP43S on OSX (Mac)

Post by Jaymos »

hoverbeek wrote:
Fri May 08, 2020 5:18 pm
The trick is adding:
CFLAGS += -g -O0 -v
to Makefile

Then 'make rebuild'.
Then run the app from the debugger: lldb wp43s
Then type r for run. The calculator now comes up and you can do whatever you want to test.
If the application crashes, type bt (back trace).
This will tell you exactly where the app crashes!

After that either type qy (quit, yes) or r (run) for another go.

(-g: generates additional symbolic debugging information for use with gdb debugger.
Apple does not use gdb, but instead lldb which is more or less the same.)

Type man lldb for more stuff you can do with the debugger.
Thank you so much. Can't wait for the next crash ...
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.
hoverbeek
Posts: 17
Joined: Sat Sep 21, 2019 3:54 pm

Re: Installing WP43S on OSX (Mac)

Post by hoverbeek »

A tip. Often I use 'make' and then I start the app a lot.
Or first 'make' and then 'lldb wp43s' (WP43S in the debugger).

On the terminal, enter 'make && ./wp43s' or 'make && lldb wp43s'.
It does a make and if there are errors, it stops.
If no errors are in the 'make', then it will start the calculator.

Saves some time!
DM41X SN: 00070 DM42 SN: 00754
HP35, ..., HP67, HP41(C,CV,CX), ..., HP48GX, ..., HP33S, HP35S, WP34S, WP43S
Post Reply