"PlatformIO" has an error. "Arduino IDE" has no error

If you build the code below from “Arduino IDE”, it works well.
However, if you build using PlatformIO, an error appears.
Development environment. : Platformio.ini

[env:nrf52840_lora]
platform = nordicnrf52
board = adafruit_feather_nrf52840
framework = arduino

Arduino IDE
https://www.adafruit.com/package_adafruit_index.json

#include <SoftwareSerial.h>

SoftwareSerial mySerial(12, 11); // RX, TX
SoftwareSerial mySerial1(9, 10); // RX, TX


void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  while ( !Serial ) delay(10);   // for nrf52840 with native usb

  Serial.println("Goodnight moon!");
 
  // set the data rate for the SoftwareSerial port
  mySerial.begin(115200);
  mySerial.println("Hello, world?");

  mySerial1.begin(115200);
  mySerial1.println("Hello, world?");
}

void loop() // run over and over//
{
/*
  if (mySerial.available()) 
    Serial.write(mySerial.read());

  if (Serial.available())
    mySerial.write(Serial.read());
*/    
    mySerial.println("Hello Serial 1");
    mySerial1.println("Hello Serial 2");
    Serial.println("Hello Serial 0!");
    delay(100);
}

Error Coce

.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:285:2: error: #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors
 #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors
  ^~~~~
Archiving .pio\build\nrf52840_dk\libFrameworkArduinoVariant.a
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp: In member function 'bool SoftwareSerial::listen()':
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:341:23: error: 'SREG' was not declared in this scope
     uint8_t oldSREG = SREG;
                       ^~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:341:23: note: suggested alternative: 'AREF'
     uint8_t oldSREG = SREG;
                       ^~~~
                       AREF
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:342:5: error: 'cli' was not declared in this scope
     cli();
     ^~~
In file included from .pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:43:0:
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setTX(uint8_t)':
C:\Users\fishi\.platformio\packages\framework-arduinoadafruitnrf52\cores\nRF5/Arduino.h:138:67: error: invalid conversion from 'NRF_GPIO_Type*' to 'uint8_t {aka unsigned char}' [-fpermissive]
   #define digitalPinToPort(P)        ( (g_ADigitalPinMap[P] < 32) ? NRF_P0 : NRF_P1 )
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:517:18: note: in expansion of macro 'digitalPinToPort'
   uint8_t port = digitalPinToPort(tx);
                  ^~~~~~~~~~~~~~~~
C:\Users\fishi\.platformio\packages\framework-arduinoadafruitnrf52\cores\nRF5/Arduino.h:148:44: error: base operand of '->' is not a pointer
 #define portOutputRegister(port)   ( &(port->OUT) )
                                            ^
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:518:27: note: in expansion of macro 'portOutputRegister'
   _transmitPortRegister = portOutputRegister(port);
                           ^~~~~~~~~~~~~~~~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::setRX(uint8_t)':
C:\Users\fishi\.platformio\packages\framework-arduinoadafruitnrf52\cores\nRF5/Arduino.h:138:67: error: invalid conversion from 'NRF_GPIO_Type*' to 'uint8_t {aka unsigned char}' [-fpermissive]
   #define digitalPinToPort(P)        ( (g_ADigitalPinMap[P] < 32) ? NRF_P0 : NRF_P1 )
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:528:18: note: in expansion of macro 'digitalPinToPort'
   uint8_t port = digitalPinToPort(rx);
                  ^~~~~~~~~~~~~~~~
C:\Users\fishi\.platformio\packages\framework-arduinoadafruitnrf52\cores\nRF5/Arduino.h:149:65: error: base operand of '->' is not a pointer
 #define portInputRegister(port)    ( (volatile uint32_t*) &(port->IN) )
                                                                 ^
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:529:26: note: in expansion of macro 'portInputRegister'
   _receivePortRegister = portInputRegister(port);
                          ^~~~~~~~~~~~~~~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:540:31: error: 'table' was not declared in this scope
   for (unsigned i=0; i<sizeof(table)/sizeof(table[0]); ++i)
                               ^~~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:540:31: note: suggested alternative: 'tanl'
   for (unsigned i=0; i<sizeof(table)/sizeof(table[0]); ++i)
                               ^~~~~
                               tanl
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:556:9: error: 'digitalPinToPCICR' was not declared in this scope
     if (digitalPinToPCICR(_receivePin))
         ^~~~~~~~~~~~~~~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:556:9: note: suggested alternative: 'digitalPinToPort'
     if (digitalPinToPCICR(_receivePin))
         ^~~~~~~~~~~~~~~~~
         digitalPinToPort
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:558:46: error: 'digitalPinToPCICRbit' was not declared in this scope
       *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));
                                              ^~~~~~~~~~~~~~~~~~~~
