-
Notifications
You must be signed in to change notification settings - Fork 59
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
HardwareSerial conflicting declaration #42
Comments
HI JosepM,
I didn't see a solution to the problem in the thread you mentioned. Did you?
I'm sorry but I never used a Due before so I'm unfamiliar with this problem.
But I guess whatever solution you find, you can apply it to the controlino
sketch as well.
If you do, please consider making a pull-request with the changes you made.
And btw, please have a look at the develop-v2 thread on Github. I started
implementing a second much-better version of Instrumentino and I'd be
really happy if other interested people would like to join me in its
development.
Thanks,
Joel
…On Wed, Feb 1, 2017 at 2:33 PM, josepmsa ***@***.***> wrote:
Hi!
I am trying to compile controlino for an Arduino Due board, but I am
getting the following error messages:
controlino:97: error: conflicting declaration 'HardwareSerial Serial1'
extern HardwareSerial Serial1; ^ In file included from
/home/jsanchez/.arduino15/packages/arduino/hardware/sam/
1.6.8/cores/arduino/Arduino.h:201:0, from /home/jsanchez/instrumentino-
master/controlino/controlino/controlino.ino:70: /home/jsanchez/.arduino15/
packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.h:247:19:
error: 'Serial1' has a previous declaration as 'USARTClass Serial1' extern
USARTClass Serial1; ^ controlino:98: error: conflicting declaration
'HardwareSerial Serial2' extern HardwareSerial Serial2; ^ In file included
from /home/jsanchez/.arduino15/packages/arduino/hardware/sam/
1.6.8/cores/arduino/Arduino.h:201:0, from /home/jsanchez/instrumentino-
master/controlino/controlino/controlino.ino:70: /home/jsanchez/.arduino15/
packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.h:248:19:
error: 'Serial2' has a previous declaration as 'USARTClass Serial2' extern
USARTClass Serial2; ^ controlino:99: error: conflicting declaration
'HardwareSerial Serial3' extern HardwareSerial Serial3; ^ In file included
from /home/jsanchez/.arduino15/packages/arduino/hardware/sam/
1.6.8/cores/arduino/Arduino.h:201:0, from /home/jsanchez/instrumentino-
master/controlino/controlino/controlino.ino:70: /home/jsanchez/.arduino15/
packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.h:249:19:
error: 'Serial3' has a previous declaration as 'USARTClass Serial3' extern
USARTClass Serial3; ^ controlino:258: error: conflicting declaration
'HardwareSerial Serial' extern HardwareSerial Serial; ^ In file included
from /home/jsanchez/.arduino15/packages/arduino/hardware/sam/
1.6.8/cores/arduino/Arduino.h:201:0, from /home/jsanchez/instrumentino-
master/controlino/controlino/controlino.ino:70: /home/jsanchez/.arduino15/
packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.h:246:18:
error: 'Serial' has a previous declaration as 'UARTClass Serial' extern
UARTClass Serial; ^ exit status 1 conflicting declaration 'HardwareSerial
Serial1'
However, for an Arduino Uno it just works fine and it compiles correctly.
Googling the problem I found this github thread
<mrstig/arduino-netbeans#6>. In the last
comment they mention that those device specific flags may be the origin of
the problem, but I don't know if that is applicable to your code.
Have you ever had this issue before?
Thank you in advanced!
JosepM
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#42>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGTaGwwmEwAPT8dfQsfESJkT8TGGCEcJks5rYIm4gaJpZM4Lz3ht>
.
|
Hello, I have also used instrumentino with the arduino due and I had to make some changes. extern HardwareSerial Serial; and extern HardwareSerial Serial1; On the other hand in order to use SPI comunication. I have replaced: SPI.transfer(strtol(argV[i], NULL, 10)); Best regards, |
Hi!
I am trying to compile controlino for an Arduino Due board, but I am getting the following error messages:
controlino:97: error: conflicting declaration 'HardwareSerial Serial1' extern HardwareSerial Serial1; ^ In file included from /home/jsanchez/.arduino15/packages/arduino/hardware/sam/1.6.8/cores/arduino/Arduino.h:201:0, from /home/jsanchez/instrumentino-master/controlino/controlino/controlino.ino:70: /home/jsanchez/.arduino15/packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.h:247:19: error: 'Serial1' has a previous declaration as 'USARTClass Serial1' extern USARTClass Serial1; ^ controlino:98: error: conflicting declaration 'HardwareSerial Serial2' extern HardwareSerial Serial2; ^ In file included from /home/jsanchez/.arduino15/packages/arduino/hardware/sam/1.6.8/cores/arduino/Arduino.h:201:0, from /home/jsanchez/instrumentino-master/controlino/controlino/controlino.ino:70: /home/jsanchez/.arduino15/packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.h:248:19: error: 'Serial2' has a previous declaration as 'USARTClass Serial2' extern USARTClass Serial2; ^ controlino:99: error: conflicting declaration 'HardwareSerial Serial3' extern HardwareSerial Serial3; ^ In file included from /home/jsanchez/.arduino15/packages/arduino/hardware/sam/1.6.8/cores/arduino/Arduino.h:201:0, from /home/jsanchez/instrumentino-master/controlino/controlino/controlino.ino:70: /home/jsanchez/.arduino15/packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.h:249:19: error: 'Serial3' has a previous declaration as 'USARTClass Serial3' extern USARTClass Serial3; ^ controlino:258: error: conflicting declaration 'HardwareSerial Serial' extern HardwareSerial Serial; ^ In file included from /home/jsanchez/.arduino15/packages/arduino/hardware/sam/1.6.8/cores/arduino/Arduino.h:201:0, from /home/jsanchez/instrumentino-master/controlino/controlino/controlino.ino:70: /home/jsanchez/.arduino15/packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.h:246:18: error: 'Serial' has a previous declaration as 'UARTClass Serial' extern UARTClass Serial; ^ exit status 1 conflicting declaration 'HardwareSerial Serial1'
However, for an Arduino Uno it just works fine and it compiles correctly. Googling the problem I found this github thread. In the last comment they mention that those device specific flags may be the origin of the problem, but I don't know if that is applicable to your code.
Have you ever had this issue before?
Thank you in advanced!
JosepM
The text was updated successfully, but these errors were encountered: