Skip to content

Use consistent naming for Serial interfaces #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ jobs:
compile-examples:
runs-on: ubuntu-latest

env:
# sketch paths to compile (recursive) compatible with all boards
UNIVERSAL_SKETCH_PATHS: '"libraries/Scheduler"'

strategy:
fail-fast: false

Expand All @@ -39,13 +35,13 @@ jobs:
include:
- board:
fqbn: arduino-beta:mbed:nano33ble
additional-sketch-paths: '"libraries/PDM" "libraries/ThreadDebug"'
additional-sketch-paths: '"libraries/PDM" "libraries/ThreadDebug" "libraries/Scheduler"'
- board:
fqbn: arduino-beta:mbed:envie_m4
additional-sketch-paths: '"libraries/doom" "libraries/KernelDebug" "libraries/Portenta_SDCARD" "libraries/Portenta_System" "libraries/Portenta_Video" '
- board:
fqbn: arduino-beta:mbed:envie_m7
additional-sketch-paths: '"libraries/doom" "libraries/KernelDebug" "libraries/Portenta_SDCARD" "libraries/Portenta_System" "libraries/Portenta_Video" "libraries/ThreadDebug" "libraries/USBHOST"'
additional-sketch-paths: '"libraries/doom" "libraries/KernelDebug" "libraries/Portenta_SDCARD" "libraries/Portenta_System" "libraries/Portenta_Video" "libraries/ThreadDebug" "libraries/USBHOST" "libraries/Scheduler"'

steps:
- name: Checkout repository
Expand Down
9 changes: 3 additions & 6 deletions cores/arduino/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,16 @@ extern analogin_config_t adcCurrentConfig;
#endif

#include "Serial.h"

#if defined(SERIAL_CDC)
#include "USB/PluggableUSBSerial.h"
#define Serial SerialUSB
#endif

#define Serial1 _UART1_
#define Serial2 _UART2_
#define Serial3 _UART3_
#define Serial4 _UART4_
#else
#define Serial _UART1_
#define Serial1 _UART2_
#define Serial2 _UART3_
#define Serial3 _UART4_
#endif

#include "overloads.h"
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#ifdef CORE_CM4
#define Serial Serial1
#endif

uint8_t* bootloader_data = (uint8_t*)(0x801F000);

void setup() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "FlashIAP.h"
#include "bootloader.h"

#ifdef CORE_CM4
#define Serial Serial1
#endif

#define BOOTLOADER_ADDR (0x8000000)
mbed::FlashIAP flash;

Expand Down