diff --git a/sbs b/sbs index 350d8d188b89c2fa5eb3497911cc2c8e25d6467c..32640a14b802b20dab20842219ac247e71948135 100755 --- a/sbs +++ b/sbs @@ -1,3 +1,3 @@ #!/bin/bash -python skyward-boardcore/sbs "$@" -v +python skyward-boardcore/sbs "$@" diff --git a/sbs.conf b/sbs.conf index e035c54e4bc70becd438324c1c9d7857ead8fd9f..dcb03204bb124c53fe093d84152c9d2740d12206 100644 --- a/sbs.conf +++ b/sbs.conf @@ -78,6 +78,7 @@ SRC_PATH: src SBS_BASE: skyward-boardcore PROJECT_INCLUDES: -Isrc/boards -Iskyward-boardcore/src/shared + -Iskyward-boardcore PROJECT_SUBDIRS: PROJECT_LIBS: @@ -143,13 +144,20 @@ Files: src/boards/DeathStack/LogProxy/LogProxy.cpp #--------------------------# # Boards # #--------------------------# -# [boardname] -> compile using '.sbs -b boardname' +# [boardname] -> compile using './sbs -b boardname' # BoardId: see the list at the top of this file # BinName: name of the final binary (without extension!) # Include: a space-separated list of files, %something will be substituted # with the corresponding 'srcfiles' # Main: name of the main file (e.g. 'foo' -> src/entrypoints/foo.cpp) +[death-stack-entry] +Type: board +BoardId: stm32f429zi_skyward_homeone +BinName: death-stack-entry +Include: %shared %deathstack %logger %canbus %pwm %gamma868 +Defines: -DDEBUG +Main: death-stack-entry [r2a-cutter] Type: board @@ -163,34 +171,14 @@ Main: r2a-cutter #--------------------------# # Tests # #--------------------------# -# [testname] -> compile using 'sbs -b testname' -# same as board +# [testname] -> compile using './sbs -b testname' +# BoardId: see the list at the top of this file +# BinName: name of the final binary (without extension!) +# Include: a space-separated list of files, %something will be substituted +# with the corresponding 'srcfiles' # Main: name of the main file (e.g. 'foo' -> src/tests/foo.cpp) - -[test-sensormanager] -Type: test -BoardId: stm32f429zi_skyward_homeone -BinName: test-sensormanager -Include: %shared %sensors %logger %ada -Defines: -DDEBUG -Main: test-sensormanager - -#[test-ignition-ctrl] -#Type: test -#BoardId: stm32f429zi_skyward_homeone -#BinName: test-ignition-ctrl -#Include: %shared %ignition %canbus %canproxy %logger -#Defines: -DDEBUG -#Main: fsm/test-ignition-ctrl - -#[test-ignition-board] -#Type: test -#BoardId: stm32f103c8_skyward_alderaan -#BinName: test-ignition-board -#Include: %aldeeran -#Defines: -DDEBUG -#Main: Alderaan/test-ignition-board +## Driver tests [test-imus] Type: test @@ -208,13 +196,23 @@ Include: %pwm Defines: -DDEBUG Main: drivers/test-cutter -[hbridge-test] +[test-hbridge] Type: test BoardId: stm32f429zi_skyward_homeone -BinName: hbridge-test +BinName: test-hbridge Include: %shared Defines: -DDEBUG -Main: drivers/hbridge-test +Main: drivers/test-hbridge + +[test-mavlink] +Type: test +BoardId: stm32f429zi_skyward_homeone +BinName: test-mavlink +Include: %shared %tmtc %logger %gamma868 +Defines: -DDEBUG +Main: drivers/test-mavlink + +## Component tests [test-tmtc] Type: test @@ -232,13 +230,39 @@ Include: %shared %canproxy %logger %canbus Defines: -DDEBUG Main: test-canproxy -[death-stack-entry] -Type: board +[test-logproxy] +Type: test BoardId: stm32f429zi_skyward_homeone -BinName: death-stack-entry -Include: %shared %deathstack %logger %canbus %pwm %gamma868 +BinName: test-logproxy +Include: %shared %logger Defines: -DDEBUG -Main: death-stack-entry +Main: test-logproxy + +[test-sensormanager] +Type: test +BoardId: stm32f429zi_skyward_homeone +BinName: test-sensormanager +Include: %shared %sensors %logger %ada +Defines: -DDEBUG +Main: test-sensormanager + +#[test-homeone] +#Type: test +#BoardId: stm32f429zi_skyward_homeone +#BinName: test-homeone +#Include: %shared +#Defines: -DDEBUG +#Main: test-homeone + +## FSM tests + +[tests-catch] +Type: test +BoardId: stm32f429zi_skyward_homeone +BinName: tests-catch +Include: %events +Defines: +Main: catch/catch-tests-entry [test-deployment] Type: test @@ -248,14 +272,6 @@ Include: %deployment %shared %pwm %logger Defines: -DSTANDALONE_CATCH1_TEST Main: catch/fsm/test-deployment -[test-logproxy] -Type: test -BoardId: stm32f429zi_skyward_homeone -BinName: test-logproxy -Include: %shared %logger %logproxy -Defines: -DDEBUG -Main: test-logproxy - [test-ignition] Type: test BoardId: stm32f429zi_skyward_homeone diff --git a/skyward-boardcore b/skyward-boardcore index 09114fb9617a43798c09be34c7b2d6955148694a..e86001f6c20b2be9ee56ea53b577a5f2453e657a 160000 --- a/skyward-boardcore +++ b/skyward-boardcore @@ -1 +1 @@ -Subproject commit 09114fb9617a43798c09be34c7b2d6955148694a +Subproject commit e86001f6c20b2be9ee56ea53b577a5f2453e657a diff --git a/src/tests/drivers/hbridge-test.cpp b/src/tests/drivers/test-hbridge.cpp similarity index 100% rename from src/tests/drivers/hbridge-test.cpp rename to src/tests/drivers/test-hbridge.cpp diff --git a/src/tests/drivers/test-mavlink.cpp b/src/tests/drivers/test-mavlink.cpp index 0539aaef2c6abc3ad3eb151514576fd96a16ad43..fcb880b1fc974e21dc21a190ceb51a128996955c 100644 --- a/src/tests/drivers/test-mavlink.cpp +++ b/src/tests/drivers/test-mavlink.cpp @@ -20,7 +20,7 @@ * THE SOFTWARE. */ -#include "mavlink.h" +#include <boards/DeathStack/configs/TMTCConfig.h> #include <Common.h> #include <drivers/gamma868/Gamma868.h> diff --git a/src/tests/drivers/test-tmtc.cpp b/src/tests/drivers/test-tmtc.cpp deleted file mode 100644 index c9a7885d8c24555133f8b3c7bd691a78d0d9783d..0000000000000000000000000000000000000000 --- a/src/tests/drivers/test-tmtc.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2018-2019 Skyward Experimental Rocketry - * Authors: Alvise de' Faveri Tron - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include <boards/DeathStack/TMTCManager/TMTCManager.h> - - -using namespace miosix; -using namespace DeathStack; - -int main() -{ - TMTCManager* tmtc = new TMTCManager(); - - while(1) - { - mavlink_message_t pingMsg; - mavlink_msg_ping_tc_pack(1, 1, &pingMsg, miosix::getTick()); - - // Send the message - bool ok = tmtc->send(pingMsg); - Thread::sleep(500); - } -} \ No newline at end of file