HPGCC questions



#5

I'm interested in learning to use C/C++ on the 50g and porting some small programs I've written over the years. Both HPGCC 2.0SP2 and HPGCC3 are available. Which one should I start with? Are there any advantages and disadvantages to using one version over the other? They seem to have different origins, or at least HPGCC3 is a rewrite with a revised license if I understood correctly.


#6

I believe that HPGCC3 creates stand-alone programs, which is an improvement over HPGCC 2.0 which requires a library on the 50g. The lib can convert the program to stand-alone, or it can launch the program itself.

I think I also heard that HPGCC3 has a more extensive library.

On the plus side for HPGCC 2.0, it's been around longer so it may be more stable. Also, to make a shameless plug, my HPObjects library currently only works with HPGCC 1.1 and 2.0. The library lets you easily access and convert HP calculator objects (numbers, integers, lists, strings etc) into C equivalents, and back again. The library that comes with HPGCC 2.0 comes with some of this functionality, but the interfaces are inconsistent and only a few objects are supported.

Here are some handy links:

Egan Ford's excellent HPGCC 2 tutorial.

My HPObjects library

Good luck! I think you'll find it quite rewarding. HPGCC programs typically run 100 times faster than User RPL programs. On the other hand, they are typically about 100 times larger. On the third hand, you can always copy the actual program to an SD card, and replace it on the calculator with a small stub program that recalls it from the card and runs it. This saves you the space in HOME, but it still takes a large amount of RAM to run.

Feel free to contact me for help with HPGCC 2 programming.

Dave


#7

Quote:
I believe that HPGCC3 creates stand-alone programs, which is an improvement over HPGCC 2.0 which requires a library on the 50g. The lib can convert the program to stand-alone, or it can launch the program itself.

HPGCC 3 requires a custom ROM on the 50g. This is not a problem unless you plan to redistribute your code. At that is not a problem if all target machines have the custom ROM. Whereas HPGCC 2 will run on unmodified machines.

HPGCC 3 is faster, or at least the beta versions were that I tested a while ago. I wrote some pretty fast factorization programs with HPGCC 3. I could overclock the processor to 192 MHz.

I'd start with HPGCC 3 since that is the current supported version from the developers and fallback to HPGCC 2 if you want to leave your 50g with the HP blessed ROM.

P.S. I've had the HPGCC 3 ROMs on my 50g for years without any issues and I could still run HPGCC 2 code.

Edited: 29 Sept 2011, 10:09 p.m.


#8

Thanks for both responses. I decided to give HPGCC3 a whirl and was able to get it compiled into the 2.15 ROM and loaded this weekend. The tutorial on hpgcc3.org was helpful as well.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HPGCC Documentation Clint Weathers 1 312 06-02-2011, 07:28 AM
Last Post: Bart (UK)
  Mathematica code with C + HPGCC Sujith Abraham 3 480 10-01-2010, 11:01 AM
Last Post: Sujith Abraham
  HPGCC Jan Kromhout 0 256 09-10-2009, 04:43 PM
Last Post: Jan Kromhout
  HPGCC and Steamtable Calculations (IF97) Jan Kromhout 7 896 09-09-2009, 01:02 PM
Last Post: David Hayden
  HPGCC.ORG ?????? Jan Kromhout 1 369 09-06-2009, 02:46 AM
Last Post: Howard Owen
  Extend your 50g with C (HPGCC 2.0 SP2) Jan Kromhout 1 332 09-03-2009, 09:46 AM
Last Post: Egan Ford
  Error message in Hpapine, HPGCC,XP Jan Kromhout 2 387 08-30-2009, 11:53 AM
Last Post: Jan Kromhout
  HPGCC 2 Tutorial Updated with Vista, OS/X, More Examples Egan Ford 0 261 12-01-2008, 02:02 AM
Last Post: Egan Ford
  HPGCC 2.0SP2 C Tutorial Updated Egan Ford 0 264 05-30-2008, 01:17 AM
Last Post: Egan Ford

Forum Jump: