Teensy 4.x - Maybe support for custom boards using variants.

KurtE

Senior Member+
As I have mentioned in some other threads. Mainly those talking about the DevBoard 4 and now the DevBoard 5. Figured it might be better to
break this out as it's own topic.

I personally want a reasonably clean way to do this, without having to hack up the core, and in these cases hack up the defines for the Micromod.

So I started along the path of trying to make the current Teensy4 core easier to modify external by defining a variant of the board.
In many cases, I am able to do this by defining some tables to with the week attribute. Probably the biggest changes were to facilitate defining
the pin definitions and pin table.

changes include:

Adding look for variant.h in core_pins.h
#if __has_include("variant.h")
# include "variant.h"
//#pragma message "core_pins.h" - included variant.h
// Default no override file
#elif defined(__IMXRT1062__) && defined(ARDUINO_TEENSY40)
Also I added in this file changes to the functions like: digitalWriteFast() that if your hard code pin number is not in the list checked for, then
check to see if it is a valid range and use table...
Code:
} else if (pin == 54) {
                CORE_PIN54_PORTSET = CORE_PIN54_BITMASK;
#endif
            } else if (pin < CORE_NUM_DIGITAL) {
                *portSetRegister(pin) = digitalPinToBitMask(pin);
            }

I set up some weak attributes to allow me to overwrite the tables, for pins, analog, PWM.

Hardware Serial: I rearranged the order of the things in the hardware table to make it easier to define external. Could maybe be cleaner,
by giving higher resolution of which fields to overwrite, but it works. For example on DB4 and DB5 you can not use Serial7 as those
pins are EMC pins. But there are new pins with LPUART5 pins and LPUART5 is only defined for Serial8.

So my current Serial object in core looks like:

C++:
#include <Arduino.h>
#include "HardwareSerial.h"

#ifndef SERIAL7_TX_BUFFER_SIZE
#define SERIAL7_TX_BUFFER_SIZE     40 // number of outgoing bytes to buffer
#endif
#ifndef SERIAL7_RX_BUFFER_SIZE
#define SERIAL7_RX_BUFFER_SIZE     64 // number of incoming bytes to buffer
#endif
#define IRQ_PRIORITY  64  // 0 = highest priority, 255 = lowest

void IRQHandler_Serial7()
{
    Serial7.IRQHandler();
}

// Serial7
static BUFTYPE tx_buffer7[SERIAL7_TX_BUFFER_SIZE];
static BUFTYPE rx_buffer7[SERIAL7_RX_BUFFER_SIZE];

#ifndef SERIAL7_RX_PINS
#define SERIAL7_UART_ADDR IMXRT_LPUART7_ADDRESS
#define SERIAL7_LPUART IRQ_LPUART7, CCM_CCGR5, CCM_CCGR5_LPUART7(CCM_CCGR_ON), XBARA1_OUT_LPUART7_TRG_INPUT
#define SERIAL7_CTS_PIN 0xff, 0
#define SERIAL7_RX_PINS {{28,2, &IOMUXC_LPUART7_RX_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}}
#define SERIAL7_TX_PINS {{29,2, &IOMUXC_LPUART7_TX_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}}
#endif

static HardwareSerialIMXRT::hardware_t Serial7_Hardware = {
    6,
    &IRQHandler_Serial7,
    &serialEvent7,
    IRQ_PRIORITY, 38, 24, // IRQ, rts_low_watermark, rts_high_watermark
    SERIAL7_LPUART, SERIAL7_RX_PINS, SERIAL7_TX_PINS, SERIAL7_CTS_PIN
};
HardwareSerialIMXRT Serial7(SERIAL7_UART_ADDR, &Serial7_Hardware, tx_buffer7,
    SERIAL7_TX_BUFFER_SIZE, rx_buffer7, SERIAL7_RX_BUFFER_SIZE);
And in my DB4 variant I have in variant.h:

Code:
// Serial7 The default pins on MMOD are EMC pins, but we added Serial 5 pins, used as Serial8 on T4.1...
#define SERIAL7_UART_ADDR IMXRT_LPUART5_ADDRESS
#define SERIAL7_LPUART IRQ_LPUART5, CCM_CCGR3, CCM_CCGR3_LPUART5(CCM_CCGR_ON), XBARA1_OUT_LPUART5_TRG_INPUT
#define SERIAL7_CTS_PIN 0xff, 0
#define SERIAL7_RX_PINS {{60,1, &IOMUXC_LPUART5_RX_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}}
#define SERIAL7_TX_PINS {{59,1, &IOMUXC_LPUART5_TX_SELECT_INPUT, 1}, {0xff, 0xff, nullptr, 0}}
And now Serial7 works on those pins.

My Current core changes are up in my fork/branch:

To use a Variant, I typically create a directory in my Arduino directory called hardware.
In my case that is: C:\Users\kurte\Documents\Arduino\hardware
Under this I have the variant. In my case I have my variant code on another drive under github. So my hardware directory looks like:
Code:
C:\Users\kurte\Documents\Arduino\hardware>dir
 Volume in drive C is OS
 Volume Serial Number is 7E8D-E873


 Directory of C:\Users\kurte\Documents\Arduino\hardware


07/01/2024  10:43 AM    <DIR>          .
06/29/2024  06:28 PM    <DIR>          ..
12/16/2023  06:02 AM    <DIR>          arduino-dev
12/10/2023  08:25 AM    <DIR>          arduino-git
01/23/2024  10:30 AM    <JUNCTION>     teensy-dev [d:\github\teensy4_variant_experiment\teensy-dev]
               0 File(s)              0 bytes
               5 Dir(s)  89,733,496,832 bytes free

On windows I created this link using the command: mklink /J teensy-dev d:\github\teensy4_variant_experiment\teensy-dev

At some point soon I might try to issue a PR to see if/how some/all of this might make it's way back into the official fork/branch.

My current always WIP variant for DB4 and 5 are in my project:

Side note: I recently updated my FlexIO_t4 library, to not need board specific tables. Instead, it takes the pin you passed in and then uses the
pin table to map to a register (like the pin MUX register), and the FlexIO table has all possible FlexIO pins, with their corresponding register...
This has not propagated yet into a build, but is up at:

I am probably missing some of the details on some of this from the other threads. Will hopefully fill more of that in at some point.

