Skip to content

Commit 03bfac6

Browse files
hshosesalkinium
authored andcommitted
added hosted examples for cmsis_dsp
1 parent 63c5f41 commit 03bfac6

33 files changed

Lines changed: 578 additions & 0 deletions
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2019, Niklas Hauser
3+
*
4+
* This file is part of the modm project.
5+
*
6+
* This Source Code Form is subject to the terms of the Mozilla Public
7+
* License, v. 2.0. If a copy of the MPL was not distributed with this
8+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
9+
*/
10+
// ----------------------------------------------------------------------------
11+
12+
#include <arm_math.h>
13+
14+
#include <modm/debug/logger.hpp>
15+
#include <modm/platform.hpp>
16+
17+
#define main arm_cmsis_dsp_example
18+
#define while \
19+
return index; \
20+
void
21+
#include "../../../../ext/arm/cmsis-dsp/CMSIS-DSP/Examples/ARM/arm_bayes_example/arm_bayes_example_f32.c"
22+
#undef while
23+
#undef main
24+
25+
#define example_name "bayes"
26+
#include "../runner.cpp"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<library>
2+
<options>
3+
<option name="modm:target">hosted-linux</option>
4+
<option name="modm:build:build.path">../../../../build/linux/cmsis_dsp/bayes</option>
5+
</options>
6+
<modules>
7+
<module>modm:build:scons</module>
8+
<module>modm:platform:core</module>
9+
<module>modm:debug</module>
10+
<module>modm:cmsis:dsp:bayes</module>
11+
</modules>
12+
</library>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2019, Niklas Hauser
3+
*
4+
* This file is part of the modm project.
5+
*
6+
* This Source Code Form is subject to the terms of the Mozilla Public
7+
* License, v. 2.0. If a copy of the MPL was not distributed with this
8+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
9+
*/
10+
// ----------------------------------------------------------------------------
11+
12+
#include <arm_math.h>
13+
14+
#include <modm/debug/logger.hpp>
15+
#include <modm/platform.hpp>
16+
17+
#define main arm_cmsis_dsp_example
18+
#define std var_std
19+
#define while \
20+
return ARM_MATH_SUCCESS; \
21+
void // has no status variable
22+
#include "../../../../ext/arm/cmsis-dsp/CMSIS-DSP/Examples/ARM/arm_class_marks_example/arm_class_marks_example_f32.c"
23+
#undef while
24+
#undef main
25+
#undef std
26+
27+
#define example_name "class_marks"
28+
#include "../runner.cpp"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<library>
2+
<options>
3+
<option name="modm:target">hosted-linux</option>
4+
<option name="modm:build:build.path">../../../../build/linux/cmsis_dsp/class_marks</option>
5+
</options>
6+
<modules>
7+
<module>modm:build:scons</module>
8+
<module>modm:platform:core</module>
9+
<module>modm:debug</module>
10+
<module>modm:cmsis:dsp:matrix</module>
11+
<module>modm:cmsis:dsp:statistics</module>
12+
</modules>
13+
</library>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2019, Niklas Hauser
3+
*
4+
* This file is part of the modm project.
5+
*
6+
* This Source Code Form is subject to the terms of the Mozilla Public
7+
* License, v. 2.0. If a copy of the MPL was not distributed with this
8+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
9+
*/
10+
// ----------------------------------------------------------------------------
11+
12+
#include <arm_math.h>
13+
14+
#include <modm/debug/logger.hpp>
15+
#include <modm/platform.hpp>
16+
17+
#pragma GCC diagnostic push
18+
#pragma GCC diagnostic ignored "-Wsign-compare"
19+
#define main arm_cmsis_dsp_example
20+
#include "../../../../ext/arm/cmsis-dsp/CMSIS-DSP/Examples/ARM/arm_convolution_example/math_helper.c"
21+
#include "../../../../ext/arm/cmsis-dsp/CMSIS-DSP/Examples/ARM/arm_convolution_example/math_helper.h"
22+
#define while \
23+
return status; \
24+
void
25+
#include "../../../../ext/arm/cmsis-dsp/CMSIS-DSP/Examples/ARM/arm_convolution_example/arm_convolution_example_f32.c"
26+
#undef while
27+
#undef main
28+
#pragma GCC diagnostic pop
29+
30+
#define example_name "convolution"
31+
#include "../runner.cpp"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Empty file to satisfy CPP
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<library>
2+
<options>
3+
<option name="modm:target">hosted-linux</option>
4+
<option name="modm:build:build.path">../../../../build/linux/cmsis_dsp/convolution</option>
5+
</options>
6+
<modules>
7+
<module>modm:build:scons</module>
8+
<module>modm:platform:core</module>
9+
<module>modm:debug</module>
10+
<module>modm:cmsis:dsp:transform</module>
11+
<module>modm:cmsis:dsp:support</module>
12+
<module>modm:cmsis:dsp:complex_math</module>
13+
</modules>
14+
</library>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2019, Niklas Hauser
3+
*
4+
* This file is part of the modm project.
5+
*
6+
* This Source Code Form is subject to the terms of the Mozilla Public
7+
* License, v. 2.0. If a copy of the MPL was not distributed with this
8+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
9+
*/
10+
// ----------------------------------------------------------------------------
11+
12+
#include <arm_math.h>
13+
14+
#include <modm/debug/logger.hpp>
15+
#include <modm/platform.hpp>
16+
17+
#define main arm_cmsis_dsp_example
18+
#define while \
19+
return status; \
20+
void
21+
#include "../../../../ext/arm/cmsis-dsp/CMSIS-DSP/Examples/ARM/arm_dotproduct_example/arm_dotproduct_example_f32.c"
22+
#undef while
23+
#undef main
24+
25+
#define example_name "dotproduct"
26+
#include "../runner.cpp"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<library>
2+
<options>
3+
<option name="modm:target">hosted-linux</option>
4+
<option name="modm:build:build.path">../../../../build/linux/cmsis_dsp/dotproduct</option>
5+
</options>
6+
<modules>
7+
<module>modm:build:scons</module>
8+
<module>modm:platform:core</module>
9+
<module>modm:debug</module>
10+
<module>modm:build:make</module>
11+
<module>modm:cmsis:dsp:transform</module>
12+
<module>modm:cmsis:dsp:basic_math</module>
13+
</modules>
14+
</library>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2019, Niklas Hauser
3+
*
4+
* This file is part of the modm project.
5+
*
6+
* This Source Code Form is subject to the terms of the Mozilla Public
7+
* License, v. 2.0. If a copy of the MPL was not distributed with this
8+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
9+
*/
10+
// ----------------------------------------------------------------------------
11+
12+
#include <arm_math.h>
13+
14+
#include <modm/debug/logger.hpp>
15+
#include <modm/platform.hpp>
16+
17+
#define main arm_cmsis_dsp_example
18+
#include "../../../../ext/arm/cmsis-dsp/CMSIS-DSP/Examples/ARM/arm_fft_bin_example/arm_fft_bin_data.c"
19+
#define while \
20+
return status; \
21+
void
22+
#include "../../../../ext/arm/cmsis-dsp/CMSIS-DSP/Examples/ARM/arm_fft_bin_example/arm_fft_bin_example_f32.c"
23+
#undef while
24+
#undef main
25+
26+
#define example_name "fft_bin"
27+
#include "../runner.cpp"

0 commit comments

Comments
 (0)