Archiving .pio\build\nrf52840_dk\lib52f\libBluefruit52Lib.a
Compiling .pio\build\nrf52840_dk\FrameworkArduino\Tone.cpp.o
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:558:46: note: suggested alternative: 'digitalPinToPort'
       *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));
                                              ^~~~~~~~~~~~~~~~~~~~
                                              digitalPinToPort
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:558:42: error: '_BV' was not declared in this scope
       *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));
                                          ^~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:558:42: note: suggested alternative: '_B'
       *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));
                                          ^~~
                                          _B
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:559:8: error: 'digitalPinToPCMSK' was not declared in this scope
       *digitalPinToPCMSK(_receivePin) |= _BV(digitalPinToPCMSKbit(_receivePin));
        ^~~~~~~~~~~~~~~~~
Compiling .pio\build\nrf52840_dk\FrameworkArduino\Uart.cpp.o
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:559:8: note: suggested alternative: 'digitalPinToPort'
       *digitalPinToPCMSK(_receivePin) |= _BV(digitalPinToPCMSKbit(_receivePin));
        ^~~~~~~~~~~~~~~~~
        digitalPinToPort
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:559:46: error: 'digitalPinToPCMSKbit' was not declared in this scope
       *digitalPinToPCMSK(_receivePin) |= _BV(digitalPinToPCMSKbit(_receivePin));
                                              ^~~~~~~~~~~~~~~~~~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:559:46: note: suggested alternative: 'digitalPinToPort'
       *digitalPinToPCMSK(_receivePin) |= _BV(digitalPinToPCMSKbit(_receivePin));
                                              ^~~~~~~~~~~~~~~~~~~~
                                              digitalPinToPort
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::end()':
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:574:7: error: 'digitalPinToPCMSK' was not declared in this scope
   if (digitalPinToPCMSK(_receivePin))
       ^~~~~~~~~~~~~~~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:574:7: note: suggested alternative: 'digitalPinToPort'
   if (digitalPinToPCMSK(_receivePin))
       ^~~~~~~~~~~~~~~~~
       digitalPinToPort
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:575:45: error: 'digitalPinToPCMSKbit' was not declared in this scope
     *digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));
                                             ^~~~~~~~~~~~~~~~~~~~
Compiling .pio\build\nrf52840_dk\FrameworkArduino\WInterrupts.c.o
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:575:45: note: suggested alternative: 'digitalPinToPort'
     *digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));
                                             ^~~~~~~~~~~~~~~~~~~~
                                             digitalPinToPort
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:575:41: error: '_BV' was not declared in this scope
     *digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));
                                         ^~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:575:41: note: suggested alternative: '_B'
     *digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));
                                         ^~~
                                         _B
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp: In member function 'virtual size_t SoftwareSerial::write(uint8_t)':
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:610:21: error: 'SREG' was not declared in this scope
   uint8_t oldSREG = SREG;
                     ^~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:610:21: note: suggested alternative: 'AREF'
   uint8_t oldSREG = SREG;
                     ^~~~
                     AREF
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:611:3: error: 'cli' was not declared in this scope
   cli();  // turn off interrupts for a clean txmit
   ^~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:615:26: error: 'XMIT_START_ADJUSTMENT' was not declared in this scope
   tunedDelay(_tx_delay + XMIT_START_ADJUSTMENT);
                          ^~~~~~~~~~~~~~~~~~~~~
Compiling .pio\build\nrf52840_dk\FrameworkArduino\WMath.cpp.o
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp: In member function 'virtual void SoftwareSerial::flush()':
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:658:21: error: 'SREG' was not declared in this scope
   uint8_t oldSREG = SREG;
                     ^~~~
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:658:21: note: suggested alternative: 'AREF'
   uint8_t oldSREG = SREG;
                     ^~~~
                     AREF
.pio\libdeps\nrf52840_dk\SoftwareSerial\SoftwareSerial.cpp:659:3: error: 'cli' was not declared in this scope
   cli();
   ^~~
Compiling .pio\build\nrf52840_dk\FrameworkArduino\WString.cpp.o
*** [.pio\build\nrf52840_dk\lib963\SoftwareSerial\SoftwareSerial.cpp.o] Error 1

Where is #include <Arduino.h> at the top? See FAQ.

Works for me when I do that.