EDIT: Forgot to mention, most/all of the time I have to hit the program button. The loader code complains about Platform 'Teensy:avr' not found


Now back to something...
 
Last edited:
Giving this a glance - seems awfully programm'y :)
Looking at the db5\variant.c that seems to replace the SDRAM_T4 code and integrate with startup_middle_hook?
Looking at the db5\variant.h that seems to provide full mapping of 'CORE_NUM_DIGITAL' to usable pin #'s?

So if the Variants were properly installed/used to build the 'PinTest' code would run usably from PinMode to Read()?
 
EDIT: Forgot to mention, most/all of the time I have to hit the program button. The loader code complains about Platform 'Teensy:avr' not found
Just as reference been using the variant method while test on the devboard with no issues. Have try that link method :)

Noticed the same thing when I selected the Teensy on Teensy Ports would get that same error message. If you select the non-teensy port it uploads no issues and dont have to hit the program button - but its been awhile.
 
Looking at the db5\variant.c that seems to replace the SDRAM_T4 code and integrate with startup_middle_hook?
Yep basically incorporated the library as part of startup so don;t have to load anything else. Did it that way when we were playing with setting up SDRAM as extmem
 
Yep basically incorporated the library as part of startup so don;t have to load anything else. Did it that way when we were playing with setting up SDRAM as extmem
Yes, recalled that - just wanted to confirm I recognized it properly.

