Go Down

Topic: New Arduino-Lite make based compiling platform (Read 1 time) previous topic - next topic

retrolefty


Saw this on the AVRfreaks site:

Quote
Arduino-Lite is a lightweight high-performance firmware library for AVR MCUs, which is developed based on the original Arduino project. Robopeak make it easy to use, just like the Arduino. Compared to the original library, Arduino-Lite generates smaller binaries and perform faster.
And now, we are honored to introduce the Arduino-Lite to the public, and to make it open source.

There are three articles about it. It's too much to post them here. If you are interested in Arduino-Lite, please read the articles by clicking the URL below.



Possible substitute for those hating the Arduino IDE?

http://www.elecfreaks.com/92.html
http://www.elecfreaks.com/120.html
http://www.elecfreaks.com/167.html

Lefty

Coding Badly

One problem I found: You cannot pass variables for pin numbers.  I'm not sure what the result is but this does not work...

{
 uint8_t i;
 for ( i=3; i < 7; ++i )
   pinMode( i , OUTPUT );
}

I believe this makes it very likely that most libraries will not work.  Without the libraries, you may as well do direct port manipulation.

But I have not tried it, so the problem may not be that serious.

frank26080115


One problem I found: You cannot pass variables for pin numbers.  I'm not sure what the result is but this does not work...

{
 uint8_t i;
 for ( i=3; i < 7; ++i )
   pinMode( i , OUTPUT );
}

I believe this makes it very likely that most libraries will not work.  Without the libraries, you may as well do direct port manipulation.

But I have not tried it, so the problem may not be that serious.



I was under the impression that the original Arduino functions would work just like before but he added new macro versions (thus more efficient but can't use variables) of the same function, but renamed to be all uppercase.

see http://code.google.com/p/arduino-lite/source/browse/trunk/src/core/wiring_lit.h
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

retrolefty


One problem I found: You cannot pass variables for pin numbers.  I'm not sure what the result is but this does not work...

{
 uint8_t i;
 for ( i=3; i < 7; ++i )
   pinMode( i , OUTPUT );
}

I believe this makes it very likely that most libraries will not work.  Without the libraries, you may as well do direct port manipulation.

But I have not tried it, so the problem may not be that serious.



I think they are offering a complete rewrite of a set of 'arduino' functions (looks to be MACRO based), but you are correct in that pin number as a run time variable is not implemented. I haven't loaded it yet, as I would rather get feedback from the more compentent software types.

Lefty

Coding Badly

#4
Apr 29, 2011, 06:37 am Last Edit: Apr 29, 2011, 06:40 am by Coding Badly Reason: 1
Quote
I was under the impression that the original Arduino functions would work just like before but he added new macro versions (thus more efficient but can't use variables) of the same function, but renamed to be all uppercase.


Let's work through ANALOG_WRITE called with two variables ( i and x )...

ANALOG_WRITE( i, x );

do { PWM_ENABLE(i); PWM_SET(i,x); } while ( 0 );

do { EXPAND_WRAPPER(_PWM_ENABLE ,ARDUINOPIN_TO_TCCRID(i) , ARDUINOPIN_TO_TIMERID(i) ); EXPAND_WRAPPER(_PWM_SET, ARDUINOPIN_TO_TIMERID(i), x ); } while ( 0 );

do { _PWM_ENABLE(ARDUINOPIN_TO_TCCRID(i), ARDUINOPIN_TO_TIMERID(i)); _PWM_SET( ARDUINOPIN_TO_TIMERID(i), x ); } while ( 0 );

do { _PWM_ENABLE(TCCR_AT_PIN_##i, TIMER_AT_PIN_##i); _PWM_SET( TIMER_AT_PIN_##i, x ); } while ( 0 );

do { _PWM_ENABLE(TCCR_AT_PIN_i, TIMER_AT_PIN_i); _PWM_SET( TIMER_AT_PIN_i, x ); } while ( 0 );

do { sbi(TCCR, COM##TCCR_AT_PIN_i##1); do { OCR##TIMER_AT_PIN_i = x; } while(0); } while ( 0 );

do { sbi(TCCR, COMTCCR_AT_PIN_i1); do { OCRTIMER_AT_PIN_i = x; } while(0); } while ( 0 );

COMTCCR_AT_PIN_i1 and OCRTIMER_AT_PIN_i are undeclared identifiers.  Didn't work.


As far as I can tell, the various digital*Fast variations provide the same features offered in Arduino-Lite without any of the drawbacks.

Go Up