JTAG load and execute u-boot on LS1043a and CodeWarrior with custom RCW/DRAM init

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

JTAG load and execute u-boot on LS1043a and CodeWarrior with custom RCW/DRAM init

1,826 次查看
frank_o
Contributor III

Hi,

We have a LS1043a based custom board and we are adapting LSDK1909 to our customizations.

We currently have a working bl2.pbl (RCW+PBI+ATF_BL2) with our DRAM initialisation in QSPI.  We cannot however pass the BL31 stage for an unknown reason. 

We have read and tested the procedure described in AN12270 Bringing up Layerscape devices using CCS script and DRAM boot.  But since we want to debug why our modifications doesn’t work on our custom board, we would like to use our own RCW+DRAM init code and not rely on Hard coded RCW. Also, our DRAM is different then LS1043ardb/aqds.

Once the ls1043a has booted (RCW+PBI and BL2: bl2_qspi.pbl) and we have manually loaded u-boot in DRAM (address 0x8200 0000); how can we execute code at 0x8200 0000 using CCS or python scripts ?  (Setting ProgramCounter and execute ??)

We use CW4NET 2018.01 ARMv8 ISA and app notes we have found (such as AN4956 u-boot debug using CW) don't look compatible; LSDK1909 uses ATF as bootloader.)

Thanks.

标记 (4)
0 项奖励
2 回复数

1,667 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello frank_o,

Please create a bareboard project in CodeWarrior referring to section "3.2 Working with bareboard application" in C:\Freescale\CW4NET_v2018.01\CW_ARMv8\ARMv8\Help\Getting_Started_for_CW_ARMv8.pdf.

Please open "Target Initialization File" panel from Target Connections->LS1043A_RDB(1), modify "DDR Initialization"  according to your custom board. The check whether the bare board project can run successfully in DDR memory on the target board.

Thanks,

Yiping

0 项奖励

1,667 次查看
frank_o
Contributor III

Hi,

Sorry to say but this was really not my question. I have read Getting_Started_for_CW_ARMv8.pdf and CWARMv8TM many times.

I didn't want CW to override my DDR settings.  As I mentioned, "since we want to debug why our modifications doesn’t work on our custom board, we would like to use our own RCW+DRAM init code".

Anyway, I finally found the setting to disable target initialization when launching debug.  When creating a barebone u-boot project.. Under GDB setting/Debugger tab, uncheck "Execute target initialization file"

pastedImage_1.png

Also if it can help others, when using NXP's LSDK to generate u-boot code, don't load the EFL file in CW as it doesn't contains debug symbol.  Use the file "u-boot" without extension.  It's about 6-7MB in size.  This one is compatible with CW debugger session.  With this file, you will be able to tell CW to break execution at a particular function (_start) for example:

pastedImage_3.png

In my case, ATF was loading u-boot properly in RAM, so I unchecked "Load image" in the startup tab:

pastedImage_2.png

 

Hoping this can help others.

0 项奖励