HPGCC and Steamtable Calculations (IF97)



#9

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


#10

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.

#11

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.


#12

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.


#13

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


#14

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


#15

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).

#16

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.


Possibly Related Threads…
Thread Author Replies Views Last Post
  [wp34s] Alternative MIO (allows calculations when entering element values) David Maier 1 1,095 02-03-2013, 02:51 PM
Last Post: Marcus von Cube, Germany
  Financial Calculations for the HP41: another enhanced version Luiz C. Vieira (Brazil) 0 855 04-16-2012, 09:16 AM
Last Post: Luiz C. Vieira (Brazil)
  [WP 34S] Complex calculations (poll) Walter B 41 9,080 04-08-2012, 01:44 AM
Last Post: Paul Dale
  HPGCC questions Steve Fennell 3 1,538 10-02-2011, 06:42 PM
Last Post: Steve Fennell
  HPGCC Documentation Clint Weathers 1 971 06-02-2011, 07:28 AM
Last Post: Bart (UK)
  Date calculations on the 35s PeterP 5 1,845 04-03-2011, 05:15 PM
Last Post: Eddie W. Shore
  Mathematica code with C + HPGCC Sujith Abraham 3 1,308 10-01-2010, 11:01 AM
Last Post: Sujith Abraham
  HPGCC Jan Kromhout 0 742 09-10-2009, 04:43 PM
Last Post: Jan Kromhout
  HPGCC.ORG ?????? Jan Kromhout 1 1,021 09-06-2009, 02:46 AM
Last Post: Howard Owen
  Extend your 50g with C (HPGCC 2.0 SP2) Jan Kromhout 1 938 09-03-2009, 09:46 AM
Last Post: Egan Ford

Forum Jump: