#include "tpl_os.h" #define APP_Task_blink_START_SEC_CODE #include "tpl_memmap.h" uint8 shared_memory[16][16]; uint8 result_array[4][17]; uint32 g_counter = 0; extern volatile TickType tpl_time_counter; // 10msec/count #define TICK_TO_MSEC(t) (t*10) #define TICK_TO_SEC(t) (t/100) /** * external functions */ extern void dhrystone_main(void); extern void coremark_main(void); void float_to_char(uint8 input_array[], float input) { uint8 i, n; uint8 ascii_offset = 0x20; // 0x30 = '0' / 0x20 = ' ' float tmp; for (i=0; i<16; ++i){ tmp = input; if (i < 8) { for(n=i+1; n<8;++n) tmp = tmp / 10; } else { for(n=7; n time()); } void ms_sleep(int ms) { uint32 end; end = ms_time() + ms; while(end > ms_time()); } FUNC(int, OS_APPL_CODE) main(void) { StartOS(OSDEFAULTAPPMODE); return 0; } TASK(benchmark) { dhrystone_main(); ms_sleep(100); coremark_main(); sec_sleep(1); while(1) { g_counter = time(); sec_sleep(1); } TerminateTask(); } #define APP_Task_blink_STOP_SEC_CODE #include "tpl_memmap.h"