chipKIT® Development Platform

Inspired by Arduino™

HardwareSerial on chipKit max32

Created Wed, 26 Oct 2011 16:55:12 +0000 by hruodbert


hruodbert

Wed, 26 Oct 2011 16:55:12 +0000

Hi, I'm an old user of Arduino and a new user of chipKit max32 platform.

I want to migrate my code from Arduino platform to chipKit max32 platform. My code work perfectly with Arduino Mega2560 but when i try to "upload" my code to chipKit max32 I see:

testPIC.cpp: In function 'int send_query(__uint8_t*, size_t)': testPIC.cpp:823:11: error: 'UCSR0A' was not declared in this scope testPIC.cpp:823:32: error: 'TXC0' was not declared in this scope testPIC.cpp:870:26: error: 'UCSR0A' was not declared in this scope testPIC.cpp:870:41: error: 'TXC0' was not declared in this scope

The row 823 is: UCSR0A=UCSR0A |(1 << TXC0); And the row 870 is: while (!(UCSR0A & (1 << TXC0))); UCSR0A and TXC0 is defined on HardwareSerial.cpp (hardware\arduino\cores\arduino). Do you have any suggestion for resolve my problem?

Thanks, regards

Roberto


avenue33

Wed, 26 Oct 2011 19:22:11 +0000

Another problem with the HardwareSerial implementation for chipKIT is the HardwareSerial class isn't derived from Stream class, unlike Arduino.

I've opened a :arrow: thread and an :arrow: issue at the GitHub repository.