Installing WP43S on OSX (Mac)

General discussion about calculators, Swiss Micros or otherwise
hoverbeek
Posts: 17
Joined: Sat Sep 21, 2019 1:54 pm

Re: Installing WP43S on OSX (Mac)

Post by hoverbeek » Fri May 08, 2020 2: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.
DM41X SN: 00070 DM42 SN: 00754
HP35, ..., HP67, HP41(C,CV,CX), ..., HP48GX, ..., HP33S, HP35S, WP34S, WP43S

User avatar
Jaymos
Posts: 568
Joined: Sun Nov 04, 2018 6:03 pm
Location: Cape Town

Re: Installing WP43S on OSX (Mac)

Post by Jaymos » Fri May 08, 2020 3:02 pm

hoverbeek wrote:
Fri May 08, 2020 2: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
WP34C, HP42S, DM42 for complex math; 35S, 28C, 32Sii, WP34S, EL-506P, EL-W506, PB700; owned FX702P & 11C; used 67 & 85. iOS: 42s (Byron), Free42, WP31S/34S, HCalc.
WP43C running on DM42 sn. 03818 .

hoverbeek
Posts: 17
Joined: Sat Sep 21, 2019 1:54 pm

Re: Installing WP43S on OSX (Mac)

Post by hoverbeek » Fri May 08, 2020 3: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.
DM41X SN: 00070 DM42 SN: 00754
HP35, ..., HP67, HP41(C,CV,CX), ..., HP48GX, ..., HP33S, HP35S, WP34S, WP43S

User avatar
Jaymos
Posts: 568
Joined: Sun Nov 04, 2018 6:03 pm
Location: Cape Town

Re: Installing WP43S on OSX (Mac)

Post by Jaymos » Fri May 08, 2020 5:55 pm

hoverbeek wrote:
Fri May 08, 2020 3: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
WP34C, HP42S, DM42 for complex math; 35S, 28C, 32Sii, WP34S, EL-506P, EL-W506, PB700; owned FX702P & 11C; used 67 & 85. iOS: 42s (Byron), Free42, WP31S/34S, HCalc.
WP43C running on DM42 sn. 03818 .

hoverbeek
Posts: 17
Joined: Sat Sep 21, 2019 1:54 pm

Re: Installing WP43S on OSX (Mac)

Post by hoverbeek » Thu May 14, 2020 1:56 pm

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