Flash programming via SWD for mass production

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

Flash programming via SWD for mass production

463 Views
Andreas_K
Contributor I

Hello,

I am currently in the process of implementing a flashing solution for mass production via SWD for the KW45B41Z83AFPA by following the application note AN14003. As a first prototype I want to follow the example as close as possible.

So far, I was able to generate the keys with the spsdk (release/1.10.2), but I am not sure what to do in the CM33 image preparation, because I did not find the linker symbol `gEraseNVMLink_d`.

Before that, I installed MCUXpresso IDE v.24.9.25 and the corresponding KW45B41Z83xxxA SDK version 2.16.100.

Installation allowed me to import examples and according to the application note I imported the otap_client_att_bm:

Andreas_K_0-1732802854509.png

I finished the SDK Example import without changing anything:

Andreas_K_1-1732802894818.png

The application note then wants me to unset the `gEraseNVMLink_d` symbol, however, it is not part of the project:

Andreas_K_2-1732803031856.png

Do I need the SDK in a different version? Can you give me a guidance on how to proceed in the application note?

Best regards,

Andreas

0 Kudos
Reply
6 Replies

454 Views
Andreas_K
Contributor I

Hello,

one remark to this: I found the symbol `gUseNVMLink` in the project, should I set this to 0 (with `--defsym=gUseNVMLink_d=0`)?

Andreas_K_0-1732803927479.png

Otherwise, if any other CM33 image is also fine, I could also continue with a simple hello world example to verify that this SWD flashing approach is working.

Best regards,

Andreas

0 Kudos
Reply

406 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello Andreas,

 

Hope you are doing well. Yes, the gEraseNVMLink_d linker symbol is on the MCUXpresso Project:

Ricardo_Zamora_0-1732819094105.png

 

 

All of our BLE examples have this symbol.

 

Regards,

Ricardo

0 Kudos
Reply

315 Views
Andreas_K
Contributor I

Hello Ricardo,

thank you!

The gUseNVMLink_d symbol is the correct one.

I continued with the CM33 Image preparation in the Application Note 14003 and got stuck at the last step: Adding the OTA update code to the 'BluetoothLEHost_AppInit()' function. This is the last step on this page: CM33 image preparation.

I got the error that 'pTestHWParams' and 'Test_ota_partition' are both undeclared. How do I initialize/declare them correctly for this production usecase? I followed the application note closely, but this was not stated in the guide.

Looking forwared to hearing from you and best regards,

Andreas

0 Kudos
Reply

308 Views
Andreas_K
Contributor I

Hello Ricardo,

I also have a subsequent question regarding this approach:

Is this merged image (NBU firmware and CM33 application) required to be run from flash?

According to the introduction of the Application note, it states that "The method increases the production efficiency as it requires downloading the merged binary file only once through Serial Wire Debug (SWD)", but this image does not seem to be runnable from SRAM directly and the Memory AP does not allow to write directly into Flash.
So how is it possible to directly write into the Flash via SWD? Doesn't this still require the slow ISP utility?

Best regards,

Andreas

0 Kudos
Reply

153 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

The Application Note uses the OTAP example as a base. This is why some functions and parameters are not included on other sdk examples.

I am not getting your last question. The intention of the AN is to use SWD, that is faster that using ISP.

 

Regards,

Ricardo

0 Kudos
Reply

106 Views
Andreas_K
Contributor I

Hello Ricardo,

thanks for your patience! Maybe I mixed some things up here.

The Application Note mainly makes use of the NBOOT API to handle NBU firmware update and fusing, correct? I am wondering if the NBOOT API could also be called from an application that only runs in the SRAM, while the chip is inside a debug session.

From what I understood, the NBU firmware image must be flashed to the PFLASH. The NBOOT API then is able to use this image for an NBU firmware update.

So, to summarize my questions:

  • Can the NBOOT API be called from an Application running in the SRAM, while the chip is in a debug session?
  • Can the NBOOT API handle data from SRAM only? (For e.g. NBU firmware update)

I am looking forward to hearing from you!

Best regards,

Andreas

 

0 Kudos
Reply