The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

HPGCC and Steamtable Calculations (IF97)
Message #1 Posted by Jan Kromhout on 7 Sept 2009, 12:53 p.m.

I have transfered the Steamtable calculation IAPWS-IF97(as you can find on several places on the net) to small subroutines (functions)

With these functios I created the calculations (executable). On this moment I have finished 10 small executables for the HP50g.

Every module is tested with HPAPINE. I love this tool because every time sending the finished routine to the HP and test it cost a lot of time!

I have two questions.

1. When I created to big functions the S->EXE aborts on amount of memmory (I have no programs on the HP). Is it posible to create these exe outside the HP50G.

2. Is the memmory on the SD card seen as physical memmory? Supose I have an programm greater than then the memmory of the HP and stored on the SD Card, can it running?

Thanks in advance.

Jan Kromhout Hellevoetsluis-NL

      
Re: HPGCC and Steamtable Calculations (IF97)
Message #2 Posted by Egan Ford on 7 Sept 2009, 3:48 p.m.,
in response to message #1 by Jan Kromhout

Quote:
1. When I created to big functions the S->EXE aborts on amount of memmory (I have no programs on the HP). Is it posible to create these exe outside the HP50G.
No. You will need a 50g or 50g emulator. In either case 50G RAM is limited. At least with an emulator you can have a clean slate maximizing your memory available for S->EXE. IIRC, S->EXE fails when the object code size is > ~70K.

The alternative is to use PrRUN. This will require that the ARMToolBox be installed on the 50g to execute. My largest PrRUN binary is 183K.

Quote:
2. Is the memmory on the SD card seen as physical memmory? Supose I have an programm greater than then the memmory of the HP and stored on the SD Card, can it running?
No, the SD card is storage. You can store your program on the SD, but when it executes it will load into RAM.
            
Re: HPGCC and Steamtable Calculations (IF97)
Message #3 Posted by hugh steers on 7 Sept 2009, 4:22 p.m.,
in response to message #2 by Egan Ford

what happened to hpgcc 3. wasn't this supposed to fix this problem of needing the armtoolbox. or did it come out already?

any chance of C++ on the 50g. actually, i only need the very basics like classes, virtual functions and operator overloading. no need for templates or fancy pants C++ libs like the stl.

                  
Re: HPGCC and Steamtable Calculations (IF97)
Message #4 Posted by Egan Ford on 7 Sept 2009, 5:38 p.m.,
in response to message #3 by hugh steers

Quote:
what happened to hpgcc 3. wasn't this supposed to fix this problem of needing the armtoolbox. or did it come out already?
I do not know. Email to the authors gets bounced back. I still have the beta and the 2.09 custom ROM that eliminates the need for the toolbox.

The last time I heard from Claudio was March 2009. He sent me some x49gp patches so that I could use x49gp as a debugger with Eclipse. Very cool indeed.

Quote:
any chance of C++ on the 50g. actually, i only need the very basics like classes, virtual functions and operator overloading. no need for templates or fancy pants C++ libs like the stl.
You should be able to use any ARM cross compiler with the c-based libraries. Others have (e.g. David Hayden's Sudoku solver: http://www.hpcalc.org/details.php?id=7062). On my long list of things-to-do-that-will-never-get-done, are new ARM cross compilers with C++, Fortran, Java, and Obj C support for use with the HPGCC 2 C-libs.

JYA's versions of the cross compiler for OS/X and Linux does have C++ ready to go (http://www.hydrix.com/Download/Hp/hpgcc/). I cannot remember where I downloaded my ARM cross compiler for Windows that included C++. Google will know.

                        
Re: HPGCC and Steamtable Calculations (IF97)
Message #5 Posted by Tim Wessman on 7 Sept 2009, 5:58 p.m.,
in response to message #4 by Egan Ford

It would be unfortunate if HPGCC died. The website has been down for several months now.

I think part of the problem was that every time anyone got excited to work on something, the response was "Well yes, but HPGCC3 has removed that/is no longer needed/is complete/etc". I can understand the desire to have things mostly complete before release, but going too long with no news just looses the interest that was already there. :-(

TW

                              
Re: HPGCC and Steamtable Calculations (IF97)
Message #6 Posted by Egan Ford on 7 Sept 2009, 6:00 p.m.,
in response to message #5 by Tim Wessman

HPGCC3 as-is, is awesome. Yes, it'd be too bad.

                                    
Re: HPGCC and Steamtable Calculations (IF97)
Message #7 Posted by gjermund skailand on 9 Sept 2009, 6:11 a.m.,
in response to message #6 by Egan Ford

I agree, especially since HPGCC3 has an compiler option which includes up to 1024bytes of slack space, such that compiled programs can be executed directly from port 2. The program is then not moved to any RAM, simply executed directly from port 2 (flash).

                        
Re: HPGCC and Steamtable Calculations (IF97)
Message #8 Posted by David Hayden on 9 Sept 2009, 1:02 p.m.,
in response to message #4 by Egan Ford

Thanks for the reference, Egan.

Hugh, there are 3 small tricks to getting C++ to work with hpgcc.

  1. Modify the Makefile to use the c++ compiler for c++ code
  2. define "new" and "delete" operators
  3. Add appropriate glue to jump from the main() program (in C) to the C++ code.
I found one problem related to initializing static variables It was either initializing a static with a function call, or initializing a static within a function.

See my sudoku solver for an example. I used HPGCC 2.0 to compile it.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall