Fix serial port switching, archive firmware.elf

This commit is contained in:
Filip Ayazi 2023-03-01 04:52:06 +00:00
parent ffb0b04c03
commit 54c34683c0
3 changed files with 12 additions and 9 deletions

View file

@ -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/*

View file

@ -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);

View file

@ -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);