CMSIS-DSP: Update link script for test framework.
diff --git a/CMSIS/DSP/Platforms/IPSS/ARMCM0/LinkScripts/AC6/lnk.sct b/CMSIS/DSP/Platforms/IPSS/ARMCM0/LinkScripts/AC6/lnk.sct
index ed2acaf..5666c6c 100755
--- a/CMSIS/DSP/Platforms/IPSS/ARMCM0/LinkScripts/AC6/lnk.sct
+++ b/CMSIS/DSP/Platforms/IPSS/ARMCM0/LinkScripts/AC6/lnk.sct
@@ -13,18 +13,19 @@
{
*.o (RESET, +First)
* (InRoot$$$Sections)
- * (+RO-CODE)
+ * (+RO)
}
- DATA 0x20000000 0x7000
+ DATA 0x20000000 0x60000
{
- * (+RO-DATA)
* (+RW,+ZI)
}
- ARM_LIB_STACK 0x2000C000 ALIGN 64 EMPTY -0x00002000
+ ARM_LIB_STACK 0x20062000 ALIGN 64 EMPTY -0x00002000
{}
- ARM_LIB_HEAP 0x2000C000 ALIGN 64 EMPTY 0x0050000
+ ARM_LIB_HEAP 0x20062000 ALIGN 64 EMPTY 0x0050000
{}
+
+
}
diff --git a/CMSIS/DSP/Platforms/IPSS/ARMCM33/LinkScripts/AC6/lnk.sct b/CMSIS/DSP/Platforms/IPSS/ARMCM33/LinkScripts/AC6/lnk.sct
index 907ce1d..584b495 100755
--- a/CMSIS/DSP/Platforms/IPSS/ARMCM33/LinkScripts/AC6/lnk.sct
+++ b/CMSIS/DSP/Platforms/IPSS/ARMCM33/LinkScripts/AC6/lnk.sct
@@ -12,21 +12,23 @@
LOAD_REGION 0x0
{
- CODE +0 0x30000
+ CODE +0 0x80000
{
*.o (RESET, +First)
* (InRoot$$$Sections)
- * (+RO-CODE)
+ * (+RO)
}
- DATA 0x20000000 0x7000
+
+ DATA 0x20000000 NOCOMPRESS 0x60000
{
- * (+RO-DATA)
* (+RW,+ZI)
}
- ARM_LIB_STACK 0x2000C000 ALIGN 64 EMPTY -0x00002000
+ ARM_LIB_STACK 0x20062000 ALIGN 64 EMPTY -0x00002000
{}
- ARM_LIB_HEAP 0x2000C000 ALIGN 64 EMPTY 0x00050000
+ ARM_LIB_HEAP 0x20062000 ALIGN 64 EMPTY 0x00050000
{}
+
+
}
diff --git a/CMSIS/DSP/Platforms/IPSS/ARMCM4/LinkScripts/AC6/lnk.sct b/CMSIS/DSP/Platforms/IPSS/ARMCM4/LinkScripts/AC6/lnk.sct
index 7f26d63..b71ccab 100755
--- a/CMSIS/DSP/Platforms/IPSS/ARMCM4/LinkScripts/AC6/lnk.sct
+++ b/CMSIS/DSP/Platforms/IPSS/ARMCM4/LinkScripts/AC6/lnk.sct
@@ -25,5 +25,10 @@
{}
ARM_LIB_HEAP 0x20006000 ALIGN 64 EMPTY 0x0050000
{}
+
+ PATTERNS 0x60000000 0x80000
+ {
+ patterndata.c.o (+RO-DATA)
+ }
}
diff --git a/CMSIS/DSP/Platforms/IPSS/ARMCM7/LinkScripts/AC6/lnk.sct b/CMSIS/DSP/Platforms/IPSS/ARMCM7/LinkScripts/AC6/lnk.sct
index 6e24b77..f04e135 100755
--- a/CMSIS/DSP/Platforms/IPSS/ARMCM7/LinkScripts/AC6/lnk.sct
+++ b/CMSIS/DSP/Platforms/IPSS/ARMCM7/LinkScripts/AC6/lnk.sct
@@ -9,16 +9,15 @@
LOAD_REGION 0x0
{
- CODE +0 0x30000
+ CODE +0 0x100000
{
*.o (RESET, +First)
* (InRoot$$$Sections)
- * (+RO-CODE)
+ * (+RO)
}
- DATA 0x20000000 0xF0000
+ DATA 0x20000000 NOCOMPRESS 0xF0000
{
- * (+RO-DATA)
* (+RW,+ZI)
}
@@ -26,6 +25,11 @@
{}
ARM_LIB_HEAP 0x20100000 ALIGN 64 EMPTY 0x00100000
{}
+
+ PATTERNS 0x60000000 0x100000
+ {
+ patterndata.c.o (+RO-DATA)
+ }
}
diff --git a/CMSIS/DSP/Platforms/IPSS/ARMv81MML/LinkScripts/AC6/lnk.sct b/CMSIS/DSP/Platforms/IPSS/ARMv81MML/LinkScripts/AC6/lnk.sct
index eb56715..4665df0 100755
--- a/CMSIS/DSP/Platforms/IPSS/ARMv81MML/LinkScripts/AC6/lnk.sct
+++ b/CMSIS/DSP/Platforms/IPSS/ARMv81MML/LinkScripts/AC6/lnk.sct
@@ -9,16 +9,15 @@
LOAD_REGION 0x0
{
- CODE +0 0x30000
+ CODE +0 0x100000
{
*.o (RESET, +First)
- * (InRoot$$$Sections)
- * (+RO-CODE)
+ * (InRoot$$$Sections)
+ * (+RO)
}
- DATA 0x20000000 0xF0000
+ DATA 0x20000000 NOCOMPRESS 0xF0000
{
- * (+RO-DATA)
* (+RW,+ZI)
}
@@ -26,4 +25,9 @@
{}
ARM_LIB_HEAP 0x20100000 ALIGN 64 EMPTY 0x00100000
{}
+
+ PATTERNS 0x60000000 0x100000
+ {
+ patterndata.c.o (+RO-DATA)
+ }
}
diff --git a/CMSIS/DSP/Testing/CMakeLists.txt b/CMSIS/DSP/Testing/CMakeLists.txt
index 0a8e236..d132de8 100644
--- a/CMSIS/DSP/Testing/CMakeLists.txt
+++ b/CMSIS/DSP/Testing/CMakeLists.txt
@@ -330,6 +330,10 @@
core_includes(FrameworkLib)
add_executable(Testing main.cpp)
+# To see the file in the scatter load, it must not because
+# linked in a .a archive
+target_include_directories(Testing PRIVATE GeneratedInclude)
+target_sources(Testing PRIVATE patterndata.c)
# With -O2, generated code is crashing on some cycle accurate models.
# (cpp part)
diff --git a/CMSIS/DSP/Testing/Include/Benchmarks/TransformF32.h b/CMSIS/DSP/Testing/Include/Benchmarks/TransformF32.h
index d3478c9..7df040e 100755
--- a/CMSIS/DSP/Testing/Include/Benchmarks/TransformF32.h
+++ b/CMSIS/DSP/Testing/Include/Benchmarks/TransformF32.h
@@ -21,9 +21,11 @@
float32_t *pDst;
float32_t *pState;
- const arm_cfft_instance_f32 *cfftInstance;
+ arm_cfft_instance_f32 cfftInstance;
arm_rfft_fast_instance_f32 rfftFastInstance;
+ arm_status status;
+
arm_dct4_instance_f32 dct4Instance;
arm_rfft_instance_f32 rfftInstance;
arm_cfft_radix4_instance_f32 cfftRadix4Instance;
diff --git a/CMSIS/DSP/Testing/Source/Benchmarks/TransformF32.cpp b/CMSIS/DSP/Testing/Source/Benchmarks/TransformF32.cpp
index d742ae8..58759c1 100755
--- a/CMSIS/DSP/Testing/Source/Benchmarks/TransformF32.cpp
+++ b/CMSIS/DSP/Testing/Source/Benchmarks/TransformF32.cpp
@@ -3,34 +3,10 @@
#include "arm_math.h"
#include "arm_const_structs.h"
-const arm_cfft_instance_f32 *arm_cfft_get_instance_f32(uint16_t fftLen)
-{
-switch (fftLen) {
- case 16:
- return(&arm_cfft_sR_f32_len16);
- case 32:
- return(&arm_cfft_sR_f32_len32);
- case 64:
- return(&arm_cfft_sR_f32_len64);
- case 128:
- return(&arm_cfft_sR_f32_len128);
- case 256:
- return(&arm_cfft_sR_f32_len256);
- case 512:
- return(&arm_cfft_sR_f32_len512);
- case 1024:
- return(&arm_cfft_sR_f32_len1024);
- case 2048:
- return(&arm_cfft_sR_f32_len2048);
- case 4096:
- return(&arm_cfft_sR_f32_len4096);
- }
- return(NULL);
-}
void TransformF32::test_cfft_f32()
{
- arm_cfft_f32(this->cfftInstance, this->pDst, this->ifft,this->bitRev);
+ arm_cfft_f32(&(this->cfftInstance), this->pDst, this->ifft,this->bitRev);
}
void TransformF32::test_rfft_f32()
@@ -76,7 +52,7 @@
this->pSrc=samples.ptr();
this->pDst=output.ptr();
- this->cfftInstance=arm_cfft_get_instance_f32(this->nbSamples);
+ status=arm_cfft_init_f32(&cfftInstance,this->nbSamples);
memcpy(this->pDst,this->pSrc,2*sizeof(float32_t)*this->nbSamples);
break;
diff --git a/CMSIS/DSP/Testing/main.cpp b/CMSIS/DSP/Testing/main.cpp
index 4999047..559b1c2 100644
--- a/CMSIS/DSP/Testing/main.cpp
+++ b/CMSIS/DSP/Testing/main.cpp
@@ -1,8 +1,10 @@
#include <stdio.h>
-extern int testmain();
+#include "arm_math.h"
+extern int testmain(const char *);
+extern "C" const char *patternData;
int main()
{
- return(testmain());
+ return(testmain(patternData));
}
diff --git a/CMSIS/DSP/Testing/patterndata.c b/CMSIS/DSP/Testing/patterndata.c
new file mode 100755
index 0000000..f5f940d
--- /dev/null
+++ b/CMSIS/DSP/Testing/patterndata.c
@@ -0,0 +1,15 @@
+#include "arm_math.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include "Patterns.h"
+
+const char *patternData=(const char*)patterns;
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/CMSIS/DSP/Testing/testmain.cpp b/CMSIS/DSP/Testing/testmain.cpp
index 14293c6..aecdb43 100644
--- a/CMSIS/DSP/Testing/testmain.cpp
+++ b/CMSIS/DSP/Testing/testmain.cpp
@@ -19,11 +19,10 @@
// char* array describing the tests and the input patterns.
// Reference patterns are ignored in this case.
#include "TestDrive.h"
-#include "Patterns.h"
-int testmain()
+int testmain(const char *patterns)
{
char *memoryBuf=NULL;