version into simulator output

This commit is contained in:
rusefi 2018-03-24 21:13:08 -04:00
parent e8def93d2e
commit 645ea95739
4 changed files with 23 additions and 23 deletions

View File

@ -712,3 +712,23 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
initTachometer();
#endif /* EFI_PROD_CODE */
}
static char UNUSED_RAM_SIZE[7000];
static char UNUSED_CCM_SIZE[7000] CCM_OPTIONAL;
/**
* See also VCS_VERSION
*/
int getRusEfiVersion(void) {
if (UNUSED_RAM_SIZE[0] != 0)
return 123; // this is here to make the compiler happy about the unused array
if (UNUSED_CCM_SIZE[0] * 0 != 0)
return 3211; // this is here to make the compiler happy about the unused array
#if defined(EFI_BOOTLOADER_INCLUDE_CODE) || defined(__DOXYGEN__)
// make bootloader code happy too
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20180322;
}

View File

@ -259,22 +259,4 @@ void chDbgStackOverflowPanic(thread_t *otp) {
chDbgPanic3(panicMessage, __FILE__, __LINE__);
}
static char UNUSED_RAM_SIZE[7000];
static char UNUSED_CCM_SIZE[14000] CCM_OPTIONAL;
/**
* See also VCS_VERSION
*/
int getRusEfiVersion(void) {
if (UNUSED_RAM_SIZE[0] != 0)
return 123; // this is here to make the compiler happy about the unused array
if (UNUSED_CCM_SIZE[0] * 0 != 0)
return 3211; // this is here to make the compiler happy about the unused array
#if defined(EFI_BOOTLOADER_INCLUDE_CODE) || defined(__DOXYGEN__)
// make bootloader code happy too
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20180322;
}

View File

@ -26,10 +26,6 @@ efitimesec_t getTimeNowSeconds(void) {
return currentTimeMillis() / CH_CFG_ST_FREQUENCY;
}
int getRusEfiVersion(void) {
return 239;
}
static size_t wt_writes(void *ip, const uint8_t *bp, size_t n) {
printToWin32Console((char*)bp);
return CONSOLE_PORT->vmt->write(CONSOLE_PORT, bp, n);

View File

@ -95,7 +95,9 @@ static void runChprintfTest() {
void rusEfiFunctionalTest(void) {
printToWin32Console("Running version:");
printToWin32Console("TODO");
static char versionBuffer[20];
itoa10(versionBuffer, (int)getRusEfiVersion());
printToWin32Console(versionBuffer);
initIntermediateLoggingBuffer();
initErrorHandling();