S32K324 Can't debug in FLASH mode

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

S32K324 Can't debug in FLASH mode

Jump to solution
1,677 Views
Simone9
Contributor III

Hello,

I have created a project for the S32K324 microcontroller and started development.
Debugging in RAM gives me no problems and I can work normally.
However, when I try to debug in FLASH I get a hard fault.
In particular, the console log shows the following message:

"MemManage: The processor attempted an instruction fetch from a location that does not permit execution.
HardFault: A fault has been escalated to a hard fault."

Instead, in the call graph, the calls are as follows:

Simone9_0-1702390655853.png

 

So it seems to get stuck at cache initialisation.
Among the design variables is the define D_CACHE_ENABLE so it should enable it.

How can I solve this problem?

 

IDE version 3.5 update 6
RTD v3.0.0

 

Thanks for the support

0 Kudos
Reply
1 Solution
1,565 Views
Simone9
Contributor III

Hi,

I solved the problem by recreating the project from scratch.
Probably, something went wrong with the creation of the project than adding the missing definition that I can debug in flash in both cores.

Thanks for the support.

View solution in original post

0 Kudos
Reply
8 Replies
1,663 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

HardFault may caused by: Missing define S32K324/S32K314 in SystemInit() so MPU region for ROM hasn’t enabled:
For RTD 3.0.0 Missing define S32K314 in SystemInit() so MPU region for ROM hasn’t enabled.png

This issue has been fixed in S32K3 RTD 4.0.0.
Sorry for the inconvenience we bring you!


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
270 Views
ASN7
Contributor II
Where do I find S32K3 RTD 4.0.0 ? I installed S32 Design Studio and then when I go to Help -> S32DS Extensions and Updates, I only find S32K3 Real-Time Drivers AUTOSAR R21-11 Version 3.0.0.
0 Kudos
Reply
233 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please offline install it by refer to RTD 4.0 with Design Studio 3.5

1,649 Views
Simone9
Contributor III

Thank you for your reply.
I added in SystemInit() the define of the S32K324 in the section you indicated directly by hand.
This way I am able to debug in FLASH and it works.

But it only works for Core0 in both single mode and "Launch Group" mode.
On the other hand, for Core1 with the same change in debug mode in "Launch Group" mode, the situation in the pictures below happens.

Simone9_0-1702486192325.png


In the consol log what I can see is:

Simone9_1-1702486226514.png

 

So, i'm able to debug only the Core0 but not the Core1. How can I resolve this issue?

Thanks for the support.

0 Kudos
Reply
1,642 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Have you also modified SystemInit in S32K324_M7_1/Project_Settings/Startup_Code/system.c? Have you tested S32K3 RTD 4.0.0 to see if this problem also exists?

0 Kudos
Reply
1,640 Views
Simone9
Contributor III

Hi,

Yes, I have also modified Core 1 SystemInit function in the same way.
No, I have not tested the RTD 4.0.0 because the project on which I'm working require the version 3.0.0 of RTD.

Thanks

0 Kudos
Reply
1,573 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

I don't have S32K324 chip on hand, only S32K344EVB.
Is it convenient for you to install another S32DS v3.5+S32K3 RTD 4.0.0 for testing?  If S32K3 RTD 4.0.0 works, then we can compare the differences and fix it.

0 Kudos
Reply
1,566 Views
Simone9
Contributor III

Hi,

I solved the problem by recreating the project from scratch.
Probably, something went wrong with the creation of the project than adding the missing definition that I can debug in flash in both cores.

Thanks for the support.

0 Kudos
Reply