FlexSpi on Eclipse with cmake

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

FlexSpi on Eclipse with cmake

1,122 Views
shaileshnsec
Contributor II

Hi,

We are working on FlexSpi module, we have tested SDK 2.9 on IMXRT1050-EVKB with SDK_2.9.1_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\flexspi\hyper_flash\polling_transfer example using linker file MIMXRT1052xxxxx_flexspi_nor.icf and it is working fine on IAR toolchain.

Also we have our own SDK but Flex SPI almost ported from NXP also we have tested on IMXRT1050-EVKB IAR toolchain using linker file  MIMXRT1052xxxxx_flexspi_nor.icf and it is also working fine. 

But our requirement is we have to build on eclipse using cmake. And our SDK with ported FlexSpi is working fine with linker MIMXRT1052xxxxx_ram.icf file on eclipse with cmake but with linker MIMXRT1052xxxxx_flexspi_nor.icf (we have used XIP also with XIP_EXTERNAL_FLASH=1 XIP_BOOT_HEADER_ENABLE=1) somewhere going to unknown location or giving DAP error.

I have attached image for error. Kindly help us in resolving this issue almost struck in this.

Mostly when I debug it fails during FlexSpi init when trying to reset 

void FlexSpi_SoftwareReset(void)
{
FLEXSPI_Type * const pFlexSpiBaseAddress = FLEXSPI;

base->MCR0 |= FLEXSPI_MCR0_SWRESET_MASK;

or when trying to read from MCR0, MCR1, MCR2. 

shaileshnsec_0-1631789232604.png

 

Thanks and Regards,

Shailesh Kumar

0 Kudos
4 Replies

1,081 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
In my opinion, the issue may be related to the linker file and you can try to use the linker file for the Arm® GCC demos in the SDK library instead of MIMXRT1052xxxxx_flexspi_nor.icf.
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,064 Views
shaileshnsec
Contributor II

Hi, 

I don't think this is the problem with linker file. I feel some code are getting optimized in eclipse for some structure which we are writing directly to memory location using #pargma. I have ported NXP code also in eclipse environment with IAR toolchain using Cmake but getting same kind of issue either it does not hit main or some reset issue to unknown location.

Could you please provide example project polling_transfer using linker MIMXRT1052xxxxx_flexspi_nor.icf in eclipse environment with IAR toolchain using cmake . 

Thanks and Regards,

Shailesh Kumar

0 Kudos

986 Views
shaileshnsec
Contributor II

HI, 

Any solution for this query. 

We are almost struck up in this problem.

Thanks and Regards,

Shailesh

0 Kudos

1,105 Views
shaileshnsec
Contributor II

Hi,

Adding more information on this issue.

I am attaching snaps of interrupt table which starts from 0x60002000 (define symbol m_interrupts_start = 0x60002000;) for IAR and eclipse(using cmake) with IAR toolchain.

We can see clearly in case of Eclipse CSTACK is not available at 0x60002000 but in IAR it is in correct place so it is working.

Eclipse interrupt table : 

Eclipse_m_interrupts_start.PNG

IAR interrupt table : 

IAR_m_interrupts_start.PNG

  Eclipse CSTACK location : 

CSTACK location in case of eclipse.png

Thanks and Regards,

Shailesh Kumar

0 Kudos