Hi,
I am developing a bootloader program for S32K146.
I found that if the function is slightly longer, it prevents entering the main() function. To verify this hypothesis, I wrote a test function called abcd(). I noticed that if I call abcd() within the main() function, it doesn't jump to the main function. However, if I comment out some lines in abcd(), it can jump back to the main function. This has caused me a lot of confusion during development. Could you please explain why this happens and suggest a solution? I have uploaded my test code below.
Solved! Go to Solution.
Hi @yezi
I did quick test on my side and it works, I can reach the endless "for" loop at the end.
Which S32DS did you use? Could you send me compiled version (including elf file)?
I imported it to S32DS for ARM 2.2.
Regards,
Lukas
I also use S32DS for ARM 2.2.
I have upload the elf file, please take a look for me.
Best Regards,
yezi
It works too. Even without a debugger. To be sure it's not caused by debugger, I just turned the power on, I attached debugger to running target without reset, stopped the code and it was in the endless for loop again. Notice that I used your original elf file. I tested it using Trace32 from Lauterbach. Then I tried also OpenSDA on the EVB using debugger in S32DS and the same result - it works... I can see nothing wrong. Regards,
Lukas
Hi @yezi
I did quick test on my side and it works, I can reach the endless "for" loop at the end.
Which S32DS did you use? Could you send me compiled version (including elf file)?
I imported it to S32DS for ARM 2.2.
Regards,
Lukas