RT1176 使用FlexSPI2作为启动设备,无法烧录程序和调试

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

RT1176 使用FlexSPI2作为启动设备,无法烧录程序和调试

Jump to solution
3,520 Views
zyz
Contributor I

本人最近在开发一个项目,所用芯片是RT1176,flash接到了FlexSPI2 (Primary Pin Group)上面,已经按照手册说明将 FLEXSPI_INSTANCE boot pin 设为 1(即BT_CFG11/GPIO_DISP_B2_05上拉),其他启动引脚下拉到GND,和开发板保持一致,没有烧写efuse,现在可以直接在RAM中调试运行,说明芯片和JLINK通信应该没问题,但是无法烧录程序到flash和XIP调试,烧录时提示:

         Writing target memory failed.
         Script processing completed.
         Unable to perform operation!
         Command failed with exit code 1

还有一点,因为我使用的是FlexSPI2,所以将MCU settings里面的flash地址从0x30000000改为了0x60000000,然后发现编译出来的文件没有IVT头(前8k字节),查看ld文件,发现ld文件没有以下这部分,这一点也让我感到很疑惑???
                                    .boot_hdr : ALIGN(4)
                                    {
                                        FILL(0xff)
                                        . = 0x400 ;
                                        __boot_hdr_start__ = ABSOLUTE(.) ;
                                        KEEP(*(.boot_hdr.conf))
                                        . = 0x1000 ;
                                        __boot_hdr_ivt_loadaddr__  =  ABSOLUTE(.) ;
                                        KEEP(*(.boot_hdr.ivt))
                                        . = 0x1020 ;
                                        __boot_hdr_boot_data_loadaddr__ = ABSOLUTE(.) ;
                                        KEEP(*(.boot_hdr.boot_data))
                                        . = 0x1030 ;
                                        __boot_hdr_dcd_loadaddr__ = ABSOLUTE(.) ;
                                        KEEP(*(.boot_hdr.dcd_data))
                                        __boot_hdr_end__ = ABSOLUTE(.) ;
                                        . = 0x2000 ;
                                    } >BOARD_FLASH

然后我尝试不直接在MCU setting 上修改flash地址,而是取消选中 manage linker script 这个选项,直接在原有ld文件上修改flash地址,这时编译出来的应该没问题了,但还是无法烧录。。。


最后,我将编译好的文件使用NXP-MCUBootUtility工具烧录程序,可以烧录进去,也能正常启动。。。

不知道MCUXpresso IDE是否还有其他需要配置的地方?为什么我无法使用IDE烧录和调试?

0 Kudos
Reply
1 Solution
3,488 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
1) 难道说烧录算法不能根据boot配置,判断使用的是哪一组启动引脚吗,还是说烧录算法固定死了启动引脚呢?
-- 是的,烧录算法都是基于EVK板子的硬件设计开发的。
链接如下:
https://www.cnblogs.com/henjay724/p/13770137.html

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

0 Kudos
Reply
5 Replies
3,489 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
1) 难道说烧录算法不能根据boot配置,判断使用的是哪一组启动引脚吗,还是说烧录算法固定死了启动引脚呢?
-- 是的,烧录算法都是基于EVK板子的硬件设计开发的。
链接如下:
https://www.cnblogs.com/henjay724/p/13770137.html

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
3,466 Views
zyz
Contributor I

好的,我还有个疑问,为什么我在MCU setting中修改了FLASH基地址后,自动生成的ld文件不包含IVT头(前8K字节)了呢?

谢谢

0 Kudos
Reply
3,462 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
谨慎起见,除了在MCU setting中修改了Flash地址外,你还有其他修改的地方吗?
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
3,511 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
非常感谢使用NXP产品,很高兴为你提供技术支持!
这应该是 串行NOR Flash下载算法不适用你的板子, 解决方法就是修改算法,具体参考此链接。
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
3,501 Views
zyz
Contributor I

您好,感谢您的回复,我现在用的这款flash,挂载到FlexSPI1时是可以正常烧录的,难道说烧录算法不能根据boot配置,判断使用的是哪一组启动引脚吗,还是说烧录算法固定死了启动引脚呢

还有,我没看到您说的修改下载算法的参考链接。。。

 

0 Kudos
Reply