I want to have a test frame work in my IAR Project. The processor is an STM32L0.
What I've tried:
-
http://ift.tt/Tu5QLq followed the turoial at : http://ift.tt/2dBXjB8 Didn't work because there is only 64K Flash & 8K RAM
and its not enough for this framework
-
http://ift.tt/2dBX3lP I tried to intigrate into IAR Embedded workbench but had a lot of compiler errors also not enough space so I tried to run it on my Desktop. This doesn't work because it has too many Hardware dependencies in the code..
-
Next I tried to just make "Pseudo" unit testing by putting a test routine at boot of the device which can be switched on and off by precompiler directives.
Like this (not finished):
#if PREFORM_TESTS
TEST_run();
#endif
And then with files:
#include "testAll.h"
#include "testEvent.h"
#include "stm32l0xx_hal.h"
void TEST_run(){
TEST_EVENT_run();
}
void assert_failed(uint8_t* file, uint32_t line){
while(1);
}
#include "testEvent.h"
#include "testAll.h"
#include "event.h"
#include "stm32l0xx_hal.h"
void test_add_event();
void TEST_EVENT_run(){
test_add_event();
}
void test_add_event(){
ASSERT(1);
}
How can I run Unit Tests on my STM32L0x3?
Aucun commentaire:
Enregistrer un commentaire