ADD run configurations

This commit is contained in:
Rémi Heredero 2024-11-18 09:14:00 +01:00
parent 20406664c3
commit f6f3d59ef3
3 changed files with 45 additions and 2 deletions

View File

@ -15,3 +15,4 @@ mbed-os/features/frameworks/mbed-client-cli/*
mbed-os/features/frameworks/COMPONENT_FPGA_CI_TEST_SHIELD/* mbed-os/features/frameworks/COMPONENT_FPGA_CI_TEST_SHIELD/*
mbed-os/platform/randlib/* mbed-os/platform/randlib/*
mbed-os/storage/kvstore/* mbed-os/storage/kvstore/*
static_scheduling/*

View File

@ -23,6 +23,42 @@ Test sensor libraries :
mbed test -m DISCO_H747I -t GCC_ARM -n advdembsof_library-tests-sensors-hdc1000 --compile --run 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 # 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? ## 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. We observe a 100% usage because on each CPU cycle it compare if time is done.

View File

@ -7,6 +7,7 @@
#include "mbed.h" // NOLINT #include "mbed.h" // NOLINT
#include "mbed_trace.h" #include "mbed_trace.h"
//#include "static_scheduling/bike_system.hpp"
#include "static_scheduling_with_event/bike_system.hpp" #include "static_scheduling_with_event/bike_system.hpp"
#if defined(MBED_CONF_MBED_TRACE_ENABLE) #if defined(MBED_CONF_MBED_TRACE_ENABLE)
@ -17,8 +18,13 @@ int main() {
#if defined(MBED_CONF_MBED_TRACE_ENABLE) #if defined(MBED_CONF_MBED_TRACE_ENABLE)
mbed_trace_init(); mbed_trace_init();
#endif #endif
// static_scheduling::BikeSystem bikeSystem;
// bikeSystem.start();
// bikeSystem.startWithEventQueue();
static_scheduling_with_event::BikeSystem bikeSystem; static_scheduling_with_event::BikeSystem bikeSystem;
bikeSystem.startWithEventQueue(); bikeSystem.start();
} }
#endif // MBED_TEST_MODE #endif // MBED_TEST_MODE