CMSIS-DSP: Corrections to tests

Build issue with f16 on gcc.
Added some customization hooks.
pull/19/head
Christophe Favergeon 5 years ago
parent 28746aeadb
commit 96c89e0a51

@ -120,6 +120,13 @@ extern const pFunc __VECTOR_TABLE[496];
#pragma GCC diagnostic pop
#endif
void systeminit_hook (void) __attribute__ ((weak));
void systeminit_hook(void)
{
}
/*----------------------------------------------------------------------------
Reset Handler called on controller reset
*----------------------------------------------------------------------------*/
@ -129,15 +136,22 @@ void Reset_Handler(void)
SystemInit(); /* CMSIS System Initialization */
systeminit_hook();
__PROGRAM_START(); /* Enter PreMain (C library entry point) */
}
#define SERIAL_BASE_ADDRESS (0xA8000000ul)
#define SERIAL_DATA *((volatile unsigned *) SERIAL_BASE_ADDRESS)
/*----------------------------------------------------------------------------
Hard Fault Handler
*----------------------------------------------------------------------------*/
void HardFault_Handler(void)
{
SERIAL_DATA = 'H';
SERIAL_DATA = '\n';
while(1);
}

@ -301,18 +301,18 @@ void UnaryTestsF16::test_mat_cmplx_trans_f16()
static void refInnerTail(float16_t *b)
{
b[0] = 1.0f16;
b[1] = -2.0f16;
b[2] = 3.0f16;
b[3] = -4.0f16;
b[0] = 1.0f;
b[1] = -2.0f;
b[2] = 3.0f;
b[3] = -4.0f;
}
static void checkInnerTail(float16_t *b)
{
ASSERT_TRUE(b[0] == 1.0f16);
ASSERT_TRUE(b[1] == -2.0f16);
ASSERT_TRUE(b[2] == 3.0f16);
ASSERT_TRUE(b[3] == -4.0f16);
ASSERT_TRUE(b[0] == 1.0f);
ASSERT_TRUE(b[1] == -2.0f);
ASSERT_TRUE(b[2] == 3.0f);
ASSERT_TRUE(b[3] == -4.0f);
}
void UnaryTestsF16::test_mat_inverse_f16()

@ -22,9 +22,16 @@ using namespace std;
// Reference patterns are ignored in this case.
#include "TestDrive.h"
extern "C" void testmain_hook (void) __attribute__ ((weak));
void testmain_hook(void)
{
}
int testmain(const char *patterns)
{
testmain_hook();
char *memoryBuf=NULL;
memoryBuf = (char*)malloc(MEMSIZE);
@ -43,7 +50,7 @@ int testmain(const char *patterns)
Client::Semihosting io("../TestDesc.txt","../Patterns","../Output","../Parameters");
#endif
// Pattern Manager making the link between IO and Memory
Client::PatternMgr mgr(&io,&memory);

Loading…
Cancel
Save