S32K146 EVB I can't jump to main() function

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K146 EVB I can't jump to main() function

Jump to solution
841 Views
yezi
Contributor I

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.

yezi_0-1687921446044.png

 

yezi_1-1687921614773.png

 

 

Tags (1)
0 Kudos
Reply
1 Solution
778 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

View solution in original post

0 Kudos
Reply
3 Replies
773 Views
yezi
Contributor I

Hi @lukaszadrapa 

I also use S32DS for ARM 2.2.

I have upload the elf file, please take a look for me.

Best Regards,

yezi

0 Kudos
Reply
758 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply
779 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply