MCUXpresso C++ Project and SDRAM problems (RT1020-EVK)

cancel
Showing results for 
Search instead for 
Did you mean: 

MCUXpresso C++ Project and SDRAM problems (RT1020-EVK)

244 Views
rshipman
Contributor V

Hi,

I'm experiencing a weird difference between an SDK demo project and a new C++ project.

First experiment:

I created an iled_blinky demo, and set the preprocessor symbols:

XIP_BOOT_HEADER_DCD_ENABLE=1

SKIP_SYSCLK_INIT

At the first breakpoint, i.e. at the start of main(), I used the MCUXpresso memory viewer to look at 0x80000000.

I can read and write at will.

I created a New C/C++ Project - the only setting I changed was to select C++ Project. All the other settings I left as default (i.e. semihost, baremetal etc).

When the project was created I set the preprocessor symbols:

XIP_BOOT_HEADER_DCD_ENABLE=1

SKIP_SYSCLK_INIT

At the first breakpoint, i.e. at the start of main(), I used the MCUXpresso memory viewer to look at 0x80000000.

It is all zero. When I write to it, the values are immediately reset back to zero.

Second experiment:

In both projects, I moved BOARD_SDRAM up to second place just below BOARD_FLASH (in MCU Settings), so that all the data would be in SDRAM, just the code in flash.

When I run the iled_blinky demo, it runs fine.

When I run the C++ project I get a hard fault in SystemInit (near call to SystemInitHook). See attached image.

So why do the iled_blinky demo and the C++ project behave differently?

Many thanks.

RT1020-EVK

MCUXpresso IDE v11.1.0 [Build 3209] [2019-12-12]

SDK version 2.7.0

Windows 10

Labels (1)
0 Kudos
1 Reply

153 Views
FelipeGarcia
NXP TechSupport
NXP TechSupport

Hi Ronnie,

 

I am sorry for the late reply. I have been testing these issues on my side.

 

I have been able to replicate both experiments you reported. The solution for me was the following please give it a try:

 

  • If you check in the MCU setting you will see that in the blinky demo the flash driver is the following.

pastedImage_2.png

  • And the new C++ project uses the following driver.

pastedImage_5.png

  • Please change the flash driver of the C++ project to use MIMXRT1020-EVK_IS25LP064.cfx.
  • Do a power on cycle to the board and load the program again.

 

Using this configuration the behavior was the same as the iled_blinky demo.

 

Hope it helps!

 

Best regards,

Felipe

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