Skip to content

Commit

Permalink
[cmsis] Update CMSIS-DSP to v5.8.0
Browse files Browse the repository at this point in the history
Introduces <arm_math_local.h> config file.
  • Loading branch information
salkinium committed Sep 30, 2021
1 parent dad9799 commit 12bb41b
Show file tree
Hide file tree
Showing 12 changed files with 276 additions and 78 deletions.
22 changes: 22 additions & 0 deletions examples/nucleo_f429zi/cmsis_dsp/bayes/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2019, Niklas Hauser
*
* This file is part of the modm project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// ----------------------------------------------------------------------------

#include <modm/board.hpp>
#include <arm_math.h>

#define main arm_cmsis_dsp_example
#define while return index; void
#include "../../../../ext/arm/cmsis/CMSIS/DSP/Examples/ARM/arm_bayes_example/arm_bayes_example_f32.c"
#undef while
#undef main

#define example_name "bayes"
#include "../runner.cpp"
10 changes: 10 additions & 0 deletions examples/nucleo_f429zi/cmsis_dsp/bayes/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<library>
<extends>modm:nucleo-f429zi</extends>
<options>
<option name="modm:build:build.path">../../../../build/nucleo_f429zi/cmsis_dsp/bayes</option>
</options>
<modules>
<module>modm:build:scons</module>
<module>modm:cmsis:dsp:bayes</module>
</modules>
</library>
1 change: 0 additions & 1 deletion examples/nucleo_f429zi/cmsis_dsp/linear_interp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#define while return status; void
#include "../../../../ext/arm/cmsis/CMSIS/DSP/Examples/ARM/arm_linear_interp_example/arm_linear_interp_example_f32.c"
#undef while
#undef float
#undef main
#pragma GCC diagnostic pop

Expand Down
5 changes: 1 addition & 4 deletions examples/nucleo_f429zi/cmsis_dsp/linear_interp/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
<options>
<option name="modm:build:build.path">../../../../build/nucleo_f429zi/cmsis_dsp/linear_interp</option>
</options>
<collectors>
<!-- We need to cast `&arm_linear_interep_table[0]` to (float*), but cannot change the example... -->
<collect name="modm:build:cxxflags">-fpermissive</collect>
</collectors>
<modules>
<module>modm:build:scons</module>
<module>modm:build:make</module>
<module>modm:cmsis:dsp:fast_math</module>
<module>modm:cmsis:dsp:interpolation</module>
</modules>
</library>
22 changes: 22 additions & 0 deletions examples/nucleo_f429zi/cmsis_dsp/svm/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2019, Niklas Hauser
*
* This file is part of the modm project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// ----------------------------------------------------------------------------

#include <modm/board.hpp>
#include <arm_math.h>

#define main arm_cmsis_dsp_example
#define while return result; void
#include "../../../../ext/arm/cmsis/CMSIS/DSP/Examples/ARM/arm_svm_example/arm_svm_example_f32.c"
#undef while
#undef main

#define example_name "svm"
#include "../runner.cpp"
10 changes: 10 additions & 0 deletions examples/nucleo_f429zi/cmsis_dsp/svm/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<library>
<extends>modm:nucleo-f429zi</extends>
<options>
<option name="modm:build:build.path">../../../../build/nucleo_f429zi/cmsis_dsp/svm</option>
</options>
<modules>
<module>modm:build:scons</module>
<module>modm:cmsis:dsp:svm</module>
</modules>
</library>
48 changes: 48 additions & 0 deletions ext/arm/arm_math.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/******************************************************************************
* @file arm_math.h
* @brief Public header file for CMSIS DSP Library
* @version V1.9.0
* @date 23 April 2021
* Target Processor: Cortex-M and Cortex-A cores
******************************************************************************/
/*
* Copyright (c) 2010-2021 Arm Limited or its affiliates. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef _ARM_MATH_H
#define _ARM_MATH_H

#ifdef __cplusplus
extern "C"
{
#endif

#include "arm_math_types.h"
#include "arm_math_memory.h"

#include "dsp/none.h"
#include "dsp/utils.h"

%% for include in includes | sort
#include "dsp/{{include}}_functions.h"
%% endfor

#ifdef __cplusplus
}
#endif

#endif /* _ARM_MATH_H */
51 changes: 51 additions & 0 deletions ext/arm/arm_math_f16.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/******************************************************************************
* @file arm_math_f16.h
* @brief Public header file for f16 function of the CMSIS DSP Library
* @version V1.9.0
* @date 23 April 2021
* Target Processor: Cortex-M and Cortex-A cores
******************************************************************************/
/*
* Copyright (c) 2010-2021 Arm Limited or its affiliates. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef _ARM_MATH_F16_H
#define _ARM_MATH_F16_H

#include "arm_math.h"

#ifdef __cplusplus
extern "C"
{
#endif

#include "arm_math_types_f16.h"

#include "dsp/none.h"
#include "dsp/utils.h"

%% for include in includes | sort
#include "dsp/{{include}}_functions_f16.h"
%% endfor

#ifdef __cplusplus
}
#endif

#endif /* _ARM_MATH_F16_H */


30 changes: 30 additions & 0 deletions ext/arm/arm_math_types.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2021, Niklas Hauser
*
* This file is part of the modm project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#ifndef _ARM_MATH_TYPES_WRAPPER_H_
#define _ARM_MATH_TYPES_WRAPPER_H_

#define ARM_MATH_CM{{core}}
#define __ARM_FEATURE_MVE 0

%% if with_fpu
#ifndef __FPU_PRESENT
#define __FPU_PRESENT 1
#endif
%% endif

/* Local configuration file */
#if __has_include(<arm_math_local.h>)
# include <arm_math_local.h>
#endif

#include "arm_math_types_internal.h"

#endif /* ifndef _ARM_MATH_TYPES_WRAPPER_H_ */
2 changes: 1 addition & 1 deletion ext/arm/cmsis
Submodule cmsis updated 572 files
Loading

0 comments on commit 12bb41b

Please sign in to comment.