Fix serial port switching, archive firmware.elf
This commit is contained in:
parent
ffb0b04c03
commit
54c34683c0
3 changed files with 12 additions and 9 deletions
|
|
@ -21,6 +21,7 @@ build:
|
||||||
- "pio run -e nano -e leonardo -e pico -e bluepill -e esp32"
|
- "pio run -e nano -e leonardo -e pico -e bluepill -e esp32"
|
||||||
- mkdir -p builds
|
- mkdir -p builds
|
||||||
- cp .pio/build/pico/firmware.uf2 builds/
|
- cp .pio/build/pico/firmware.uf2 builds/
|
||||||
|
- cp .pio/build/pico/firmware.elf builds/
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- builds/*
|
- builds/*
|
||||||
11
src/main.cpp
11
src/main.cpp
|
|
@ -186,13 +186,14 @@ void setup()
|
||||||
|
|
||||||
comPort = (HardwareSerial*) &PRIMARY_SERIAL_PORT;
|
comPort = (HardwareSerial*) &PRIMARY_SERIAL_PORT;
|
||||||
PRIMARY_SERIAL_PORT.begin(115200);
|
PRIMARY_SERIAL_PORT.begin(115200);
|
||||||
while (!PRIMARY_SERIAL_PORT)
|
#ifdef SECONDARY_SERIAL_PORT
|
||||||
delay(1);
|
|
||||||
#if defined(SECONDARY_SERIAL_PORT)
|
|
||||||
SECONDARY_SERIAL_PORT.begin(115200);
|
SECONDARY_SERIAL_PORT.begin(115200);
|
||||||
while (!SECONDARY_SERIAL_PORT)
|
//wait for either port to be ready
|
||||||
delay(1);
|
while (!PRIMARY_SERIAL_PORT && !SECONDARY_SERIAL_PORT)
|
||||||
|
#else
|
||||||
|
while (!PRIMARY_SERIAL_PORT)
|
||||||
#endif
|
#endif
|
||||||
|
delay(1);
|
||||||
|
|
||||||
register_module(core_commands, NULL);
|
register_module(core_commands, NULL);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,8 @@ void test_multiple_argument_parsing(void)
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
|
||||||
comPort->begin(115200);
|
//TODO: support serial selection in tests
|
||||||
|
Serial.begin(115200);
|
||||||
// NOTE!!! Wait for >2 secs
|
// NOTE!!! Wait for >2 secs
|
||||||
// if board doesn't support software reset via comPort->DTR/RTS
|
// if board doesn't support software reset via comPort->DTR/RTS
|
||||||
delay(2000);
|
delay(2000);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue