From 051ce1514822f5b05960f3d5b93650aed8d94d31 Mon Sep 17 00:00:00 2001 From: Alain Carlucci <alain.carlucci@skywarder.eu> Date: Sun, 30 Apr 2017 20:08:48 +0200 Subject: [PATCH] Added bus fault test --- config/miosix_settings.h | 2 +- sbs.conf | 8 ++++++++ src/entrypoints/test-busfault.cpp | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/entrypoints/test-busfault.cpp diff --git a/config/miosix_settings.h b/config/miosix_settings.h index 09c32719b..0bebe9aca 100644 --- a/config/miosix_settings.h +++ b/config/miosix_settings.h @@ -135,7 +135,7 @@ const unsigned char MAX_OPEN_FILES=8; /// \def WITH_ERRLOG /// Uncomment for debug information on stdout. /// By default it is defined (error information is printed) -//#define WITH_ERRLOG +#define WITH_ERRLOG diff --git a/sbs.conf b/sbs.conf index db4938d4d..efcc119d5 100644 --- a/sbs.conf +++ b/sbs.conf @@ -172,3 +172,11 @@ BinName: dma-lowlevel-test Include: %shared %i2c %math %anakin-data Defines: Main: dma-lowlevel-test + +[test-busfault] +Type: board +BoardId: stm32f429zi_skyward_anakin +BinName: test-busfault +Include: %shared %i2c %math %anakin-data +Defines: +Main: test-busfault diff --git a/src/entrypoints/test-busfault.cpp b/src/entrypoints/test-busfault.cpp new file mode 100644 index 000000000..132f19721 --- /dev/null +++ b/src/entrypoints/test-busfault.cpp @@ -0,0 +1,16 @@ +#include <Common.h> + +using namespace miosix; + +void busfault(void *useless) +{ + printf("Hello, i'm a bus fault!\n"); +} + +int main() +{ + Thread::create(busfault, 1024, miosix::MAIN_PRIORITY, NULL); + while(1) + Thread::sleep(10); + return 0; +} -- GitLab