Subject:
|
Re: brickOS & GNU Pascal (update)
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Fri, 1 Nov 2002 20:10:08 GMT
|
Viewed:
|
2788 times
|
| |
| |
In lugnet.robotics.rcx.legos, Ross Crawford writes:
> Great work John! Do you have any comparisons of executable sizes between C/C++
> and Pascal/OOP?
Pascal/OOP definitely adds a bit of overhead. It is possible that some of
that overhead could be lessened by tweaking the Pascal headers. I'm going
to fiddle a bit with a couple of different approaches to see what works best
now that I have a set that appear to function properly.
Here are lx file sizes for (nearly) all the brickOS demos:
C++ OOP
366 activeSensor.lx 1,986 oopActiveSensor.lx
76 batt.lx 728 oopBatt.lx
612 lightSensor.lx 2,108 oopLightSensor.lx
492 motor.lx 1,148 oopMotor.lx
2,224 raceTrack.lx 3,372 oopRaceTrack.lx
756 rotationSensor.lx 2,248 oopRotSensor.lx
1,100 rover.lx 1,936 oopRover.lx
366 sensor.lx 1,980 oopSensor.lx
82 sound.lx 696 oopSound.lx
1,570 temperatureSensor.lx 3,208 oopTempSensor.lx
572 touch.pressed.Sensor.lx 2,114 oopTouchPressedSensor.lx
564 touchSensor.lx 2,108 oopTouchSensor.lx
942 c++.lx 826 oop.lx
C Pascal
80 helloworld.lx 470 helloworld2.lx
394 linetrack.lx 1,882 linetrack2.lx
90 robots.lx 302 robots2.lx
256 rover.lx 1,920 rover2.lx
160 sound.lx 386 sound2.lx
4,422 trailerbot.lx 6,030 trailerbot2.lx
Also, I have put a couple zips up on my website.
1. brickos_pascal.zip
(http://members.aol.com/johnbinder/brickos_pascal.zip). This file contains
the pascal headers in lib\p and demo pascal files in pasdemo and
pasdemo\oop. It also contains a couple of makefile diffs in
makefile.common_diffs amd makefile.user_diffs. All the files (except the
diff files) have DOS line endings (CRLF). Extract to your brickOS root
directory.
2. gpc_h8_min.zip (http://members.aol.com/johnbinder/gpc_h8_min.zip). This
file contains pre-built binaries for the GNU Pascal compiler built on a
cygwin system for the Hitachi H8. Extract to c:\cygwin\usr\local and add
the h8\bin directory to your path (export $PATH:/usr/local/h8/bin or set
PATH=%PATH%;c:\cygwin\usr\local\h8\bin).
Once you've got these files and extracted them and tweaked your brickOS
makefiles per the diffs in brickos_pascal.zip you'll need to make the Pascal
libraries. That should be as simple as changing directory to lib\p and
typing make. Then in the pasdemo directory you should be able to make
without any problems.
LMKWYT. And e-mail if you have any problems getting it to work.
John Hansen
|
|
Message is in Reply To:
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|