diff --git a/.mbedignore b/.mbedignore index ef3cf8a..c7067d1 100644 --- a/.mbedignore +++ b/.mbedignore @@ -14,4 +14,5 @@ mbed-os/features/FEATURE_BOOTLOADER/* mbed-os/features/frameworks/mbed-client-cli/* mbed-os/features/frameworks/COMPONENT_FPGA_CI_TEST_SHIELD/* mbed-os/platform/randlib/* -mbed-os/storage/kvstore/* \ No newline at end of file +mbed-os/storage/kvstore/* +static_scheduling/* \ No newline at end of file diff --git a/README.md b/README.md index fbe9625..0e4c986 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,42 @@ Test sensor libraries : mbed test -m DISCO_H747I -t GCC_ARM -n advdembsof_library-tests-sensors-hdc1000 --compile --run ``` +## Run static scheduling +On `.mbedignore` put at the end of the file +``` +static_scheduling_with_event/* +``` + +On main.cpp include `"static_scheduling/bike_system.hpp"` and use : +```cpp +static_scheduling::BikeSystem bikeSystem; +bikeSystem.start(); +``` + +## Run static scheduling with event queue +On `.mbedignore` put at the end of the file : +``` +static_scheduling_with_event/* +``` + +On main.cpp include `"static_scheduling/bike_system.hpp"` and use : +```cpp +static_scheduling::BikeSystem bikeSystem; +bikeSystem.startWithEventQueue(); +``` + +## Run static scheduling with event scheduling +On `.mbedignore` put at the end of the file +``` +static_scheduling/* +``` + +On main.cpp include `"static_scheduling_with_event/bike_system.hpp"` and use : +```cpp +static_scheduling_with_event::BikeSystem bikeSystem; +bikeSystem.start(); +``` + # Some questions ## If you print CPU statistics at the end of every major cycle (in the super-loop), what CPU usage do you observe? How can you explain the observed CPU uptime? We observe a 100% usage because on each CPU cycle it compare if time is done. diff --git a/main.cpp b/main.cpp index b9e8ed2..f8b2f75 100644 --- a/main.cpp +++ b/main.cpp @@ -7,6 +7,7 @@ #include "mbed.h" // NOLINT #include "mbed_trace.h" +//#include "static_scheduling/bike_system.hpp" #include "static_scheduling_with_event/bike_system.hpp" #if defined(MBED_CONF_MBED_TRACE_ENABLE) @@ -17,8 +18,13 @@ int main() { #if defined(MBED_CONF_MBED_TRACE_ENABLE) mbed_trace_init(); #endif + + // static_scheduling::BikeSystem bikeSystem; + // bikeSystem.start(); + // bikeSystem.startWithEventQueue(); + static_scheduling_with_event::BikeSystem bikeSystem; - bikeSystem.startWithEventQueue(); + bikeSystem.start(); } #endif // MBED_TEST_MODE