>pio run
Processing adafruit_feather_nrf52840 (platform: nordicnrf52; board: adafruit_feather_nrf52840; framework: arduino)
------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/adafruit_feather_nrf52840.html
PLATFORM: Nordic nRF52 (9.0.0+sha.d2cc3ca) > Adafruit Feather nRF52840 Express
HARDWARE: NRF52840 64MHz, 243KB RAM, 796KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
 - framework-arduinoadafruitnrf52 1.10100.0 (1.1.0)
 - framework-cmsis 2.50700.210515 (5.7.0)
 - tool-adafruit-nrfutil 1.503.0 (5.3)
 - tool-sreccat 1.164.0 (1.64)
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 13 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <SoftwareSerial> 1.0.0
|   |-- <Adafruit TinyUSB Library>
Building in release mode
Compiling .pio\build\adafruit_feather_nrf52840\src\main.cpp.o
Archiving .pio\build\adafruit_feather_nrf52840\lib54f\libSoftwareSerial.a
Archiving .pio\build\adafruit_feather_nrf52840\libFrameworkArduinoVariant.a
Indexing .pio\build\adafruit_feather_nrf52840\lib54f\libSoftwareSerial.a
Indexing .pio\build\adafruit_feather_nrf52840\libFrameworkArduinoVariant.a
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\avr\dtostrf.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\delay.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\Source\croutine.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\Source\event_groups.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\Source\list.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\Source\portable\MemMang\heap_3.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\Source\queue.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\Source\stream_buffer.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\Source\tasks.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\Source\timers.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\portable\CMSIS\nrf52\port_cmsis.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\portable\CMSIS\nrf52\port_cmsis_systick.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\freertos\portable\GCC\nrf52\port.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\hooks.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\itoa.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\linker\gcc_startup_nrf52.S.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\linker\gcc_startup_nrf52840.S.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\main.cpp.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\new.cpp.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\nordic\nrfx\drivers\src\nrfx_gpiote.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\nordic\nrfx\drivers\src\nrfx_power.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\nordic\nrfx\drivers\src\nrfx_pwm.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\nordic\nrfx\drivers\src\nrfx_qspi.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\nordic\nrfx\drivers\src\nrfx_spim.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\nordic\nrfx\drivers\src\nrfx_timer.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\nordic\nrfx\mdk\system_nrf52.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\nordic\nrfx\mdk\system_nrf52840.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\pulse.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\pulse_asm.S.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\rtos.cpp.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\sysview\Config\SEGGER_SYSVIEW_Config_FreeRTOS.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\sysview\SEGGER\SEGGER_RTT.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\sysview\SEGGER\SEGGER_RTT_ASM_ARMv7M.S.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\sysview\SEGGER\SEGGER_RTT_printf.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\sysview\SEGGER\SEGGER_SYSVIEW.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\sysview\SEGGER_SYSVIEW_FreeRTOS.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\utility\AdaCallback.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\utility\SoftwareTimer.cpp.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\utility\adafruit_fifo.cpp.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\utility\debug.cpp.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\utility\utilities.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\wiring.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\wiring_analog.cpp.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\wiring_analog_nRF52.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\wiring_digital.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\wiring_private.c.o
Compiling .pio\build\adafruit_feather_nrf52840\FrameworkArduino\wiring_shift.c.o
Archiving .pio\build\adafruit_feather_nrf52840\libFrameworkArduino.a
Indexing .pio\build\adafruit_feather_nrf52840\libFrameworkArduino.a
Linking .pio\build\adafruit_feather_nrf52840\firmware.elf
Checking size .pio\build\adafruit_feather_nrf52840\firmware.elf
Building .pio\build\adafruit_feather_nrf52840\firmware.hex
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   3.0% (used 7364 bytes from 248832 bytes)
Flash: [=         ]   5.6% (used 45276 bytes from 815104 bytes)
Building .pio\build\adafruit_feather_nrf52840\firmware.zip
Zip created at .pio\build\adafruit_feather_nrf52840\firmware.zip
============================================= [SUCCESS] Took 5.27 seconds =============================================

First of all, thank you for your answer.
I created a project as shown in the picture below.
The source code put the code below.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(12, 11); // RX, TX
SoftwareSerial mySerial1(9, 10); // RX, TX


void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  while ( !Serial ) delay(10);   // for nrf52840 with native usb

  Serial.println("Goodnight moon!");
 
  // set the data rate for the SoftwareSerial port
  mySerial.begin(115200);
  mySerial.println("Hello, world?");

  mySerial1.begin(115200);
  mySerial1.println("Hello, world?");
}

void loop() // run over and over//
{
/*
  if (mySerial.available()) 
    Serial.write(mySerial.read());

  if (Serial.available())
    mySerial.write(Serial.read());
*/    
    mySerial.println("Hello Serial 1");
    mySerial1.println("Hello Serial 2");
    Serial.println("Hello Serial 0!");
    delay(100);
}

It’s still missing

per above.

Thank you.
It was solved with your advice.