Pages: [1]   Go Down
Author Topic: New Arduino-Lite make based compiling platform  (Read 1208 times)
0 Members and 1 Guest are viewing this topic.
Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16497
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 176
Posts: 12285
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
God Member
*****
Karma: 0
Posts: 594
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Freelance engineer, consultant, contractor. Graduated from UW in 2013.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16497
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 176
Posts: 12285
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: April 28, 2011, 11:40:46 pm by Coding Badly » Logged

Pages: [1]   Go Up
Jump to: