Step to flash u-boot to NOR flash using codewarrior IDE?

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

Step to flash u-boot to NOR flash using codewarrior IDE?

Jump to solution
7,581 Views
nobelsharanyanj
Contributor III

Hi,

 

I have accidentally erased the code from NAND flash while booting from NOR flash. Now my board is not booting up.

Does any one knows the steps to flash u-boot NOR binary files to NOR flash.

For your information I am using P1010RDB-PB. Switch settings are correct as mentioned in the documents.

Labels (1)
0 Kudos
Reply
1 Solution
6,509 Views
nobelsharanyanj
Contributor III

Hi Yiping Wang,

When I tried "source IDcode.tcl" I am able to see the USB tap being connected in CCS.

Which means the usbtap is working and properly configured and detected by CodeWarrior IDE.

I need to boot the P1010RDB-PB board from NOR flash. So I configured the switch settings in such a way that it boot from NOR flash if proper code is available in it (starting address of physical memory map of NOR flash). In order for the code to be available the binaries need to be written into the flash.

I am using CodeWarrior for PA 10.4.0. and init files as P1010RDB-PB_init_core.tcl. Corresponding u-boot.bin file is selected in Add program (action chosen for the target task).

I am not sure what step I missed

Thanks

Nobel

View solution in original post

0 Kudos
Reply
20 Replies
6,509 Views
addiyi
NXP Employee
NXP Employee

One way is to use Flash Programmer from CodeWarrior for PA​. Take a look on Targeting Manual and AN4948 for more information.

Adrian

0 Kudos
Reply
6,509 Views
nobelsharanyanj
Contributor III

Hi Adrian,

Thanks, I tried the same but got some error message.

Error:  The algorithm was not able to run on the target or the flash is not configured properly.

Error:  Getting flash ID failed

Error: The algorithm was not able to run on the target or the flash is not configured properly.

0 Kudos
Reply
6,509 Views
addiyi
NXP Employee
NXP Employee

As Target Task, did you import P1010RDB-PB_NOR_FLASH.xml?

Adrian

0 Kudos
Reply
6,509 Views
nobelsharanyanj
Contributor III

Yes I did,

initially execute button was disable so i created a new project and I followed the steps.

0 Kudos
Reply
6,509 Views
addiyi
NXP Employee
NXP Employee

Ok. One more question: did you use init file when connect to the board?

Adrian

0 Kudos
Reply
6,509 Views
nobelsharanyanj
Contributor III

Hi Adrian,

Yes, I select the init files from

${PA_TOOLS_HOME}/PA_Support/Initialization_Files/QorIQ_P1/

in which I select uboot specific files.

0 Kudos
Reply
6,509 Views
addiyi
NXP Employee
NXP Employee

You have to use P1010RDB-PB_init_core.tcl as init file, because uboot init file will not initialized NOR/DDR.

Adrian

0 Kudos
Reply
6,509 Views
nobelsharanyanj
Contributor III

hi Adrian,

create a codewarrior bareboard project

processor -> QorIQ_P1 -> P1010

Debug target settings

    Board: P1010RDB-PB

    Launch: Download SRAM

    Connection type: USB TAP

Then I follow the steps mention in AN4948.pdf, instead of NAND I choose NOR

and the switch settings as mentioned in P1010RDB_Board_Bringup.pdf.

While following the steps green execute button is greyed. So I change the run configuration.

After that execute button appear. When executed I got the below log.

fl::target -lc "p1010_boot_test-core00_SRAM_P1010_Download"

fl::target -b 0x0 0x40000

fl::target -v off -l off

cmdwin::fl::device -d "S29GL256P" -o "16Mx16x1" -a 0xfe000000 0xffffffff

cmdwin::fl::image -f "/home/inno/Nobel/project/P1010RDB/Source/yocto/QorIQ-SDK-V1.8-20150619-yocto/build_p1010rdb_release/tmp/work/p1010rdb-fsl-linux-gnuspe/u-boot-qoriq/2014.07+fslgit-r0/git/P1010RDB-PB_NOR/u-boot.bin" -t "Auto Detect" -re off -oe on -o 0xfe000000

cmdwin::fl::erase image

Beginning Operation ...   

-------------------------

Auto-detection is successful.  

  File is of type Binary/Raw Format.  

Performing target initialization ...   

Error:  Connect Failed.

Could not connect to the probe (or other debug link)

[CCS last error: CC config string is invalid ](CCSProtocolPlugin)

Error: Connect Failed.

0 Kudos
Reply
6,509 Views
addiyi
NXP Employee
NXP Employee

This is a connection issue. Check, as Yiping already suggested, if ccs drivers are installed. Also, you can check directly in ccs (/usr/local/Freescale/CodeWarrior_PA_10.5.0/PA/ccs/bin and run ../ccs) if utap probe is found (in ccs console run this command: findcc utaps).

Adrian

0 Kudos
Reply
6,509 Views
lunminliang
NXP Employee
NXP Employee

Hello nobel sharanyan jeganathan,

What debug tap are you using, if it's CodeWarrior TAP you need to choose it in the connection type, which is now setting to be USB TAP.

BR

Lunmin

0 Kudos
Reply
6,509 Views
nobelsharanyanj
Contributor III

Hi Lunminliang,

I am using USB Tap, I followed the steps given in topic help but still facing the same problem.

Regards

Nobel

0 Kudos
Reply
6,509 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Nobel,

According to your description, it seems that you are using Linux OS, you need to install CCS USB driver manually. Please follow /usr/local/Freescale/CodeWarrior_PA_10.5.0/PA/ccs/drivers/usb/readme.usbtap.txt

to create new udev rules and make them take effect. If you use CodeWarrior TAP with USB connection please refer to readme.cwtap.txt.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
6,510 Views
nobelsharanyanj
Contributor III

Hi Yiping Wang,

When I tried "source IDcode.tcl" I am able to see the USB tap being connected in CCS.

Which means the usbtap is working and properly configured and detected by CodeWarrior IDE.

I need to boot the P1010RDB-PB board from NOR flash. So I configured the switch settings in such a way that it boot from NOR flash if proper code is available in it (starting address of physical memory map of NOR flash). In order for the code to be available the binaries need to be written into the flash.

I am using CodeWarrior for PA 10.4.0. and init files as P1010RDB-PB_init_core.tcl. Corresponding u-boot.bin file is selected in Add program (action chosen for the target task).

I am not sure what step I missed

Thanks

Nobel

0 Kudos
Reply
6,509 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Nobel,

Please check whether the CodeWarrior license is still valid from Help->Freescale Licenses in CodeWarrior IDE.

In addition, would you please provide the log of the command "source IDcode.tcl".

Thanks,

Yiping

0 Kudos
Reply
6,509 Views
nobelsharanyanj
Contributor III

Hi Yiping,

Please find the log below,

CodeWarrior Connection Server console display active (Tcl8.4.6 / Tk8.4.6)

Loading CCSAPI Tcl interface (/opt/Freescale/PA/ccs/bin/ccstcl.so)...

Loading Svfburner (/opt/Freescale/PA/ccs/bin/svfburner.so)...

Server listening on port: 41475

Clients allowed from all hosts

No clients denied

(bin) 7 % findcc utaps

USB TAP Serial Numbers:

    12022278

12022278

(bin) 8 % source IDcode.tcl

canning for available TAPs connected via USB.....

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+

+      Available Remote Connections

+

+   1 -  USBTAP  -  12022278

+   2 -  CodeWarriorTAP  -  <Specify IP Address>

+   3 -  EthernetTAP  -  <Specify IP Address>

+   4 -  GigabitTAP  -  <Specify IP Address>

+

+   x  - Exit Script without Changes

+

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Specify connection:

1

Configuring TAP Interface....

Configured Connection: utap : 12022278

USB receive reply failure

(bin) 9 %

(bin) 15 % show cc

0: USB TAP (JTAG) (utap:12022278) Loader software ver. {1.10}

Sending code to USB TAP - please wait

0: USB TAP (JTAG) (utap:12022278) CC software ver. {1.3}

(bin) 15 % scanboard

TDO -----

        |

        * Device 0  IDCODE: 1692301D  Device: FSL P1010 rev 2.x

        |

TDI -----

0 Kudos
Reply
6,509 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Nobel,

It is a little weird, according to the CCS console information, the CCS driver works normally, but CodeWarrior IDE reports CCS failed to connect to USB TAP. (Please make sure CodeWarrior license doesn't expire).

Would you please use the following procedure to capture CCS log in CodeWarrior IDE and send it to me? It contains detailed communication information between CodeWarrior and the target board.

Please enable CCS log from "Run->Debug Configurations -><project>-core0_RAM_-Connect(Download)->Edit...->Advanced->Advanced CCS setting->Enable logging", and connect to the target from "Run->Debug Configurations-><project>-core0_RAM_-Connect(Download)->Debug”, the CCS log will be displayed in the console panel in CodeWarrior IDE.

Note:

If the CCS log in the console is truncated, please enlarge the console buffer from Window->Preferences->Run/Debug->Console->uncheck "Limit console output". (Please open the console panel from Window->Show View->Console, and if nothing displayed, please choose the correct session on the right top icon.)


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
6,509 Views
nobelsharanyanj
Contributor III

Hi Yiping,

Kindly see the  log below,

ccs_open

    ipaddr = 127.0.0.1

    port = 41475

    timeout = 15

    serverh = 0

    ccs_open; ccs_error = 10

    Error message: Connection refused

ccs_open

    ipaddr = 127.0.0.1

    port = 41475

    timeout = 15

    serverh = 0

    ccs_open; ccs_error = 10

    Error message: Connection refused

ccs_open

    ipaddr = 127.0.0.1

    port = 41475

    timeout = 15

    serverh = 0

    ccs_open; ccs_error = 10

    Error message: Connection refused

ccs_open

    ipaddr = 127.0.0.1

    port = 41475

    timeout = 15

    serverh = 0

    ccs_open; ccs_error = 10

    Error message: Connection refused

ccs_open

    ipaddr = 127.0.0.1

    port = 41475

    timeout = 15

    serverh = 0

    ccs_open; ccs_error = 0

ccs_get_connection_count

    serverh = 0

    count = 1

    ccs_get_connection_count; ccs_error = 0

ccs_available_connections

    serverh = 0

    count = 0

    ccs_available_connections; ccs_error = 0

ccs_available_connections

    serverh = 0

    count = 0

    ccs_available_connections; ccs_error = 0

ccs_config_cc

    serverh = 0

    config_string = utap:0

    ccs_config_cc; ccs_error = 0

ccs_available_connections

    serverh = 0

    count = 0

    ccs_available_connections; ccs_error = 2

    Error message: Network timeout

ccs_kill_server

    serverh = 0

    ccs_kill_server; ccs_error = 14

    Error message: Invalid sequence number

FYI, it was working previously then it stop working can't able to flash it.(Now I am using Custom Board).

Let me know If I need to start a new thread to discuss. and I am using Linux environment.

0 Kudos
Reply
6,509 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Noble,

The CCS connection problem is caused by CodeWarrior IDE configuration or CodeWarrior itself, it is not related with the target board or USB TAP.

Please open the panel "Hardware or Simulator Connection" from Run->Debug Configurations -><project>-core0_RAM_-Connect(Download)->Edit->Connection, please make sure CCS server is configured as "Automatic launch” rather than "Manual launch".

If this problem remains, I suggest you create a  bare board project in a new workspace following new project wizards.

You could create a new thread if needed.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
6,509 Views
nobelsharanyanj
Contributor III

hi Yiping,

Sure, will share CCS log. but let me know how to read the written image from NOR flash again using codewarrior IDE

Thanks

Nobel.

0 Kudos
Reply
6,509 Views
addiyi
NXP Employee
NXP Employee

To read the content of the NOR, you can use Dump Flash action (will dump the NOR content in a file) or Memory View (provide the NOR address).

Adrian

0 Kudos
Reply