Execute hello_world project on the external SDRAM without *.mac file

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

Execute hello_world project on the external SDRAM without *.mac file

500 Views
suenaga_takeaki
Contributor I

I'm trying to execute hello_world project without evkmimxrt1064_sdram_init.mac(and with MIMXRT1064xxxxx_sdram.icf) on EVK-MIMXRT1064.

I know that I need to initialize the external SDRAM which *.mac do, so I add the initialization code in SystemInitHook().

But It does not work I expected. I get Hard Fault Exception at the beginning of SystemInit() function.

 

Why the Exception is occurred?

How do I fix the code to work well?

 

# I guess it's caused by accessing to uninitialized SDRAM, (because STACK and HEAP are allocated to SDRAM)

# but I cannot to find where it's caused.

 

Please tell me any ideas or useful documents/website to solve the probrem.

My Environment:

 Target Board: EVK-MIMXRT1064(iMXRT1064)

 Compiler/IDE: IAR EWARM

 ICE: I-Jet

 Project: hello_world(I got from NXP web site, https://mcuxpresso.nxp.com/en/builder)

Labels (1)
0 Kudos
1 Reply

433 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Takeaki Suenaga 

Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.
If you want to use the debugger to debug the code in the SDRAM directly.
You still need to use the related files which tell the debugger to do the SDRAM initialization at first.
Not IAR, even the MCUXPresso IDE also need to add another .scp file tell the debugger do the SEMC initialization.
Then when you enter the debug mode, the debugger can do the related debug function.
So, in the IAR if you don't use the .mac, maybe the IDE can't work with external SDRAM.
You also can check it with IAR IDE side: https://www.iar.com/support/
Whether the IAR have the other method don't add .mac, then can do the external SDRAM debug.

Wish it helps you!
If you still have questions about it, please kindly let me know.

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
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