Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling in DUE #1

Open
Leamucho opened this issue Oct 14, 2014 · 6 comments
Open

Compiling in DUE #1

Leamucho opened this issue Oct 14, 2014 · 6 comments

Comments

@Leamucho
Copy link

Hello, I know you haven´t tested on Due, but well, I'am, so I got the following results, although on 1.5.6r2 didnt...
It seems to me it is plainly a matter of names not being adressed but I'm really not familiar with the avr stuff... Not sure if I can be of any help, good day:

In file included from G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/Arduino.h:31:0,
from G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:36:
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp: In member function 'void AnalogScanner::beginScanning()':
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:229:7: error: 'ADCSRA' was not declared in this scope
sbi(ADCSRA, ADEN); // Enable the ADC.
^
G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/avr/pgmspace.h:10:23: note: in definition of macro '_SFR_BYTE'
#define _SFR_BYTE(n) (n)
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:229:3: note: in expansion of macro 'sbi'
sbi(ADCSRA, ADEN); // Enable the ADC.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:229:15: error: 'ADEN' was not declared in this scope
sbi(ADCSRA, ADEN); // Enable the ADC.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:45:46: note: in definition of macro 'sbi'
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:45:49: error: '_BV' was not declared in this scope
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:229:3: note: in expansion of macro 'sbi'
sbi(ADCSRA, ADEN); // Enable the ADC.
^
In file included from G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/Arduino.h:31:0,
from G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:36:
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:231:7: error: 'ADMUX' was not declared in this scope
cbi(ADMUX, ADLAR); // Make sure the ADC value it right-jusitified.
^
G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/avr/pgmspace.h:10:23: note: in definition of macro '_SFR_BYTE'
#define _SFR_BYTE(n) (n)
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:231:3: note: in expansion of macro 'cbi'
cbi(ADMUX, ADLAR); // Make sure the ADC value it right-jusitified.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:231:14: error: 'ADLAR' was not declared in this scope
cbi(ADMUX, ADLAR); // Make sure the ADC value it right-jusitified.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:42:47: note: in definition of macro 'cbi'
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:232:15: error: 'ADIE' was not declared in this scope
sbi(ADCSRA, ADIE); // Enable ADC complete interrupts.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:45:46: note: in definition of macro 'sbi'
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
^
In file included from G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/Arduino.h:31:0,
from G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:36:
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp: In member function 'void AnalogScanner::endScanning()':
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:240:7: error: 'ADCSRA' was not declared in this scope
cbi(ADCSRA, ADEN); // Disable the ADC.
^
G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/avr/pgmspace.h:10:23: note: in definition of macro '_SFR_BYTE'
#define _SFR_BYTE(n) (n)
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:240:3: note: in expansion of macro 'cbi'
cbi(ADCSRA, ADEN); // Disable the ADC.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:240:15: error: 'ADEN' was not declared in this scope
cbi(ADCSRA, ADEN); // Disable the ADC.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:42:47: note: in definition of macro 'cbi'
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:42:50: error: '_BV' was not declared in this scope
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:240:3: note: in expansion of macro 'cbi'
cbi(ADCSRA, ADEN); // Disable the ADC.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:241:15: error: 'ADIE' was not declared in this scope
cbi(ADCSRA, ADIE); // Disable ADC complete interrupts.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:42:47: note: in definition of macro 'cbi'
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp: In member function 'void AnalogScanner::startNextScan()':
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:255:5: error: 'ADMUX' was not declared in this scope
ADMUX = (analogRef << 6) | (index & 7);
^
In file included from G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/Arduino.h:31:0,
from G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:36:
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:256:9: error: 'ADCSRA' was not declared in this scope
sbi(ADCSRA, ADSC); // Start the ADC conversion.
^
G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/avr/pgmspace.h:10:23: note: in definition of macro '_SFR_BYTE'
#define _SFR_BYTE(n) (n)
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:256:5: note: in expansion of macro 'sbi'
sbi(ADCSRA, ADSC); // Start the ADC conversion.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:256:17: error: 'ADSC' was not declared in this scope
sbi(ADCSRA, ADSC); // Start the ADC conversion.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:45:46: note: in definition of macro 'sbi'
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:45:49: error: '_BV' was not declared in this scope
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:256:5: note: in expansion of macro 'sbi'
sbi(ADCSRA, ADSC); // Start the ADC conversion.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp: In member function 'void AnalogScanner::processScan()':
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:263:13: error: 'ADCL' was not declared in this scope
int low = ADCL;
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:264:14: error: 'ADCH' was not declared in this scope
int high = ADCH;
^

@merose
Copy link
Owner

merose commented Oct 14, 2014

Thanks very much for the feedback. I'd like to make it work on Due, but don't have one myself. I'll look in to this this week and get back to you.

Mark

