LS1046ARDB and using CodeWarrior to reflash QSPI flash with original binary files

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

LS1046ARDB and using CodeWarrior to reflash QSPI flash with original binary files

Jump to solution
2,301 Views
Daves_Garage
Contributor IV

I've manged to erase my QSPI flash (both banks), and would like to restore the original firmware using CodeWarrior/TAP via JTAG on my LS1046ARDB board.  Are there instructions for this process, and is there a location to download the file(s)?

Thank you in advance.

0 Kudos
Reply
1 Solution
2,166 Views
Daves_Garage
Contributor IV

Everything done, and all the time wasted chasing the wrong approach to fixing this relatively simple problem is amazing to me...

It's a simple approach of downloading the proper binary image file, and using the flash utility within CodeWarrior to reflash the QSPI NOR memory at the right spot (which happens to be address 0x00000000, so that's pretty simple).

There is a "How To" written already for this effort at: https://community.nxp.com/t5/Layerscape-Knowledge-Base/LS1046ARDB-How-to-update-composite-firmware-i...

Wish I had been directed to this a few weeks ago...   live and learn.

View solution in original post

0 Kudos
Reply
8 Replies
2,167 Views
Daves_Garage
Contributor IV

Everything done, and all the time wasted chasing the wrong approach to fixing this relatively simple problem is amazing to me...

It's a simple approach of downloading the proper binary image file, and using the flash utility within CodeWarrior to reflash the QSPI NOR memory at the right spot (which happens to be address 0x00000000, so that's pretty simple).

There is a "How To" written already for this effort at: https://community.nxp.com/t5/Layerscape-Knowledge-Base/LS1046ARDB-How-to-update-composite-firmware-i...

Wish I had been directed to this a few weeks ago...   live and learn.

0 Kudos
Reply
2,253 Views
Daves_Garage
Contributor IV

I have managed to make contact to the TAP device finally by rebuilding the environment on a different system.  Still don't know why this matters, but I am happy to make the progress, as this has been plaguing me for several weeks.

I now face a new problem, and was hoping somebody knew how to get past this:

When I attempt to debug the HelloWorld sample project, I get this:

Daves_Garage_0-1655500536530.png

 

What does this mean, and how do I fix it?

Thanks in advance for any help.

0 Kudos
Reply
2,178 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please click "flash programing icon" under "Target Connections" to flash programing directly.

The flash programming algorithm runs in OCRAM.

Probably DDR initialization section provided in CW initialization file is not suitable for your target board.

0 Kudos
Reply
2,172 Views
Daves_Garage
Contributor IV

My target board is the LS1046ARDB, purchased from NXP. - Is the example code not compatible with this board?  If not, where can I find the original software image file that can be used to restore the original firmware, and the instructions for flashing it?  This was the original question.

0 Kudos
Reply
2,268 Views
Daves_Garage
Contributor IV

Also, using a terminal window, and telnet, the communication to the TAP module looks like this:

Daves_Garage_8-1655338532206.png

 

 

0 Kudos
Reply
2,268 Views
Daves_Garage
Contributor IV

I uninstalled my current installation of Codewarrior, and downloaded the files you recommended above.  After installation of both CodeWarrior and the updates, my system looks like this:

Daves_Garage_0-1655337606631.png

Creating a bare metal project, and compiling, was successful.

Replicating the Target Connection, assigning an IP address, and modifying the Target Initialization file to reflect USE_SAFE_RCW = True was also successful, as shown here:

Daves_Garage_1-1655337873298.png

Daves_Garage_2-1655337904140.png

Pinging the TAP module is successful, as shown here:

Daves_Garage_3-1655338013525.png

Device Manager shows TAP device, as shown here:

Daves_Garage_4-1655338094491.png

Even the CCS utility pings the device, as shown here:

Daves_Garage_5-1655338163140.png

However...

The CCS utility cannot find the TAP module:

Daves_Garage_6-1655338235629.png

Nor can CodeWarrior:

Daves_Garage_7-1655338303424.png

 

And I still am getting this "Problem Occurred" window.

 

 

 

 

0 Kudos
Reply
2,281 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please download and install CodeWarrior for ARMv8 from the following link.

https://drive.google.com/file/d/1Kjq1nLYrtIfWAHYrup5Cf-TTEJI9iWiu/view?usp=sharing

Please download the latest update package from the following link. Then open CodeWarrior IDE, and instill it from Help->Install New Software->Add->Archive. 

https://drive.google.com/file/d/1ZHiYWDOhb27o0oD5Brqjn4_vJzRUCKoY/view?usp=sharing

Please save license.dat in Common folder.

  1. Please refer to section "3.2 Working with bareboard application" in C:\Freescale\CW4NET_v2020.06\CW_ARMv8\ARMv8\Help\Getting_Started_for_CW_ARMv8.pdf to create a bareboard project in CodeWarrior IDE to connect to the target board.

Please enable hard-coded RCW in CodeWarrior initialization file.

In Target Connections panel, please double click LS1046A_RDB(1) to open "Target Initialization File" panel, please modify "USE_SAFE_RCW = False" to "USE_SAFE_RCW = True", then save the configuration and connect to the target board.

  1. Please refer to section "7.7 Using flash programmer from eclipse IDE" in C:\Freescale\CW4NET_v2020.06\CW_ARMv8\ARMv8\Help\PDF\ARMv8_Targeting_Manual to do flash programming in CodeWarrior IDE.
0 Kudos
Reply
2,238 Views
Daves_Garage
Contributor IV

Working with bareboard example, readme file indicates the memory map for target configuration is:

##-------------------------------------------------------------------------------------#
## Memory map and initialization
##-------------------------------------------------------------------------------------#

0x00_0000_0000 .. 0x00_00FF_FFFF 16MB Boot ROM
0x00_0100_0000 .. 0x00_0FFF_FFFF 240MB CCSR
0x00_1000_0000 .. 0x00_101F_FFFF 128KB OCRAM
0x00_2000_0000 .. 0x00_23FF_FFFF 64MB DCSR
0x00_4000_0000 .. 0x00_5FFF_FFFF 512MB QUAD SPI
0x00_8000_0000 .. 0x00_FFFF_FFFF 2048MB DDR

Failure during attempted debug session indicates:

Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x80000d28

Does this mean the debugger is attempting to load the software into DDR memory and execute from there?

Where is the DDR configured within the bareboard example?

0 Kudos
Reply