summaryrefslogtreecommitdiff
path: root/fw/cdc-dials/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/main.c
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2020-10-14 12:49:08 +0200
committerjaseg <git@jaseg.net>2020-10-14 12:49:08 +0200
commit3559d845d29272050d4d44e18e0bb84e676e48ff (patch)
treed8d6ce99e40b1a3745d76f0c9aac2f10e7286481 /fw/cdc-dials/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/main.c
parent491b2acaaa9db1798445f3e174e68ada7424fc33 (diff)
parent6ab94e0b318884bbcb95e2ea3835f951502e1d99 (diff)
downloadminikbd-3559d845d29272050d4d44e18e0bb84e676e48ff.tar.gz
minikbd-3559d845d29272050d4d44e18e0bb84e676e48ff.tar.bz2
minikbd-3559d845d29272050d4d44e18e0bb84e676e48ff.zip
Merge firmware and pcb repos
Diffstat (limited to 'fw/cdc-dials/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/main.c')
-rw-r--r--fw/cdc-dials/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/main.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/fw/cdc-dials/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/main.c b/fw/cdc-dials/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/main.c
new file mode 100644
index 0000000..1f07b8b
--- /dev/null
+++ b/fw/cdc-dials/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/main.c
@@ -0,0 +1,27 @@
+#include "jtest.h"
+#include "all_tests.h"
+#include "arm_math.h"
+
+
+#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
+asm(" .global __ARM_use_no_argv\n");
+#endif
+
+
+void debug_init(void)
+{
+ uint32_t * SHCSR_ptr = (uint32_t *) 0xE000ED24; /* System Handler Control and State Register */
+ *SHCSR_ptr |= 0x70000; /* Enable UsageFault, BusFault, and MemManage fault*/
+}
+
+int main(void)
+{
+ debug_init();
+
+ JTEST_INIT(); /* Initialize test framework. */
+
+ JTEST_GROUP_CALL(all_tests); /* Run all tests. */
+
+ JTEST_ACT_EXIT_FW(); /* Exit test framework. */
+ while (1); /* Never return. */
+}