From 02b63b4833374e6e246771bf3f91b3cf1b35871b Mon Sep 17 00:00:00 2001 From: Ryzee119 Date: Sat, 14 Sep 2024 10:20:36 +0930 Subject: [PATCH] pio: Update to teensy platform 5.0 --- platformio.ini | 4 +--- src/main.cpp | 12 ++++-------- src/usb64_conf.h | 2 +- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/platformio.ini b/platformio.ini index 1cbbccf4..22f66a98 100644 --- a/platformio.ini +++ b/platformio.ini @@ -46,11 +46,9 @@ build_flags = -DTA_DISABLE_COMPACT [env:teensy41] -platform = teensy@~4.13.1 +platform = teensy@~5.0.0 board = teensy41 framework = arduino -monitor_port = COM25 -monitor_speed = 256000 ; Disable the inbuilt framework lib so I can use my own fork lib_ignore = USBHost_t36 diff --git a/src/main.cpp b/src/main.cpp index bd17e05c..6f27d7a3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -48,22 +48,18 @@ void n64_controller4_clock_edge() } #endif -extern "C" { -FLASHMEM void startup_early_hook(void) +void setup() { + //Init the serial port and ring buffer + serial_port.begin(256000); + //Get these up as early as possible. pinMode(N64_CONTROLLER_1_PIN, INPUT_PULLUP); pinMode(N64_CONTROLLER_2_PIN, INPUT_PULLUP); pinMode(N64_CONTROLLER_3_PIN, INPUT_PULLUP); pinMode(N64_CONTROLLER_4_PIN, INPUT_PULLUP); pinMode(N64_CONSOLE_SENSE, INPUT_PULLDOWN); -} -} -void setup() -{ - //Init the serial port and ring buffer - serial_port.begin(256000); ring_buffer_init(); fileio_init(); memory_init(); diff --git a/src/usb64_conf.h b/src/usb64_conf.h index 593c4dba..05a2829c 100644 --- a/src/usb64_conf.h +++ b/src/usb64_conf.h @@ -6,7 +6,7 @@ /* DEBUGGING OUTPUT - WARNING SOME OF THESE MAY BREAK TIMING AND CAUSE ISSUES USE ONLY FOR DEBUGGING */ -#define serial_port Serial +#define serial_port Serial1 #define DEBUG_STATUS 1 //General information #define DEBUG_N64 0 //For debugging N64 low level info #define DEBUG_TPAK 0 //For debugging N64 TPAK low level info. It's complex so has its own flag