Have been using IDE 1 mostly for whatever reason - could try the Variant in the IDE 2 where it is supported ... of course short of a variant board so far :( Not sure if the 'delivery today by 8pm' or not " 'out for delivery and last update 'in Memphis' " will be true - ...

@jmarsh had an alternate scheme adding the LUTs early in reset? And some different support code? Is that still different for better or worse?
 
Above modified CORES is linked as well as the Variant tree itself. So both coming in to IDE 2 will look in the Docs\Arduino\Hardware?

Full details welcome ... will give it a try when the new DB5 arrives.

I notice hardcoded: begin(32, 166, 1);

And unused ?:
Code:
// default = 166MHz
#define SDRAM_CLOCK 133
// default base address
#define SDRAM_BASE 0x80000000
// default SDRAM size (in MBs)
#define SDRAM_SIZE 32
// Dev board with no capacitor on pin EMC_39
#define SDRAM_NOCAP 1
 
It's possible to override functions without requiring weak symbols, if you replace all exposed symbols within a compilation unit. So for example if you provided your own implementations of the following:
Code:
digital_pin_to_info_PGM[]
digitalWrite
digitalToggle
digitalRead
pinMode
_shiftOut
shiftOut_lsbFirst
shiftOut_msbFirst
_shiftIn
shiftIn_lsbFirst
shiftIn_msbFirst
pulseIn_high
pulseIn_low
pulseIn
then the contents of digital.c from cores would be dropped by the linker and not trigger any duplicate symbol errors. But this approach fails when functions are declared as inlines in headers, like all the digital*Fast() functions.

It would be nice if some of the functions in startup.c were moved into their own files to help facilitate this sort of replacement, for example the flexspi2_* and configure_external_ram functions could be moved into extmem.c so they could easily be replaced with the SDRAM startup routine rather than using a startup hook...
 
IDE 1 and 2 giving similar errors - may have noted IDE not expected to work. Both give the board option as done below - and both fail the same.

Github @KurtE linked above: Put FULL CORES in both IDE locations.
In IDE 1 : created arduino-1.8.19\hardware\teensy-dev
in IDE 2 : created C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev

Code:
"C:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO_TEENSY_MICROMOD -DARDUINO=10819 -DARDUINO_TEENSY_DEVBRD5 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\cores\\teensy4" "-IC:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy-dev\\avr\\variants\\DevBrd5" "C:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy-dev\\avr\\variants\\DevBrd5\\variant.c" -o "T:\\TEMP\\arduino_build_980853\\core\\variant.c.o"
C:\Users\2\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:1:1: warning: data definition has no type or storage class
    1 | begin(SDRAM_SIZE, SDRAM_CLOCK, SDRAM_USEDQS);
      | ^~~~~
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:1:1: warning: type defaults to 'int' in declaration of 'begin' [-Wimplicit-int]
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:1:1: warning: parameter names (without types) in function declaration
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:88:7: error: 'CORE_PIN46_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
   88 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
      
...
 
Also needed to update https://github.com/KurtE/FlexIO_t4

But that didn't change the errors seen - here IDE 2:
Code:
FQBN: teensy-dev:avr:teensyDevBrd5
Using board 'teensyDevBrd5' from platform in folder: C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr
Using core 'teensy4' from platform in folder: C:\Users\Duser\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0

Detecting libraries used...
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO_TEENSY_MICROMOD -DARDUINO=10607 -DARDUINO_TEENSY_DEVBRD5 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Users\Duser\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4 -IC:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5 T:\TEMP\arduino\sketches\820BF37524079156F9F24B08EC32B68C\sketch\Code4Code.ino.cpp -o nul
Generating function prototypes...
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO_TEENSY_MICROMOD -DARDUINO=10607 -DARDUINO_TEENSY_DEVBRD5 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Users\Duser\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4 -IC:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5 T:\TEMP\arduino\sketches\820BF37524079156F9F24B08EC32B68C\sketch\Code4Code.ino.cpp -o T:\TEMP\1428319778\sketch_merged.cpp
C:\Users\Duser\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives T:\TEMP\1428319778\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-tools\\1.59.0/precompile_helper" "C:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\cores\\teensy4" "T:\\TEMP\\arduino\\sketches\\820BF37524079156F9F24B08EC32B68C" "C:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1/arm/bin/arm-none-eabi-g++" -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO_TEENSY_MICROMOD -DARDUINO=10607 -DARDUINO_TEENSY_DEVBRD5 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\cores\\teensy4" "-IC:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy-dev\\avr\\variants\\DevBrd5" "T:\\TEMP\\arduino\\sketches\\820BF37524079156F9F24B08EC32B68C/pch/Arduino.h" -o "T:\\TEMP\\arduino\\sketches\\820BF37524079156F9F24B08EC32B68C/pch/Arduino.h.gch"
Using previously compiled file: T:\TEMP\arduino\sketches\820BF37524079156F9F24B08EC32B68C\pch\Arduino.h.gch
"C:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO_TEENSY_MICROMOD -DARDUINO=10607 -DARDUINO_TEENSY_DEVBRD5 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\TEMP\\arduino\\sketches\\820BF37524079156F9F24B08EC32B68C/pch" "-IC:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\cores\\teensy4" "-IC:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy-dev\\avr\\variants\\DevBrd5" "T:\\TEMP\\arduino\\sketches\\820BF37524079156F9F24B08EC32B68C\\sketch\\Code4Code.ino.cpp" -o "T:\\TEMP\\arduino\\sketches\\820BF37524079156F9F24B08EC32B68C\\sketch\\Code4Code.ino.cpp.o"
Compiling libraries...
Compiling core...
"C:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO_TEENSY_MICROMOD -DARDUINO=10607 -DARDUINO_TEENSY_DEVBRD5 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\cores\\teensy4" "-IC:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy-dev\\avr\\variants\\DevBrd5" "C:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy-dev\\avr\\variants\\DevBrd5\\variant.c" -o "T:\\TEMP\\arduino\\sketches\\820BF37524079156F9F24B08EC32B68C\\core\\variant.c.o"
Using previously compiled file: T:\TEMP\arduino\sketches\820BF37524079156F9F24B08EC32B68C\core\variant_cpp.cpp.o
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:1:1: warning: data definition has no type or storage class
    1 | begin(SDRAM_SIZE, SDRAM_CLOCK, SDRAM_USEDQS);
      | ^~~~~
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:1:1: warning: type defaults to 'int' in declaration of 'begin' [-Wimplicit-int]
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:1:1: warning: parameter names (without types) in function declaration
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:88:7: error: 'CORE_PIN46_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
   88 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:88:28: error: 'CORE_PIN46_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN42_CONFIG'?
   88 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN42_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:88:48: error: 'CORE_PIN46_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN4_PADCONFIG'?
   88 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN4_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:88:70: error: 'CORE_PIN46_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN42_BITMASK'?
   88 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN42_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:89:7: error: 'CORE_PIN47_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
   89 |     {&CORE_PIN47_PORTREG, &CORE_PIN47_CONFIG, &CORE_PIN47_PADCONFIG, CORE_PIN47_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:89:28: error: 'CORE_PIN47_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN42_CONFIG'?
   89 |     {&CORE_PIN47_PORTREG, &CORE_PIN47_CONFIG, &CORE_PIN47_PADCONFIG, CORE_PIN47_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN42_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:89:48: error: 'CORE_PIN47_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN4_PADCONFIG'?
   89 |     {&CORE_PIN47_PORTREG, &CORE_PIN47_CONFIG, &CORE_PIN47_PADCONFIG, CORE_PIN47_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN4_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:89:70: error: 'CORE_PIN47_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN42_BITMASK'?
   89 |     {&CORE_PIN47_PORTREG, &CORE_PIN47_CONFIG, &CORE_PIN47_PADCONFIG, CORE_PIN47_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN42_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:90:7: error: 'CORE_PIN48_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
   90 |     {&CORE_PIN48_PORTREG, &CORE_PIN48_CONFIG, &CORE_PIN48_PADCONFIG, CORE_PIN48_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:90:28: error: 'CORE_PIN48_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN42_CONFIG'?
   90 |     {&CORE_PIN48_PORTREG, &CORE_PIN48_CONFIG, &CORE_PIN48_PADCONFIG, CORE_PIN48_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN42_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:90:48: error: 'CORE_PIN48_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN4_PADCONFIG'?
   90 |     {&CORE_PIN48_PORTREG, &CORE_PIN48_CONFIG, &CORE_PIN48_PADCONFIG, CORE_PIN48_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN4_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:90:70: error: 'CORE_PIN48_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN42_BITMASK'?
   90 |     {&CORE_PIN48_PORTREG, &CORE_PIN48_CONFIG, &CORE_PIN48_PADCONFIG, CORE_PIN48_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN42_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:91:7: error: 'CORE_PIN49_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
   91 |     {&CORE_PIN49_PORTREG, &CORE_PIN49_CONFIG, &CORE_PIN49_PADCONFIG, CORE_PIN49_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:91:28: error: 'CORE_PIN49_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN42_CONFIG'?
   91 |     {&CORE_PIN49_PORTREG, &CORE_PIN49_CONFIG, &CORE_PIN49_PADCONFIG, CORE_PIN49_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN42_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:91:48: error: 'CORE_PIN49_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN4_PADCONFIG'?
   91 |     {&CORE_PIN49_PORTREG, &CORE_PIN49_CONFIG, &CORE_PIN49_PADCONFIG, CORE_PIN49_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN4_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:91:70: error: 'CORE_PIN49_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN42_BITMASK'?
   91 |     {&CORE_PIN49_PORTREG, &CORE_PIN49_CONFIG, &CORE_PIN49_PADCONFIG, CORE_PIN49_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN42_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:92:7: error: 'CORE_PIN50_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN0_PORTREG'?
   92 |     {&CORE_PIN50_PORTREG, &CORE_PIN50_CONFIG, &CORE_PIN50_PADCONFIG, CORE_PIN50_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN0_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:92:28: error: 'CORE_PIN50_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN30_CONFIG'?
   92 |     {&CORE_PIN50_PORTREG, &CORE_PIN50_CONFIG, &CORE_PIN50_PADCONFIG, CORE_PIN50_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN30_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:92:48: error: 'CORE_PIN50_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN30_PADCONFIG'?
   92 |     {&CORE_PIN50_PORTREG, &CORE_PIN50_CONFIG, &CORE_PIN50_PADCONFIG, CORE_PIN50_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN30_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:92:70: error: 'CORE_PIN50_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN10_BITMASK'?
   92 |     {&CORE_PIN50_PORTREG, &CORE_PIN50_CONFIG, &CORE_PIN50_PADCONFIG, CORE_PIN50_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN10_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:93:7: error: 'CORE_PIN51_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN11_PORTREG'?
   93 |     {&CORE_PIN51_PORTREG, &CORE_PIN51_CONFIG, &CORE_PIN51_PADCONFIG, CORE_PIN51_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN11_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:93:28: error: 'CORE_PIN51_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN15_CONFIG'?
   93 |     {&CORE_PIN51_PORTREG, &CORE_PIN51_CONFIG, &CORE_PIN51_PADCONFIG, CORE_PIN51_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN15_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:93:48: error: 'CORE_PIN51_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN21_PADCONFIG'?
   93 |     {&CORE_PIN51_PORTREG, &CORE_PIN51_CONFIG, &CORE_PIN51_PADCONFIG, CORE_PIN51_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN21_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:93:70: error: 'CORE_PIN51_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN41_BITMASK'?
   93 |     {&CORE_PIN51_PORTREG, &CORE_PIN51_CONFIG, &CORE_PIN51_PADCONFIG, CORE_PIN51_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN41_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:94:7: error: 'CORE_PIN52_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN12_PORTREG'?
   94 |     {&CORE_PIN52_PORTREG, &CORE_PIN52_CONFIG, &CORE_PIN52_PADCONFIG, CORE_PIN52_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN12_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:94:28: error: 'CORE_PIN52_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN42_CONFIG'?
   94 |     {&CORE_PIN52_PORTREG, &CORE_PIN52_CONFIG, &CORE_PIN52_PADCONFIG, CORE_PIN52_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN42_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:94:48: error: 'CORE_PIN52_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN42_PADCONFIG'?
   94 |     {&CORE_PIN52_PORTREG, &CORE_PIN52_CONFIG, &CORE_PIN52_PADCONFIG, CORE_PIN52_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN42_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:94:70: error: 'CORE_PIN52_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN42_BITMASK'?
   94 |     {&CORE_PIN52_PORTREG, &CORE_PIN52_CONFIG, &CORE_PIN52_PADCONFIG, CORE_PIN52_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN42_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:95:7: error: 'CORE_PIN53_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN13_PORTREG'?
   95 |     {&CORE_PIN53_PORTREG, &CORE_PIN53_CONFIG, &CORE_PIN53_PADCONFIG, CORE_PIN53_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN13_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:95:28: error: 'CORE_PIN53_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN33_CONFIG'?
   95 |     {&CORE_PIN53_PORTREG, &CORE_PIN53_CONFIG, &CORE_PIN53_PADCONFIG, CORE_PIN53_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN33_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:95:48: error: 'CORE_PIN53_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN43_PADCONFIG'?
   95 |     {&CORE_PIN53_PORTREG, &CORE_PIN53_CONFIG, &CORE_PIN53_PADCONFIG, CORE_PIN53_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN43_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:95:70: error: 'CORE_PIN53_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN23_BITMASK'?
   95 |     {&CORE_PIN53_PORTREG, &CORE_PIN53_CONFIG, &CORE_PIN53_PADCONFIG, CORE_PIN53_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN23_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:96:7: error: 'CORE_PIN54_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
   96 |     {&CORE_PIN54_PORTREG, &CORE_PIN54_CONFIG, &CORE_PIN54_PADCONFIG, CORE_PIN54_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:96:28: error: 'CORE_PIN54_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN14_CONFIG'?
   96 |     {&CORE_PIN54_PORTREG, &CORE_PIN54_CONFIG, &CORE_PIN54_PADCONFIG, CORE_PIN54_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN14_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:96:48: error: 'CORE_PIN54_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN4_PADCONFIG'?
   96 |     {&CORE_PIN54_PORTREG, &CORE_PIN54_CONFIG, &CORE_PIN54_PADCONFIG, CORE_PIN54_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN4_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:96:70: error: 'CORE_PIN54_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN45_BITMASK'?
   96 |     {&CORE_PIN54_PORTREG, &CORE_PIN54_CONFIG, &CORE_PIN54_PADCONFIG, CORE_PIN54_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN45_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:97:7: error: 'CORE_PIN55_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN25_PORTREG'?
   97 |     {&CORE_PIN55_PORTREG, &CORE_PIN55_CONFIG, &CORE_PIN55_PADCONFIG, CORE_PIN55_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN25_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:97:28: error: 'CORE_PIN55_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN15_CONFIG'?
   97 |     {&CORE_PIN55_PORTREG, &CORE_PIN55_CONFIG, &CORE_PIN55_PADCONFIG, CORE_PIN55_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN15_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:97:48: error: 'CORE_PIN55_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN35_PADCONFIG'?
   97 |     {&CORE_PIN55_PORTREG, &CORE_PIN55_CONFIG, &CORE_PIN55_PADCONFIG, CORE_PIN55_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN35_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:97:70: error: 'CORE_PIN55_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN45_BITMASK'?
   97 |     {&CORE_PIN55_PORTREG, &CORE_PIN55_CONFIG, &CORE_PIN55_PADCONFIG, CORE_PIN55_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN45_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:98:7: error: 'CORE_PIN56_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN26_PORTREG'?
   98 |     {&CORE_PIN56_PORTREG, &CORE_PIN56_CONFIG, &CORE_PIN56_PADCONFIG, CORE_PIN56_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN26_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:98:28: error: 'CORE_PIN56_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN16_CONFIG'?
   98 |     {&CORE_PIN56_PORTREG, &CORE_PIN56_CONFIG, &CORE_PIN56_PADCONFIG, CORE_PIN56_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN16_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:98:48: error: 'CORE_PIN56_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN6_PADCONFIG'?
   98 |     {&CORE_PIN56_PORTREG, &CORE_PIN56_CONFIG, &CORE_PIN56_PADCONFIG, CORE_PIN56_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN6_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:98:70: error: 'CORE_PIN56_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN36_BITMASK'?
   98 |     {&CORE_PIN56_PORTREG, &CORE_PIN56_CONFIG, &CORE_PIN56_PADCONFIG, CORE_PIN56_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN36_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:99:7: error: 'CORE_PIN57_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN7_PORTREG'?
   99 |     {&CORE_PIN57_PORTREG, &CORE_PIN57_CONFIG, &CORE_PIN57_PADCONFIG, CORE_PIN57_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN7_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:99:28: error: 'CORE_PIN57_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN17_CONFIG'?
   99 |     {&CORE_PIN57_PORTREG, &CORE_PIN57_CONFIG, &CORE_PIN57_PADCONFIG, CORE_PIN57_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN17_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:99:48: error: 'CORE_PIN57_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN27_PADCONFIG'?
   99 |     {&CORE_PIN57_PORTREG, &CORE_PIN57_CONFIG, &CORE_PIN57_PADCONFIG, CORE_PIN57_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN27_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:99:70: error: 'CORE_PIN57_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN7_BITMASK'?
   99 |     {&CORE_PIN57_PORTREG, &CORE_PIN57_CONFIG, &CORE_PIN57_PADCONFIG, CORE_PIN57_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN7_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:100:7: error: 'CORE_PIN58_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN18_PORTREG'?
  100 |     {&CORE_PIN58_PORTREG, &CORE_PIN58_CONFIG, &CORE_PIN58_PADCONFIG, CORE_PIN58_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN18_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:100:28: error: 'CORE_PIN58_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN38_CONFIG'?
  100 |     {&CORE_PIN58_PORTREG, &CORE_PIN58_CONFIG, &CORE_PIN58_PADCONFIG, CORE_PIN58_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN38_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:100:48: error: 'CORE_PIN58_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN38_PADCONFIG'?
  100 |     {&CORE_PIN58_PORTREG, &CORE_PIN58_CONFIG, &CORE_PIN58_PADCONFIG, CORE_PIN58_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN38_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:100:70: error: 'CORE_PIN58_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN18_BITMASK'?
  100 |     {&CORE_PIN58_PORTREG, &CORE_PIN58_CONFIG, &CORE_PIN58_PADCONFIG, CORE_PIN58_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN18_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:101:7: error: 'CORE_PIN59_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN19_PORTREG'?
  101 |     {&CORE_PIN59_PORTREG, &CORE_PIN59_CONFIG, &CORE_PIN59_PADCONFIG, CORE_PIN59_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN19_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:101:28: error: 'CORE_PIN59_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN29_CONFIG'?
  101 |     {&CORE_PIN59_PORTREG, &CORE_PIN59_CONFIG, &CORE_PIN59_PADCONFIG, CORE_PIN59_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN29_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:101:48: error: 'CORE_PIN59_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN39_PADCONFIG'?
  101 |     {&CORE_PIN59_PORTREG, &CORE_PIN59_CONFIG, &CORE_PIN59_PADCONFIG, CORE_PIN59_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN39_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:101:70: error: 'CORE_PIN59_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN29_BITMASK'?
  101 |     {&CORE_PIN59_PORTREG, &CORE_PIN59_CONFIG, &CORE_PIN59_PADCONFIG, CORE_PIN59_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN29_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:102:7: error: 'CORE_PIN60_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN0_PORTREG'?
  102 |     {&CORE_PIN60_PORTREG, &CORE_PIN60_CONFIG, &CORE_PIN60_PADCONFIG, CORE_PIN60_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN0_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:102:28: error: 'CORE_PIN60_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN30_CONFIG'?
  102 |     {&CORE_PIN60_PORTREG, &CORE_PIN60_CONFIG, &CORE_PIN60_PADCONFIG, CORE_PIN60_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN30_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:102:48: error: 'CORE_PIN60_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN30_PADCONFIG'?
  102 |     {&CORE_PIN60_PORTREG, &CORE_PIN60_CONFIG, &CORE_PIN60_PADCONFIG, CORE_PIN60_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN30_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:102:70: error: 'CORE_PIN60_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN10_BITMASK'?
  102 |     {&CORE_PIN60_PORTREG, &CORE_PIN60_CONFIG, &CORE_PIN60_PADCONFIG, CORE_PIN60_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN10_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:103:7: error: 'CORE_PIN61_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN11_PORTREG'?
  103 |     {&CORE_PIN61_PORTREG, &CORE_PIN61_CONFIG, &CORE_PIN61_PADCONFIG, CORE_PIN61_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN11_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:103:28: error: 'CORE_PIN61_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN16_CONFIG'?
  103 |     {&CORE_PIN61_PORTREG, &CORE_PIN61_CONFIG, &CORE_PIN61_PADCONFIG, CORE_PIN61_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN16_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:103:48: error: 'CORE_PIN61_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN21_PADCONFIG'?
  103 |     {&CORE_PIN61_PORTREG, &CORE_PIN61_CONFIG, &CORE_PIN61_PADCONFIG, CORE_PIN61_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN21_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:103:70: error: 'CORE_PIN61_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN6_BITMASK'?
  103 |     {&CORE_PIN61_PORTREG, &CORE_PIN61_CONFIG, &CORE_PIN61_PADCONFIG, CORE_PIN61_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN6_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:104:7: error: 'CORE_PIN62_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN26_PORTREG'?
  104 |     {&CORE_PIN62_PORTREG, &CORE_PIN62_CONFIG, &CORE_PIN62_PADCONFIG, CORE_PIN62_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN26_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:104:28: error: 'CORE_PIN62_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN42_CONFIG'?
  104 |     {&CORE_PIN62_PORTREG, &CORE_PIN62_CONFIG, &CORE_PIN62_PADCONFIG, CORE_PIN62_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN42_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:104:48: error: 'CORE_PIN62_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN6_PADCONFIG'?
  104 |     {&CORE_PIN62_PORTREG, &CORE_PIN62_CONFIG, &CORE_PIN62_PADCONFIG, CORE_PIN62_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN6_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:104:70: error: 'CORE_PIN62_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN42_BITMASK'?
  104 |     {&CORE_PIN62_PORTREG, &CORE_PIN62_CONFIG, &CORE_PIN62_PADCONFIG, CORE_PIN62_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN42_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:105:7: error: 'CORE_PIN63_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN13_PORTREG'?
  105 |     {&CORE_PIN63_PORTREG, &CORE_PIN63_CONFIG, &CORE_PIN63_PADCONFIG, CORE_PIN63_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN13_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:105:28: error: 'CORE_PIN63_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN33_CONFIG'?
  105 |     {&CORE_PIN63_PORTREG, &CORE_PIN63_CONFIG, &CORE_PIN63_PADCONFIG, CORE_PIN63_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN33_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:105:48: error: 'CORE_PIN63_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN43_PADCONFIG'?
  105 |     {&CORE_PIN63_PORTREG, &CORE_PIN63_CONFIG, &CORE_PIN63_PADCONFIG, CORE_PIN63_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN43_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:105:70: error: 'CORE_PIN63_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN23_BITMASK'?
  105 |     {&CORE_PIN63_PORTREG, &CORE_PIN63_CONFIG, &CORE_PIN63_PADCONFIG, CORE_PIN63_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN23_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:106:7: error: 'CORE_PIN64_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
  106 |     {&CORE_PIN64_PORTREG, &CORE_PIN64_CONFIG, &CORE_PIN64_PADCONFIG, CORE_PIN64_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:106:28: error: 'CORE_PIN64_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN14_CONFIG'?
  106 |     {&CORE_PIN64_PORTREG, &CORE_PIN64_CONFIG, &CORE_PIN64_PADCONFIG, CORE_PIN64_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN14_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:106:48: error: 'CORE_PIN64_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN4_PADCONFIG'?
  106 |     {&CORE_PIN64_PORTREG, &CORE_PIN64_CONFIG, &CORE_PIN64_PADCONFIG, CORE_PIN64_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN4_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:106:70: error: 'CORE_PIN64_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN6_BITMASK'?
  106 |     {&CORE_PIN64_PORTREG, &CORE_PIN64_CONFIG, &CORE_PIN64_PADCONFIG, CORE_PIN64_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN6_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:107:7: error: 'CORE_PIN65_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN25_PORTREG'?
  107 |     {&CORE_PIN65_PORTREG, &CORE_PIN65_CONFIG, &CORE_PIN65_PADCONFIG, CORE_PIN65_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN25_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:107:28: error: 'CORE_PIN65_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN15_CONFIG'?
  107 |     {&CORE_PIN65_PORTREG, &CORE_PIN65_CONFIG, &CORE_PIN65_PADCONFIG, CORE_PIN65_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN15_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:107:48: error: 'CORE_PIN65_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN35_PADCONFIG'?
  107 |     {&CORE_PIN65_PORTREG, &CORE_PIN65_CONFIG, &CORE_PIN65_PADCONFIG, CORE_PIN65_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN35_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:107:70: error: 'CORE_PIN65_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN45_BITMASK'?
  107 |     {&CORE_PIN65_PORTREG, &CORE_PIN65_CONFIG, &CORE_PIN65_PADCONFIG, CORE_PIN65_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN45_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:108:7: error: 'CORE_PIN66_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN26_PORTREG'?
  108 |     {&CORE_PIN66_PORTREG, &CORE_PIN66_CONFIG, &CORE_PIN66_PADCONFIG, CORE_PIN66_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN26_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:108:28: error: 'CORE_PIN66_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN16_CONFIG'?
  108 |     {&CORE_PIN66_PORTREG, &CORE_PIN66_CONFIG, &CORE_PIN66_PADCONFIG, CORE_PIN66_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN16_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:108:48: error: 'CORE_PIN66_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN6_PADCONFIG'?
  108 |     {&CORE_PIN66_PORTREG, &CORE_PIN66_CONFIG, &CORE_PIN66_PADCONFIG, CORE_PIN66_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN6_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:108:70: error: 'CORE_PIN66_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN36_BITMASK'?
  108 |     {&CORE_PIN66_PORTREG, &CORE_PIN66_CONFIG, &CORE_PIN66_PADCONFIG, CORE_PIN66_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN36_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:109:7: error: 'CORE_PIN67_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN7_PORTREG'?
  109 |     {&CORE_PIN67_PORTREG, &CORE_PIN67_CONFIG, &CORE_PIN67_PADCONFIG, CORE_PIN67_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN7_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:109:28: error: 'CORE_PIN67_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN17_CONFIG'?
  109 |     {&CORE_PIN67_PORTREG, &CORE_PIN67_CONFIG, &CORE_PIN67_PADCONFIG, CORE_PIN67_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN17_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:109:48: error: 'CORE_PIN67_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN27_PADCONFIG'?
  109 |     {&CORE_PIN67_PORTREG, &CORE_PIN67_CONFIG, &CORE_PIN67_PADCONFIG, CORE_PIN67_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN27_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:109:70: error: 'CORE_PIN67_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN7_BITMASK'?
  109 |     {&CORE_PIN67_PORTREG, &CORE_PIN67_CONFIG, &CORE_PIN67_PADCONFIG, CORE_PIN67_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN7_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:110:7: error: 'CORE_PIN68_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN18_PORTREG'?
  110 |     {&CORE_PIN68_PORTREG, &CORE_PIN68_CONFIG, &CORE_PIN68_PADCONFIG, CORE_PIN68_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN18_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:110:28: error: 'CORE_PIN68_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN38_CONFIG'?
  110 |     {&CORE_PIN68_PORTREG, &CORE_PIN68_CONFIG, &CORE_PIN68_PADCONFIG, CORE_PIN68_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN38_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:110:48: error: 'CORE_PIN68_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN38_PADCONFIG'?
  110 |     {&CORE_PIN68_PORTREG, &CORE_PIN68_CONFIG, &CORE_PIN68_PADCONFIG, CORE_PIN68_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN38_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:110:70: error: 'CORE_PIN68_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN6_BITMASK'?
  110 |     {&CORE_PIN68_PORTREG, &CORE_PIN68_CONFIG, &CORE_PIN68_PADCONFIG, CORE_PIN68_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN6_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:111:7: error: 'CORE_PIN69_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN19_PORTREG'?
  111 |     {&CORE_PIN69_PORTREG, &CORE_PIN69_CONFIG, &CORE_PIN69_PADCONFIG, CORE_PIN69_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN19_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:111:28: error: 'CORE_PIN69_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN29_CONFIG'?
  111 |     {&CORE_PIN69_PORTREG, &CORE_PIN69_CONFIG, &CORE_PIN69_PADCONFIG, CORE_PIN69_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN29_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:111:48: error: 'CORE_PIN69_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN6_PADCONFIG'?
  111 |     {&CORE_PIN69_PORTREG, &CORE_PIN69_CONFIG, &CORE_PIN69_PADCONFIG, CORE_PIN69_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN6_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:111:70: error: 'CORE_PIN69_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN6_BITMASK'?
  111 |     {&CORE_PIN69_PORTREG, &CORE_PIN69_CONFIG, &CORE_PIN69_PADCONFIG, CORE_PIN69_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN6_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:494:6: error: conflicting types for 'begin'; have '_Bool(uint8_t,  uint8_t,  uint8_t)' {aka '_Bool(unsigned char,  unsigned char,  unsigned char)'}
  494 | bool begin(uint8_t external_sdram_size, uint8_t clock, uint8_t NOCAP)
      |      ^~~~~
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:1:1: note: previous declaration of 'begin' with type 'int()'
    1 | begin(SDRAM_SIZE, SDRAM_CLOCK, SDRAM_USEDQS);
      | ^~~~~
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c: In function 'startup_middle_hook':
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:665:36: error: 'SDRAM_USEDQS' undeclared (first use in this function)
  665 |     begin(SDRAM_SIZE, SDRAM_CLOCK, SDRAM_USEDQS);
      |                                    ^~~~~~~~~~~~
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:665:36: note: each undeclared identifier is reported only once for each function it appears in

exit status 1

Compilation error: exit status 1
 
@defragster @mjs513 - I pushed up one fix to my variants experiment class, where I had a Stray #endif

@mjs513 -
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:494:6: error: conflicting types for 'begin'; have '_Bool(uint8_t, uint8_t, uint8_t)' {aka '_Bool(unsigned char, unsigned char, unsigned char)'} 494 | bool begin(uint8_t external_sdram_size, uint8_t clock, uint8_t NOCAP) | ^~~~~ C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:1:1: note: previous declaration of 'begin' with type 'int()' 1 | begin(SDRAM_SIZE, SDRAM_CLOCK, SDRAM_USEDQS); | ^~~~~ C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c: In function 'startup_middle_hook': C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\DevBrd5\variant.c:665:36: error: 'SDRAM_USEDQS' undeclared (first use in this function) 665 | begin(SDRAM_SIZE, SDRAM_CLOCK, SDRAM_USEDQS); | ^~~~~~~~~~~~
I am not sure where these defines come from... Last changes:
1720317042842.png

Stray line #1 - I know needs to be deleted.
D:\github\teensy4_variant_experiment\teensy-dev\avr\variants\DevBrd5\variant.c: In function 'startup_middle_hook':
Code:
D:\github\teensy4_variant_experiment\teensy-dev\avr\variants\DevBrd5\variant.c:665:36: error: 'SDRAM_USEDQS' undeclared (first use in this function)
  665 |     begin(SDRAM_SIZE, SDRAM_CLOCK, SDRAM_USEDQS);
      |                                    ^~~~~~~~~~~~

Note: Same issue SDRAM_USEDQS for the SDRAM variant as well
 
Not seeing change in build output ... same complaints. Switched to DvBd V4 and similar? but no sdram warning ...
Code:
"C:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1/arm/bin/arm-none-eabi-gcc" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO_TEENSY_MICROMOD -DARDUINO=10607 -DARDUINO_TEENSY_DEVBRD4 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\cores\\teensy4" "-IC:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy-dev\\avr\\variants\\SDRAM" "C:\\Users\\Duser\\AppData\\Local\\Arduino15\\packages\\teensy-dev\\avr\\variants\\SDRAM\\variant.c" -o "T:\\TEMP\\arduino\\sketches\\820BF37524079156F9F24B08EC32B68C\\core\\variant.c.o"
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\SDRAM\variant.c:87:7: error: 'CORE_PIN46_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
   87 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\SDRAM\variant.c:87:28: error: 'CORE_PIN46_CONFIG' undeclared here (not in a function); did you mean 'CORE_PIN42_CONFIG'?
   87 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |                            ^~~~~~~~~~~~~~~~~
      |                            CORE_PIN42_CONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\SDRAM\variant.c:87:48: error: 'CORE_PIN46_PADCONFIG' undeclared here (not in a function); did you mean 'CORE_PIN4_PADCONFIG'?
   87 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                CORE_PIN4_PADCONFIG
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\SDRAM\variant.c:87:70: error: 'CORE_PIN46_BITMASK' undeclared here (not in a function); did you mean 'CORE_PIN42_BITMASK'?
   87 |     {&CORE_PIN46_PORTREG, &CORE_PIN46_CONFIG, &CORE_PIN46_PADCONFIG, CORE_PIN46_BITMASK},
      |                                                                      ^~~~~~~~~~~~~~~~~~
      |                                                                      CORE_PIN42_BITMASK
C:\Users\Duser\AppData\Local\Arduino15\packages\teensy-dev\avr\variants\SDRAM\variant.c:88:7: error: 'CORE_PIN47_PORTREG' undeclared here (not in a function); did you mean 'CORE_PIN4_PORTREG'?
   88 |     {&CORE_PIN47_PORTREG, &CORE_PIN47_CONFIG, &CORE_PIN47_PADCONFIG, CORE_PIN47_BITMASK},
      |       ^~~~~~~~~~~~~~~~~~
      |       CORE_PIN4_PORTREG
 
Stray line #1 - I know needs to be deleted.
D:\github\teensy4_variant_experiment\teensy-dev\avr\variants\DevBrd5\variant.c: In function 'startup_middle_hook':
Changes pushed up for both variants and deleted stray begin at devbrd5 in variant.c

Compiled code4code fog dev4 no issues.

Howver compile for dev5 gave another error on one of the serial defines:

Code:
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4\HardwareSerial2.cpp:75:59: error: 'SERIAL2_CTS_PIN' was not declared in this scope; did you mean 'SERIAL7_CTS_PIN'?
   75 |         SERIAL2_LPUART, SERIAL2_RX_PINS, SERIAL2_TX_PINS, SERIAL2_CTS_PIN
      |                                                           ^~~~~~~~~~~~~~~
      |                                                           SERIAL7_CTS_PIN

exit status 1
 
Pulled the latest p#13 from variants.

Still getting the undeclared CORE_PIN... undeclared ERR stream so something else missing?

Pulled All of CORES over IDE 1 and IDE 2 trees.
Updated the FLEXIO lib
Using the variants well enough that the board is selectable in IDE 1 & 2 - and both IDE's give the same error stream shown?

Was V4.0 in IDE 2 and then opened to DB5 in IDE 1 - just changed to IDE 1 V4.0 - so should have been a 'clean' build - but all show same Err's.
 
Changes pushed up for both variants and deleted stray begin at devbrd5 in variant.c

Compiled code4code fog dev4 no issues.

Howver compile for dev5 gave another error on one of the serial defines:

Code:
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4\HardwareSerial2.cpp:75:59: error: 'SERIAL2_CTS_PIN' was not declared in this scope; did you mean 'SERIAL7_CTS_PIN'?
   75 |         SERIAL2_LPUART, SERIAL2_RX_PINS, SERIAL2_TX_PINS, SERIAL2_CTS_PIN
      |                                                           ^~~~~~~~~~~~~~~
      |                                                           SERIAL7_CTS_PIN

exit status 1
Fixed... - I think this was a User (me) keyboard issue)
I had edited the file moved the extra SERIAL7... pin out of that section into SERIAL2 area and renamed... hit CTRL+U maybe a couple of times to get the thing to build, but focus was still on sublime-text window which took those as UNDO versus upload in IDE... Argh.
 
Had to get ZIP of CORES - the variant set was not in github desktop - when selected it wanted a PR to make a change???

So built for DBV4.0 - finally- ide 2. back to pm

NOTE: Doesn't build .eHex
 
Last edited:
With VARIANTS the SDRAM_t4 is not used.
Trying to PORT the OneScanCap.ino and need to remove the SDRAM_t4.h it seems.
How does one do the things that library provided like set SDRAM speed?
Code:
  /**********************************************************
       sdram.begin initializes the available SDRAM Module
        Here >> begin(SIZE, SPEED, USEDQS);:
       begin(32, 166, 1);
       See library readme for more info.
     *********************************************************/
  static bool doOnce = true;
  if ( sdram.begin(size, speed, true)) { // always UseDQS to test capacitance

Not seeing the Variants tree to expose those functions? Just this local begin():
Code:
void startup_middle_hook(void)
{
    begin(SDRAM_SIZE, SDRAM_CLOCK, SDRAM_USEDQS);

}

It needs these to be usable in the same way:
Code:
class SDRAM_t4 {
public:
    SDRAM_t4() {  };
    bool begin(uint8_t external_sdram_size = 32, uint16_t clock = 166, uint8_t useDQS = 1);
    inline float getFrequency() { return frequency; }
 
With VARIANTS the SDRAM_t4 is not used.
Trying to PORT the OneScanCap.ino and need to remove the SDRAM_t4.h it seems.
How does one do the things that library provided like set SDRAM speed?
Guess it doesn't. Did some tweaking. You could try doing this:

Code:
extern "C" bool sdram_begin(uint8_t external_sdram_size, uint8_t clock, uint8_t useDQS);
extern "C" float getFrequency();

then just call it like you would normal external functions.

So then you would do

Code:
  /**********************************************************
       sdram.begin initializes the available SDRAM Module
        Here >> begin(SIZE, SPEED, USEDQS);:
       begin(32, 166, 1);
       See library readme for more info.
     *********************************************************/
  if (sdram_begin(size, speed, true)) { // always UseDQS to test capacitance
    Serial.print("\n\tSUCCESS sdram.init()\n");
    Serial.print("\n\tSEND USB to repeat test after completion");
    Serial.print("\n\tSend '1' for 100 or 'k' gives 1K read repeats and 's' returns to start short test value.");
    Serial.print("\n\tProgress:: '#'=fixed pattern, '.'=PsuedoRand patterns, and 'F' shows Failed test pattern");
    Serial.print("\n\tIf built with DUAL Serial second SerMon will show details.\n\n");
  }
  Serial.printf("Compile Time:: " __FILE__ " " __DATE__ " " __TIME__ "\n");
  Serial.printf("EXTMEM Memory Test, %u Mbyte   ", size);
  Serial.printf("SDRAM speed %.2f Mhz ", getFrequency());
  Serial.printf("F_CPU_ACTUAL %u Mhz ", F_CPU_ACTUAL / 1000000);
  Serial.printf("begin@ %08X  ", memory_begin);
  Serial.printf("end@ %08X \n", memory_end);
}

and output:

Rich (BB code):
SUCCESS sdram.init()

    SEND USB to repeat test after completion
    Send '1' for 100 or 'k' gives 1K read repeats and 's' returns to start short test value.
    Progress:: '#'=fixed pattern, '.'=PsuedoRand patterns, and 'F' shows Failed test pattern
    If built with DUAL Serial second SerMon will show details.

Compile Time:: D:\Users\Merli\Documents\Arduino\SDRAM-TEENSY\CapReadSDRAMTest\CapReadSDRAMTest.ino Jul  9 2024 17:50:43
EXTMEM Memory Test, 32 Mbyte   SDRAM speed 205.71 Mhz F_CPU_ACTUAL 564 Mhz begin@ 80000000  end@ 82000000

  --- START 57 test patterns ------ with 3 reReads ... wait ...
#############............................................
Quick Test result: 0 read errors

Extra info: ran for 86.18 seconds

  --- START 57 test patterns ------ with 25 reReads ... wait ...
#############...........................
 
Guess it doesn't. Did some tweaking. You could try doing this:
Yes - saw that - wasn't sure if it was elsewhere - or in progress - or not done for a reason. Exporting like the sdram_malloc() funcs seemed an option in variant.h.

Also seemed like begin was missing many FREQ options from sdram_t4 ...
 
Yes - saw that - wasn't sure if it was elsewhere - or in progress - or not done for a reason. Exporting like the sdram_malloc() funcs seemed an option in variant.h.

Also seemed like begin was missing many FREQ options from sdram_t4 ...
Should be all compatible now with the latest SDRAM_t4 library. I synched begin methods with the lib. So should now all work like the lib.

As for specifying memory you have to use malloc like this:

Code:
    frameBuffer = (uint16_t *)((((uint32_t)(sdram_malloc(sizeof_framebuffer + 32)) + 32) & 0xffffffe0));
    frameBuffer2 = (uint16_t *)((((uint32_t)(sdram_malloc(sizeof_framebuffer2 + 32)) + 32) & 0xffffffe0));
 
@KurtE would like to give this branch a try
In PlatformIO I would just need to point to your repo, correct? No need to change anything else?
 
@KurtE would like to give this branch a try
In PlatformIO I would just need to point to your repo, correct? No need to change anything else?
Think you are still going to need to update the flex_io package to @KurtE's latest version and then add in the variants. Not sure how that all works with platformIO
 
Adding “lib_deps” entries (to platformio.ini) that point to GitHub URL’s should be fine.

Example:
Code:
lib_deps =
  https://github.com/name/project.git
  https://github.com/name2/project2.git
 
Back
Top