diff --git a/flight/CopterControl/System/coptercontrol.c b/flight/CopterControl/System/coptercontrol.c index bfba951b9..29dc68bae 100644 --- a/flight/CopterControl/System/coptercontrol.c +++ b/flight/CopterControl/System/coptercontrol.c @@ -90,6 +90,10 @@ int main() */ initcall_t *fn; int32_t ret; + + /* this one needs to be done first */ + SystemModInitialize(); + for (fn = __module_initcall_start; fn < __module_initcall_end; fn++) ret = (*fn)(); @@ -102,7 +106,7 @@ int main() vTaskStartScheduler(); #endif - return 0; + return 0; } /** diff --git a/flight/Modules/System/systemmod.c b/flight/Modules/System/systemmod.c index 9bb6653cb..fabacd0b1 100644 --- a/flight/Modules/System/systemmod.c +++ b/flight/Modules/System/systemmod.c @@ -87,7 +87,6 @@ static void systemTask(void *parameters); * Initialise the module, called on startup. * \returns 0 on success or -1 if initialisation failed */ -module_initcall(SystemModInitialize, 0); int32_t SystemModInitialize(void) { // Initialize vars