LS1046A JTAG Programming in Production

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

LS1046A JTAG Programming in Production

3,517 Views
smiller2
Contributor IV

We are moving into the production phase of our board using the LS1046A.    It is booting from QPSI.  We need to program that QSPI chip after assembly.   We have the standard 10 pin JTAG header on the board and previously programmed via Code Warrior.    However, Code Warrior is too expensive and cumbersome for a production environment.  

What other tools can be used just to program the QSPI and get the board to boot?   We only need to load three files,  RCW, ATF, and the Ethernet driver.    I can probably concatenate those into a single blob file.  

Is there support for this from something like OpenOCD using the CMSIS-DAP  interface? 

Thanks.

10 Replies

2,959 Views
dykeag
Contributor II

@smiller2 

We are facing the exact same issue. Can you share what solution you came up with? 

2,936 Views
stadium_aquino
Contributor IV
0 Kudos
Reply

2,954 Views
smiller2
Contributor IV

Unfortunately, there was no good solution to this.   Our manufacturing uses a single PC to perform the initial programming.   On this PC, they have an evaluation copy of CodeWarrior.   Every time that the evaluation copy expires, then they erase the hard drive of the PC,  install the OS again, and load another evaluation copy.    Very time consuming. 

2,949 Views
dykeag
Contributor II

Oh man, that is awful. 

I am currently looking into the OpenOCD solution myself, which is how I came across this thread.

My thinking was that we could use literally any other JTAG probe (probably a Digilent because we have a dozen of those floating around the office) and use OpenOCD to do the initial programming.

I noticed that in May of 2022, a commit was added to OpenOCD which added support for the ls1046a. The change appears to consist of a single configuration file. I have my doubts that this will work out-of-the-box for either of us, but it does appear to be a starting point. In particular, I don't see how OpenOCD sets the RCW or anything else that those CodeWarrior python init scripts do (DDR timing, etc). I dread trying to figure this out myself, especially considering the absolute nightmare NXP created with all the peripherals on this processor having different endianness. 

 

The OpenOCD commit: https://review.openocd.org/c/openocd/+/6854/4

 

If I come up with anything workable, I'll be sure to let you know. 

 

-- dykeag

2,363 Views
dykeag
Contributor II

Update: We never found a solution to this issue. We ended up getting our flash memory pre-programmed from the vendor before we place them on the board

0 Kudos
Reply

2,287 Views
stadium_aquino
Contributor IV

Did you try the semihosting thing?

0 Kudos
Reply

2,282 Views
dykeag
Contributor II

I did, and I did get it working somewhat. 

What I was never able to do was override the RCW without using CodeWarrior. 


0 Kudos
Reply

2,277 Views
stadium_aquino
Contributor IV

Well, what I always did was flash a minimal image with just SPL+U-Boot+FMan ucode and then reboot. That way I could download the main image over Ethernet.

Although, you should have a look at https://lore.kernel.org/linux-arm-kernel/20230810102631.bvozjer3t67r67iy@skbuf/  which has how to override the RCW. I haven't tested it yet.

2,264 Views
dykeag
Contributor II

I never saw that - that is exactly what I'm looking for!

 

It really irks me that NXP purposefully didn't document how to override the RCW - a feature which is fairly essential to board bringup. 

0 Kudos
Reply

3,505 Views
ufedor
NXP Employee
NXP Employee

There are no direct recommendations to use specific tool for production SPI Flash programming. In general any debugger tool could be used. Possible alternatives to CodeWarrior are tools from Lauterbach, Wind River, Green Hills.

0 Kudos
Reply