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
|
|
@ -17,10 +17,11 @@ before_script:
|
|||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
script:
|
||||
- "pio run -e nano -e leonardo -e pico -e bluepill -e esp32"
|
||||
- mkdir -p builds
|
||||
- cp .pio/build/pico/firmware.uf2 builds/
|
||||
- cp .pio/build/pico/firmware.elf builds/
|
||||
artifacts:
|
||||
paths:
|
||||
- builds/*
|
||||
13
src/main.cpp
13
src/main.cpp
|
|
@ -186,13 +186,14 @@ void setup()
|
|||
|
||||
comPort = (HardwareSerial*) &PRIMARY_SERIAL_PORT;
|
||||
PRIMARY_SERIAL_PORT.begin(115200);
|
||||
while (!PRIMARY_SERIAL_PORT)
|
||||
delay(1);
|
||||
#if defined(SECONDARY_SERIAL_PORT)
|
||||
SECONDARY_SERIAL_PORT.begin(115200);
|
||||
while (!SECONDARY_SERIAL_PORT)
|
||||
delay(1);
|
||||
#ifdef SECONDARY_SERIAL_PORT
|
||||
SECONDARY_SERIAL_PORT.begin(115200);
|
||||
//wait for either port to be ready
|
||||
while (!PRIMARY_SERIAL_PORT && !SECONDARY_SERIAL_PORT)
|
||||
#else
|
||||
while (!PRIMARY_SERIAL_PORT)
|
||||
#endif
|
||||
delay(1);
|
||||
|
||||
register_module(core_commands, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ void test_single_argument_parsing(void)
|
|||
String all_args = F("3123.123asdf");
|
||||
char * args[1];
|
||||
uint8_t ret = 0;
|
||||
|
||||
|
||||
ret = parse_arguments(args, all_args, 1);
|
||||
TEST_ASSERT_EQUAL_STRING(expected_single, args[0]);
|
||||
TEST_ASSERT_EQUAL(1, ret);
|
||||
|
|
@ -70,7 +70,8 @@ void test_multiple_argument_parsing(void)
|
|||
|
||||
void setup() {
|
||||
|
||||
comPort->begin(115200);
|
||||
//TODO: support serial selection in tests
|
||||
Serial.begin(115200);
|
||||
// NOTE!!! Wait for >2 secs
|
||||
// if board doesn't support software reset via comPort->DTR/RTS
|
||||
delay(2000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue