MajorCore ATmega162: SoftwareSerial lib errors

Sorry if I'm in the wrong section, but I can't figure out what the problem is.
I have a problem with ATmega162 and MajorCore using the <SoftwareSerial.h> library.
Errors when compiling even with empty code:

#include <SoftwareSerial.h>

void setup() { }

void loop() { }

Errors:

 In file included from
...\MajorCore\hardware\avr\3.0.2\cores\MCUdude_corefiles/Arduino.h:393:0,

...\MajorCore\hardware\avr\3.0.2\libraries\SoftwareSerial\src\SoftwareSerial.cpp:45:

...\MajorCore\hardware\avr\3.0.2\libraries\SoftwareSerial\src\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':

...\MajorCore\hardware\avr\3.0.2\variants\standard/pins_arduino.h:49:35: error: invalid type argument of unary '*' (have 'int')

 #define digitalPinToPCICR(p)    (0)

                                   ^

...\MajorCore\hardware\avr\3.0.2\libraries\SoftwareSerial\src\SoftwareSerial.cpp:371:6: note: in expansion of macro 'digitalPinToPCICR'

   *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));

    ^~~~~~~~~~~~~~~~~

exit status 1

I use Arduino: 1.8.19

this lib is not yet adopted for this particular chip

Do you need software serial? A look at the datasheet shows that the chip has two UARTs.

I've installed MajorCore and a code with both Serial.begin() and Serial1.begin() compiles for the Atmega162.

1 Like

I just needed to read data from one Serial, and transfer the received data to the terminal for verification.
I tried Serial1, but for some reason it didn't work, so I wanted to do it using a third-party library.
In any case, thank you, I will remember this information.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.