Using Serial1 with sparkfun redboard artemis

I am unable to compile when using Serial1 like so:

#define CONTROL_SERIAL Serial1

or doing

Serial1.begin(115200);

Both of these methods compile in Arduino IDE, but not with this ini file:

[platformio]

src_dir = angelo

[env:sparkfun_redboard]

platform = atmelavr

board = sparkfun_redboard

framework = arduino

lib_deps =

sparkfun/SparkFun BNO080 Cortex Based IMU @ ^1.1.12

ArduinoSTL

Servo

build_flags = -std=gnu++17

This is not the Artemis, which is nRF52 based. It’s not Atmel AVR based.

For Artemis support, see

To be perfectly clear, this means using https://github.com/nigelb/platform-apollo3blue.

[env:SparkFun_RedBoard_Artemis]
platform = https://github.com/nigelb/platform-apollo3blue.git
board = SparkFun_RedBoard_Artemis
framework = arduino
platform_packages =
  framework-arduinoapollo3@https://github.com/sparkfun/Arduino_Apollo3#v2.2.0

with a src/main.cpp of

#include <Arduino.h>

void setup() {
    Serial.begin(9600);
    Serial1.begin(115200);
}

void loop() {
}

compiles just fine and targets the actual Sparkfun Redboard Artemis. (For other boards, see here).