diff --git a/firmware/controllers/core/error_handling.h b/firmware/controllers/core/error_handling.h index 3e2cd4343b..4a6d046218 100644 --- a/firmware/controllers/core/error_handling.h +++ b/firmware/controllers/core/error_handling.h @@ -8,14 +8,15 @@ #ifndef ERROR_HANDLING_H_ #define ERROR_HANDLING_H_ -#include "global.h" -#include "obd_error_codes.h" - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ +#include "global.h" +#include "obd_error_codes.h" + + /** * Something is wrong, but we can live with it: some minor sensor is disconnected * or something like that @@ -30,7 +31,7 @@ typedef uint8_t fatal_msg_t[200]; * * see also warning() */ -void firmwareError(obd_code_e code, const char *fmt, ...); +EXTERNC void firmwareError(obd_code_e code, const char *fmt, ...); #define hasFirmwareError() hasFirmwareErrorFlag diff --git a/firmware/global.h b/firmware/global.h index 5ccd427863..1e7e18d260 100644 --- a/firmware/global.h +++ b/firmware/global.h @@ -15,8 +15,6 @@ #ifndef GLOBAL_H_ #define GLOBAL_H_ -#include "common_headers.h" - #ifdef __cplusplus extern "C" { @@ -24,6 +22,7 @@ extern "C" // todo: remove this from here and rely on os_access.h. unfortunately hal.h includes ch.h :( #include +#include "common_headers.h" // this is about MISRA not liking 'time.h'. todo: figure out something #if defined __GNUC__