Heap External RAM RT1050 MCUXpresso

cancel
Showing results for 
Search instead for 
Did you mean: 

Heap External RAM RT1050 MCUXpresso

Jump to solution
668 Views
rubensjunior
Contributor IV

Dear Friends,

I have a technical issue stopping the progress of my development with the RT1051 processor.

To use some features that require relatively heavy processing, I need to manipulate memory allocation, in this case heap allocation. In the project we use as a base (evkbimxrt1050_semc from SDK 2.6.1). My need is for the heap-reserved memory area to be in external memory. Through the setups below it is possible to transfer the heap allocation to external RAM and compile without errors. However, during project debugging came the hardfault below, which does not occur when the heap is allocated in default RAM.

Please kindly ask for your assistance in guiding what I can do to work around this problem and proceed with development.

Thank you!

Have a great day!

Rubens Júnior

pastedImage_1.png

pastedImage_1.png

1 Solution
379 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi Rubens Junior,

Thanks for your reply.
It seems a bit weird, I run the hello_world demo well on the MIMXRT1050 EVK board after configuring the heap area into the SDRAM.
I've attached the demo, please give a try.

Have a great day,
TIC

 

 

 

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

View solution in original post

10 Replies
379 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
Firstly, it's correct to set up the heap area into external RAM as the below Figure shows.

pastedImage_1.png
Then, the root cause of the phenomenon is SDRAM initialization should be prior to jumping to main(), so I'd recommend you to use the Device Configuration Data (DCD) feature allows the boot ROM code to obtain the SOC configuration data from an external program image residing on the boot device, as an example, the DCD can be used to program the SDRAM controller for optimal settings, improving the boot performance.
To implement it, I'd like to other demos as the template instead of the semc demo, as it should avoid duplicate initialize the SDRAM, it may cause unpredictable issue.
In my experience, hello_world demo is a good choice, in this demo, it has enabled the Device Configuration Data (DCD) feature.

pastedImage_1.png

Hope it helps.

Have a great day,
TIC

 

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

379 Views
rubensjunior
Contributor IV

Hi jeremyzhou‌,

I created an example of hello word, in which I set up Device Configuration Data (DCD) as requested. However, when changing the heap to external RAM, Hard Fault still occurs. I found out that printf may be causing this problem because I commented out the line that calls this function and the hardfault has disappeared. Getchar and putchar work perfectly. Can you explain to me what is going on?

pastedImage_1.png

Thanks a lot,

Rubens Júnior.

0 Kudos
379 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi Rubens Júnior,

Thanks for your reply.
I'd like to replicate the phenomenon you described, however, the hello_world demo still runs well on the MIMXRT1050 EVK board after configuring the heap area into the SDRAM.

pastedImage_1.png

Have a great day,
TIC

 

 

 

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

379 Views
rubensjunior
Contributor IV

Hi jeremyzhou‌, 

Thank you very much! I run the hello_word of the SDK, but with a restriction: The printf cause a hardfaut. Then I modify the output debug of Semihost for the UART. However I need see the print in the console. How fixed this issue?

Thanks a lot!

Best Regards.

0 Kudos
379 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi Rubens Junior,

Thanks for your reply.
Fig 1 illustrates the steps of configuring the SDK debug console.

pastedImage_1.png

Fig 1

Have a great day,
TIC

 

 

 

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

379 Views
rubensjunior
Contributor IV

Dear jeremyzhou‌,

Thank you very much.I did the config above. However occuors a HardFault when the execution find a printf() call.

Att,


Rubens Júnior

0 Kudos
380 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi Rubens Junior,

Thanks for your reply.
It seems a bit weird, I run the hello_world demo well on the MIMXRT1050 EVK board after configuring the heap area into the SDRAM.
I've attached the demo, please give a try.

Have a great day,
TIC

 

 

 

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

View solution in original post

379 Views
rubensjunior
Contributor IV

Good afternoon jeremyzhou‌.

I appreciate it. I have not received any attachments. Could you send me again?

Thanks a lot!

Rubens Júnior

0 Kudos
379 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi Rubens Junior,

Thanks for your reply.
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Please check the attachment as below figure present.

pastedImage_1.png

Have a great day,
TIC

 

 

 

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

379 Views
rubensjunior
Contributor IV

Dear jeremyzhou

I was able to run the example in my development environment. I discovered what was preventing the debug console from working: the lack of flash memory. When using RAM only (internal + external) there is a limitation for using the debug console. Thank you very much for your attention.

Best regards.

Rubens Júnior

0 Kudos