Mark Rose
markrose@acm.org
925.922.7263
From: Leamucho notifications@github.com
To: merose/AnalogScanner AnalogScanner@noreply.github.com
Sent: Tuesday, October 14, 2014 6:24 AM
Subject: [AnalogScanner] Compiling in DUE (#1)

Hello, I know you haven´t tested on Due, but well, I'am, so I got the following results, although on 1.5.6r2 didnt...
It seems to me it is plainly a matter of names not being adressed but I'm really not familiar with the avr stuff... Not sure if I can be of any help, good day:In file included from G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/Arduino.h:31:0,
from G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:36:
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp: In member function 'void AnalogScanner::beginScanning()':
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:229:7: error: 'ADCSRA' was not declared in this scope
sbi(ADCSRA, ADEN); // Enable the ADC.
^
G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/avr/pgmspace.h:10:23: note: in definition of macro '_SFR_BYTE'
#define _SFR_BYTE(n) (n)
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:229:3: note: in expansion of macro 'sbi'
sbi(ADCSRA, ADEN); // Enable the ADC.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:229:15: error: 'ADEN' was not declared in this scope
sbi(ADCSRA, ADEN); // Enable the ADC.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:45:46: note: in definition of macro 'sbi'
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:45:49: error: '_BV' was not declared in this scope
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:229:3: note: in expansion of macro 'sbi'
sbi(ADCSRA, ADEN); // Enable the ADC.
^
In file included from G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/Arduino.h:31:0,
from G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:36:
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:231:7: error: 'ADMUX' was not declared in this scope
cbi(ADMUX, ADLAR); // Make sure the ADC value it right-jusitified.
^
G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/avr/pgmspace.h:10:23: note: in definition of macro '_SFR_BYTE'
#define _SFR_BYTE(n) (n)
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:231:3: note: in expansion of macro 'cbi'
cbi(ADMUX, ADLAR); // Make sure the ADC value it right-jusitified.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:231:14: error: 'ADLAR' was not declared in this scope
cbi(ADMUX, ADLAR); // Make sure the ADC value it right-jusitified.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:42:47: note: in definition of macro 'cbi'
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:232:15: error: 'ADIE' was not declared in this scope
sbi(ADCSRA, ADIE); // Enable ADC complete interrupts.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:45:46: note: in definition of macro 'sbi'
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
^
In file included from G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/Arduino.h:31:0,
from G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:36:
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp: In member function 'void AnalogScanner::endScanning()':
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:240:7: error: 'ADCSRA' was not declared in this scope
cbi(ADCSRA, ADEN); // Disable the ADC.
^
G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/avr/pgmspace.h:10:23: note: in definition of macro '_SFR_BYTE'
#define _SFR_BYTE(n) (n)
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:240:3: note: in expansion of macro 'cbi'
cbi(ADCSRA, ADEN); // Disable the ADC.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:240:15: error: 'ADEN' was not declared in this scope
cbi(ADCSRA, ADEN); // Disable the ADC.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:42:47: note: in definition of macro 'cbi'
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:42:50: error: '_BV' was not declared in this scope
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:240:3: note: in expansion of macro 'cbi'
cbi(ADCSRA, ADEN); // Disable the ADC.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:241:15: error: 'ADIE' was not declared in this scope
cbi(ADCSRA, ADIE); // Disable ADC complete interrupts.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:42:47: note: in definition of macro 'cbi'
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp: In member function 'void AnalogScanner::startNextScan()':
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:255:5: error: 'ADMUX' was not declared in this scope
ADMUX = (analogRef << 6) | (index & 7);
^
In file included from G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/Arduino.h:31:0,
from G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:36:
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:256:9: error: 'ADCSRA' was not declared in this scope
sbi(ADCSRA, ADSC); // Start the ADC conversion.
^
G:\media\arduino\arduino-1.5.7\hardware\arduino\sam\cores\arduino/avr/pgmspace.h:10:23: note: in definition of macro '_SFR_BYTE'
#define _SFR_BYTE(n) (n)
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:256:5: note: in expansion of macro 'sbi'
sbi(ADCSRA, ADSC); // Start the ADC conversion.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:256:17: error: 'ADSC' was not declared in this scope
sbi(ADCSRA, ADSC); // Start the ADC conversion.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:45:46: note: in definition of macro 'sbi'
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:45:49: error: '_BV' was not declared in this scope
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:256:5: note: in expansion of macro 'sbi'
sbi(ADCSRA, ADSC); // Start the ADC conversion.
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp: In member function 'void AnalogScanner::processScan()':
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:263:13: error: 'ADCL' was not declared in this scope
int low = ADCL;
^
G:\Lea\Arduino\libraries\AnalogScanner\AnalogScanner.cpp:264:14: error: 'ADCH' was not declared in this scope
int high = ADCH;
^—
Reply to this email directly or view it on GitHub.

@Leamucho
Copy link
Author

Ok, thanks to you too!!, did you get any thing during the week? greetings

@merose
Copy link
Owner

merose commented Oct 18, 2014

I'm running the IDE version 1.0.6, and it compiles successfully on all boards (although, as you note, I can only test on Uno right now).
I see that you are running IDE 1.5.7. I will download the 1.5.8 beta and see if it compiles there for Due.
Also, I've pushed a minor change and an example program to Github.

Mark

Mark Rose
markrose@acm.org
925.922.7263
From: Leamucho notifications@github.com
To: merose/AnalogScanner AnalogScanner@noreply.github.com
Cc: Mark Rose markrose@acm.org
Sent: Friday, October 17, 2014 4:06 PM
Subject: Re: [AnalogScanner] Compiling in DUE (#1)

Ok, thanks to you too!!, did you get any thing during the week? greetings


Reply to this email directly or view it on GitHub.

@Leamucho
Copy link
Author

No luck!, 1.5.8 same results... if you could point me out in which file you find definitions for boards, I could watch about ADCSRA, ADEN, etc for due... is it the right approach?
greets

@Leamucho
Copy link
Author

also found this http://forum.arduino.cc/index.php?PHPSESSID=st5uoq6kcv65o4psc5dhkl6954&topic=253882.0
so I guess the architecture wont let us do what the library does.... :S

@merose
Copy link
Owner

merose commented Jan 28, 2015

Still don't have a Due to test against. Hope to come back to this soon. However, have now updated the library to work with the Leonardo, so other AVR chips should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants