J-Link crashes when reconfiguring FlexRAM on RT1050

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

J-Link crashes when reconfiguring FlexRAM on RT1050

1,387 Views
jackking
Senior Contributor I

I am trying to perform a software reconfiguration of FlexRAM on the IMXRT1052, using just the SDK example, after the FlexRAM is reconfigured, the J-Link debugger halts with a HardFault.  I assume the J-Link is using RAM for execution and loses this when the RAM is reconfigured.

Is there a way to allow the J-Link to continue after the RAM is reconfigured?

Executed SetRestartOnClose=1
[MCUXpresso Semihosting Telnet console for 'evkmimxrt1060_flexram_ram_allocate_01 JLink Debug' started on port 56243 @ 127.0.0.1]

SEGGER J-Link GDB Server V6.51b (beta) - Terminal output channel

FLEXRAM ram allocate example.

Allocate on-chip ram:

 OCRAM bank numbers 4

 DTCM bank numbers 4

 ITCM bank numbers 8

Allocate on-chip ram success

os_test_-_evkmimxrt1060_flexram_ram_allocate_01_source_semihost_hardfault_c_-_MCUXpresso_IDE.jpg

0 Kudos
6 Replies

1,157 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Jack,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) Is there a way to allow the J-Link to continue after the RAM is reconfigured?
-- I think the application note: AN12077 provide the way to avoid the crash issue, please learn the detail information in the 3.1.3.1. Considering Cortex-M7 TCM size limitations section in the AN12077.

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

1,157 Views
jackking
Senior Contributor I

Are you saying that the "flexram_allocate" SDK sample (unchanged) will not work with a J-Link debugger?

0 Kudos

1,157 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Jack,

Thanks for your reply and I think I misunderstood your question.
The J-link is able to debug the flexram_allocate demo in the LPCXpresso IDE, I had already done the testing, as the below these figures show.

pastedImage_1.png

Fig 1

pastedImage_3.png

Fig 2

pastedImage_5.jpg

Fig 3

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

1,157 Views
david_huwyler
Contributor III

Hi Jeremy

I have a similar issue with the Flexram of a i mx rt1052.

I reallocate the RAM as in the example but different sizes: 256k DTCM, 128 ITCM and 128 OC.

My application uses 250k of the DTCM. If i leave the Linkerscript unchanged, only 128k is specified (default), so there is a linker error (application wont fit into ram)...

If i change the DTCM Size in the MCU Settings inside the Project-Properties (MCUEpresso) then there is no linker error anymore, but if i start the application, there is a J-Link error, because the J-Link probe cannot access all RAM because its not all of it is allocated at the start of the application.

Any idea to solve this dilemma?

Regards

Dave

0 Kudos

1,157 Views
jackking
Senior Contributor I

Well, the J-Link worked with the NXP EVK, but didn't work with an Embedded Artists RT1052 module/evk.

I switched to the LPC-Link for that particular example and it worked as expected.  So it seems there is some issue with the J-Link/EmbeddedArtists combination for FlexRAM...

Hope that helps.

0 Kudos

1,157 Views
david_huwyler
Contributor III

No my problem is not the example. the example works fine, because it dosnt use more RAM (of any kind) than the linker configuration specifies (memory section).

My problem is, that my application uses more RAM than the default setting and later in the code i reallocate the flexram to be the size i need. but at the time i start debugging, the ram is not reallocated and the debugger (jlink) throws an error that it cannot access all ram (because its not allocated at this point in time...)

0 Kudos