///////////////////////////////////////////////////////////////////////////// //! System Informations ///////////////////////////////////////////////////////////////////////////// s32 TERMINAL_PrintSystem(void *_output_function) { void (*out)(char *format, ...) = _output_function; out("Application: " MIOS32_LCD_BOOT_MSG_LINE1); MIDIMON_TerminalPrintConfig(out); AOUT_TerminalPrintConfig(out); APP_LCD_TerminalPrintConfig(out); out("Event Pool Number of Items: %d", MBNG_EVENT_PoolNumItemsGet()); u32 pool_size = MBNG_EVENT_PoolSizeGet(); u32 pool_max_size = MBNG_EVENT_PoolMaxSizeGet(); out("Event Pool Allocation: %d of %d bytes (%d%%)", pool_size, pool_max_size, (100*pool_size)/pool_max_size); #if !defined(MIOS32_FAMILY_EMULATION) && (configGENERATE_RUN_TIME_STATS || configUSE_TRACE_FACILITY) // send Run Time Stats to MIOS terminal out("FreeRTOS Task RunTime Stats:\n"); FREERTOS_UTILS_RunTimeStats(); #endif return 0; // no error }
s32 SEQ_TERMINAL_PrintSystem(void *_output_function) { void (*out)(char *format, ...) = _output_function; char str_buffer[128]; MUTEX_MIDIOUT_TAKE; out("System Informations:\n"); out("====================\n"); out(MIOS32_LCD_BOOT_MSG_LINE1 " " MIOS32_LCD_BOOT_MSG_LINE2 "\n"); mios32_sys_time_t t = MIOS32_SYS_TimeGet(); int hours = (t.seconds / 3600) % 24; int minutes = (t.seconds % 3600) / 60; int seconds = (t.seconds % 3600) % 60; out("Operating System: MIOS32\n"); out("Board: " MIOS32_BOARD_STR "\n"); out("Chip Family: " MIOS32_FAMILY_STR "\n"); if( MIOS32_SYS_SerialNumberGet((char *)str_buffer) >= 0 ) out("Serial Number: %s\n", str_buffer); else out("Serial Number: ?\n"); out("Flash Memory Size: %d bytes\n", MIOS32_SYS_FlashSizeGet()); out("RAM Size: %d bytes\n", MIOS32_SYS_RAMSizeGet()); out("Systime: %02d:%02d:%02d\n", hours, minutes, seconds); out("CPU Load: %02d%%\n", SEQ_STATISTICS_CurrentCPULoad()); out("MIDI Scheduler: Alloc %3d/%3d Drops: %3d", seq_midi_out_allocated, seq_midi_out_max_allocated, seq_midi_out_dropouts); u32 stopwatch_value_max = SEQ_STATISTICS_StopwatchGetValueMax(); u32 stopwatch_value = SEQ_STATISTICS_StopwatchGetValue(); if( stopwatch_value_max == 0xffffffff ) { out("Stopwatch: Overrun!\n"); } else if( !stopwatch_value_max ) { out("Stopwatch: no result yet\n"); } else { out("Stopwatch: %d/%d uS\n", stopwatch_value, stopwatch_value_max); } #if !defined(MIOS32_FAMILY_EMULATION) && configGENERATE_RUN_TIME_STATS // send Run Time Stats to MIOS terminal out("FreeRTOS Task RunTime Stats:\n"); FREERTOS_UTILS_RunTimeStats(); #endif out("done.\n"); MUTEX_MIDIOUT_GIVE; return 0; // no error }
///////////////////////////////////////////////////////////////////////////// // System Informations ///////////////////////////////////////////////////////////////////////////// s32 TERMINAL_PrintSystem(void *_output_function) { void (*out)(char *format, ...) = _output_function; out("Application: " MIOS32_LCD_BOOT_MSG_LINE1); MIDIMON_TerminalPrintConfig(out); #if !defined(MIOS32_FAMILY_EMULATION) && configGENERATE_RUN_TIME_STATS // send Run Time Stats to MIOS terminal out("FreeRTOS Task RunTime Stats:\n"); FREERTOS_UTILS_RunTimeStats(); #endif return 0; // no error }