arduino / arduino/ArduinoCore-samd

SoftwareSerial examples for Arduino M0 will not compile

Open
#234 6 comments 0 reactions 0 assignees View on GitHub
waiting for feedback
Dominant language
C
Stars
502
Forks
740
PR merge metrics
No merged PRs in 30d

Description

IDE: 1.8.2
Installation: C:\Program Files (x86)\Arduino\portable\packages\arduino\hardware\samd\1.6.15\libraries\SoftwareSerial\SoftwareSerial.cpp and \SoftwareSerial.h (from github from samd hardware)

Application : SoftwareSerialExample.ino (the original example)

Errors:
```
sketch\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setTX(uint8_t)':

SoftwareSerial.cpp:174: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile PORT_OUT_Type*' in assignment

_transmitPortRegister = portOutputRegister(port);

^

sketch\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setRX(uint8_t)':

SoftwareSerial.cpp:186: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile PORT_IN_Type*' in assignment

_receivePortRegister = portInputRegister(port);

^

exit status 1
cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile PORT_OUT_Type*' in assignment
```

What is wrong in the data type/ struc/?? that breaks this function? Attempted to port srv code base to samd base and the broken samd version does not work for serial I/O. Does anyone have a working example or modified .cpp / .h set that works?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with SoftwareSerial.cpp and SoftwareSerial.h from the SAMD hardware library, focusing on setTX and setRX and the reported register assignment errors. Reproduce the build with SoftwareSerialExample.ino in Arduino IDE 1.8.2; done means the example compiles for the Arduino M0 and supports the reported serial I/O path.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.