From 6ee7a6454240d7f60f79e5134c0b3a01a98ee500 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Tue, 17 Dec 2019 13:34:42 +0100 Subject: [PATCH] CMSIS-DSP: Temporary fix for the spline function. The spline function was preventing the Python wrapper from being built on windows. It is a temporary fix. The spline function will have to be reworked. --- .../SupportFunctions/arm_spline_interp_f32.c | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Source/SupportFunctions/arm_spline_interp_f32.c b/Source/SupportFunctions/arm_spline_interp_f32.c index 3ec7c642..e3a8a375 100644 --- a/Source/SupportFunctions/arm_spline_interp_f32.c +++ b/Source/SupportFunctions/arm_spline_interp_f32.c @@ -149,6 +149,14 @@ * @param[in] blockSize number of samples of output data. */ +/* + +Temporary fix because some arrays are defined on the stack. +They should be passed as additional arguments to the function. + +*/ +#define MAX_DATA_POINTS 40 + void arm_spline_f32( arm_spline_instance_f32 * S, const float32_t * x, @@ -157,6 +165,7 @@ void arm_spline_f32( float32_t * pDst, uint32_t blockSize) { + /* As explained in arm_spline_interp_init_f32.c, this must be > 1 @@ -167,8 +176,13 @@ void arm_spline_f32( float32_t hi, hm1; - /* Temporary variables for system AX=B */ - float32_t u[n-1], z[n], c[n]; + /* + + Temporary variables for system AX=B. + This will be replaced by new arguments for the function. + + */ + float32_t u[MAX_DATA_POINTS], z[MAX_DATA_POINTS], c[MAX_DATA_POINTS]; float32_t Bi, li; float32_t bi, di; @@ -348,7 +362,8 @@ void arm_spline_f32( pDst++; blkCnt2--; - } + } + } /**