void sys_startup_init(BOOL8 shutdown) { // // Check for operating mode // if (!shutdown) { // setup MMU shutdown = (*isys_startup_mmu_init)(shutdown); .... } // Shutdown if mode is not normal .... } The sys_startup_init function is entered from assembly code. The code shutdown = (*isys_startup_mmu_init)(shutdown); function pointer is where the code execution is incorrect. Changing the function to : void sys_startup_mmu_init(void) results in the correct code being executed. However is not possible to change all the indirect function calls in this manner, so this is not a feasible solution. C compiler version: 7.07h
"The code shutdown = (*isys_startup_mmu_init)(shutdown); function pointer is where the code execution is incorrect." In what way is it "incorrect?" How have you declared isys_startup_mmu_init? C51 has particular issues with function pointers - have you read the articles in the knowledgebase? (search for "function pointer") "not possible to change all the indirect function calls in this manner" Why not? Why do you have to call these functions indirectly?