Subject:
|
legOS development release imminent / C++
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Sun, 14 Feb 1999 15:12:05 GMT
|
Original-From:
|
Markus L. Noga <noga@inrialpes.fr+antispam+>
|
Viewed:
|
1571 times
|
| |
| |
Hello everyone,
there'll be a new development release shortly. This will probably be
less stable than 0.1.6. I've been working on and integrating
contributions for many different features:
- automatic generation of API documentation with doxygen
- bugfixes
- math routines
- libc.a, libiberty.a
- compiler issues
- C++ support (with egcs-1.1.1)
Currently, I have a stub of less than 600 bytes (subtract symbols, and
we're probably at 300 bytes) that allows very basic usage of classes and
inheritance. Things that don't work include new/delete, the virtual
modifier and exceptions. All these functions seem to be strongly
intertwined with RTTI, thus take up an big amount of memory - too much
to suit firmdl.
I'm worried about compactness with C++ in general. The code generated by
this function is 76 bytes long:
void do_sensing_c() {
int i;
ds_active(&SENSOR_1);
for(i=0; i<100; i++) {
cputw(SENSOR_1);
lcd_refresh();
delay(20);
}
ds_passive(&SENSOR_1);
}
The exact same thing in C++ generates 232 bytes:
void do_sensing_cpp() {
Sensor s(Sensor::s1,1);
for(int i=0; i<100; i++) {
cputw(s.value());
lcd_refresh();
delay(20);
}
}
A factor of three. I'm not sure whether it's worth treading this path.
Markus.
--
Markus L. Noga noga@inrialpes.fr
Check out legOS! http://www.multimania.com/legos/
"Wer zitiert, benutzt sein Gedächtnis, nicht seinen Verstand."
-Nietzsche
"Quand on n'a pas de caractere, il faut bien se donner une methode."
-Camus
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics
|
|
Message has 1 Reply: | | Re: legOS development release imminent / C++
|
| (...) These don't look exactly the same to me, but without the definition of Sensor, its hard to say... Cheers, Ben. -- (URL) grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to (...) (26 years ago, 14-Feb-99, to lugnet.robotics)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|