IMXRT1064 Using BOARD_SDRAM

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

IMXRT1064 Using BOARD_SDRAM

Jump to solution
5,410 Views
Lukas_Frank
Senior Contributor I

Hi Dear Authorized,

 

I am trying to use BOARD_SDRAM in lpuart_edma_rb_transfer SDK example because I am getting following error:

region ‘SRAM_DTC’ overflowed by 183628 bytes

In C/C++ Build > Settings > Tools Settings > MCU Linker > Managed Linker Script

I set every Regions (Heap, Stack, .data, .bss) as BOARD_SDRAM but it does not work.

It still uses SRAM_DTC region when I look outputs or Console Memory Region Details even if I set and apply settings like above. I just want to eliminate memory error in my system. I tried everything I can. Could you please guide me about why it does not work ?

By the way, I tried same example for flexram_ram_allocate SDK example. It works fine. After I see this, I add my first project ‘flexram’ and ‘soc_flexram_allocate’ driver from Manage SDK. It still does not work.

Could you please help me ?

Thanks and regards.

Labels (1)
0 Kudos
Reply
1 Solution
5,365 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
To enable the SDRAM, you need to add the XIP_BOOT_HEADER_DCD_ENABLE=1 in the C/C++ Build > Settings > Preprocessor, then the ROM code will fetch the DCD to initialize the SDRAM during the boot-up process.
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

14 Replies
5,256 Views
snahmad
Contributor II

I cannot debug any more.


/mnt/workspace/workspace/GCC-10-pipeline/jenkins-GCC-10-pipeline-260_20210727_1627371386/src/gdb/gdb/utils.c:671: internal-error: virtual memory exhausted: can't allocate 4064 bytes.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]

0 Kudos
Reply
5,254 Views
snahmad
Contributor II

If I debug using Link application to RAM. debugger does not puck latest code changes,

0 Kudos
Reply
5,270 Views
snahmad
Contributor II

how to increase RAM for  mcuxpresso ide ?

 

/mnt/workspace/workspace/GCC-10-pipeline/jenkins-GCC-10-pipeline-260_20210727_1627371386/src/gdb/gdb/utils.c:671: internal-error: virtual memory exhausted: can't allocate 4064 bytes.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]

0 Kudos
Reply
5,271 Views
snahmad
Contributor II

As my executable more is big about 179 MB.

Do I have create stripped file

 

arm-none-eabi-strip -o "${BuildArtifactFileName}_stripped" "${BuildArtifactFileName}"

 

and specify in debugger to use strip file?

0 Kudos
Reply
5,277 Views
snahmad
Contributor II

now I am getting fault

 

I am getting same error Active Fault @ queue.c line 1479

Unaligned access (8)

0 Kudos
Reply
5,366 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
To enable the SDRAM, you need to add the XIP_BOOT_HEADER_DCD_ENABLE=1 in the C/C++ Build > Settings > Preprocessor, then the ROM code will fetch the DCD to initialize the SDRAM during the boot-up process.
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.
-------------------------------------------------------------------------------

5,402 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @Lukas_Frank ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
To be prudent, I'd like to know whether you ever modify the lpuart_edma_rb_transfer prior to raising the below compile error.

region ‘SRAM_DTC’ overflowed by 183628 bytes
If not, can you tell me the version of the SDK library you used?
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.
-------------------------------------------------------------------------------

0 Kudos
Reply
5,394 Views
Lukas_Frank
Senior Contributor I

Hi Dear @jeremyzhou,

No I did not modify default project except including my external codes that has no dependency anything. I tried it also for one more SDK example (evkmimxrt1064_semc SDRAM). Result is same. Overflow is still exist.

 

My SDK version is 2.11.0

 

Thanks and Regards. 

0 Kudos
Reply
5,382 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply and clarification.
It seems a bit weird, the attachment is the lpuart_edma_rb_transfer demo that I imported it from the SDK 2.11.0 to the MCUXpresso IDE (v11.5.0), it doesn't have the compile error as you mentioned before actually.

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

0 Kudos
Reply
5,375 Views
Lukas_Frank
Senior Contributor I

Hi Dear @jeremyzhou ,

 

I think your code has no overflow factors. I have big data structures related to my project. I put my Heap and Stack to OCRAM and activate optimization level 2 it is now working. But there is a problem when I tried to put them on BOARD_SDRAM. I am not able to move on code it is stopping even no break point is exist. Sometimes, it is also halting. I hope can be solved it.

 

Thanks and Regards.

0 Kudos
Reply
5,301 Views
snahmad
Contributor II

hi,

did anyone tried running any freeRTOS demo app using BOARD_SDRAM.

It hard fault for me.

 

0 Kudos
Reply
5,294 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
1) Did anyone try running any freeRTOS demo app using BOARD_SDRAM.
-- To provide the fastest possible support, I'd highly recommend you to refer to the demos in the SDK library.
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.
-------------------------------------------------------------------------------

0 Kudos
Reply
5,282 Views
snahmad
Contributor II

Yes demo app working now after adding

XIP_BOOT_HEADER_DCD_ENABLE=1

 

now debugging my app. which large                  flash size and use more RAM.

 

Memory region Used Size Region Size %age Used
BOARD_FLASH: 9059680 B 64 MB 13.50%
BOARD_SDRAM: 17819484 B 30 MB 56.65%
SRAM_DTC: 0 GB 128 KB 0.00%
SRAM_ITC: 0 GB 128 KB 0.00%
SRAM_OC: 0 GB 256 KB 0.00%
NCACHE_REGION: 0 GB 2 MB 0.00%
Finished building target: MIMXRT1052_Project2.axf

 

MIMXRT1052_Project2.axf size is  : 175 MB

Do I need stripped my file then try debug flash?

 

Downloading 14500 bytes @ address 0x6089ABB0 - Verified OK
Downloading 16300 bytes @ address 0x6089E454 - Verified OK
Downloading 6496 bytes @ address 0x608A2400 - Verified OK
J-Link: Flash download: Bank 0 @ 0x60000000: 3 ranges affected (5767168 bytes)
J-Link: Flash download: Total: 177.344s (Prepare: 0.242s, Compare: 78.636s, Erase: 18.706s, Program: 43.509s, Verify: 36.128s, Restore: 0.122s)
J-Link: Flash download: Program speed: 129 KB/s
Writing register (PC = 0x60002304)
Read 2 bytes @ address 0x604B0684 (Data = 0xB508)
Read 2 bytes @ address 0x604A4278 (Data = 0x4770)
Read 4 bytes @ address 0x60002304 (Data = 0x4B11B672)
GDB closed TCP/IP connection (Socket 1004)
GDB closed TCP/IP connection (Socket 996)
Restoring target state and closing J-Link connection...
Shutting down...

Cannot debug anymore

3,969 Views
bloom11
Contributor II
The process of how to use and configure external ram , and assign specific data to an other block of RAM without changing the entire memory organisation is well described in this post : https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Placing-data-at-an-address/m-p/1528790/highlight/fa...
0 Kudos
Reply