SE05x: Applet update fail with "not enough NV memory"

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

SE05x: Applet update fail with "not enough NV memory"

777 Views
adinathmhatre
Contributor I

Hi,

While updating applet for OEF A564, from applet version 6.0 to 7.2, got below error

App :INFO :PlugAndTrust_v04.02.00_20220524
App :INFO :Running /usr/bin/A564_applet_update_7.2
App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.
sss :INFO :atr (Len=35)
01 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 00
01 00 00 00 00 64 13 88 0A 00 65 53 45 30 35 31
00 00 00
App :ERROR:SEMS Lite requires 10240 bytes NV memory but only have 9856 bytes!!!
App :WARN :nxEnsure:'status == kStatus_SEMS_Lite_Success' failed. At Line:86 Function:ex_sss_entry
App :ERROR:sems_lite_ex_update Example Failed !!!...
App :INFO :ex_sss Finished
App :ERROR:ex_sss_entry Failed
App :ERROR:!ERROR! ret != 0.

We tried "se05x_Delete_and_test_provision", but still there is no enough NV memory.

What could be the reason for not enough NV memory?

 

0 Kudos
4 Replies

757 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @adinathmhatre ,

 

What is the result out of "se05x_Delete_and_test_provision"? I am suspecting if there is still something left in the SE.

Normally if you run se05x_Minimal demo, you may have the free mem size such as 

Kan_Li_0-1677641356144.png

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos

751 Views
adinathmhatre
Contributor I

Hi @Kan_Li ,

Before running se05x_Delete_and_test_provision
App :INFO :mem=15936
App :INFO :se05x_Minimal Example Success !!!...
App :INFO :ex_sss Finished

 

$ se05x_Delete_and_test_provision
App :INFO :PlugAndTrust_v04.02.00_20220524
App :INFO :Running se05x_Delete_and_test_provision
App :INFO :If you want to over-ride the selection, use ENV=EX_SSS_BOOT_SSS_PORT or pass in command line arguments.
sss :INFO :atr (Len=35)
01 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 00
01 00 00 00 00 64 13 88 0A 00 65 53 45 30 35 31
00 00 00
sss :WARN :Communication channel is Plain.
sss :WARN :!!!Not recommended for production use.!!!
App :ERROR:# se05x_Delete_and_test_provision !!! Only for testing. NOT FOR PRODUCTION USE!!!!
App :INFO :Se05x_API_CreateCurve_prime256v1 status = 9000
App :WARN :ECC_ATTESTATION_KEY_ID Object already exists
App :WARN :RSA_ATTESTATION_KEY_ID Object already exists
App :INFO :Se05x_API_CreateCurve_prime256v1 status = 9000
App :WARN :kSE05x_AppletResID_FACTORY_RESET Object already exists
App :WARN :kSE05x_AppletResID_PLATFORM_SCP Object already exists
App :WARN :kEX_SSS_ObjID_UserID_Auth Object already exists
App :WARN :kEX_SSS_ObjID_UserID_Auth Object already exists
App :WARN :kSE05x_AppletResID_RESTRICT Object already exists
App :WARN :kEX_SSS_ObjID_APPLETSCP03_Auth Object already exists
App :WARN :kEX_SSS_ObjID_APPLETSCP03_Auth Object already exists
App :WARN :kEX_SSS_objID_ECKEY_Auth Object already exists
App :WARN :kEX_SSS_objID_ECKEY_Auth Object already exists
App :INFO :ex_sss Finished

 

After running se05x_Delete_and_test_provision
App :INFO :mem=15936
App :INFO :se05x_Minimal Example Success !!!...
App :INFO :ex_sss Finished

 

Regards,

Adinath

0 Kudos

720 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @adinathmhatre ,

 

Thanks for the info! No issue out of "se05x_Delete_and_test_provision", and the requested update size for SEMS Lite is correct in the update file. The difference out of the reported free memory in the minimal example and what SEMS Lite requires comes from the requirement that SEMS Lite need continuous free memory. This amount of continuous free memory is reported by the SEMS Lite CLI:

 

C:\nxp\se_mw\release\SE05x-MW-v04.03.00\simw-top_build\se_x86\bin\Debug>sems_lite_cli_app.exe --getFreePHeap

App   :INFO :Using PortName='COM15' (ENV: EX_SSS_BOOT_SSS_PORT=COM15)

Opening COM Port '\\.\COM15'

sss   :INFO :atr (Len=35)

      01 A0 00 00    03 96 04 03    E8 00 FE 02    0B 03 E8 00

      01 00 00 00    00 64 13 88    0A 00 65 53    45 30 35 31

      00 00 00

App   :INFO :availableCODMemory 3808

App   :INFO :availableCORMemory 2140

App   :INFO :availablePersistentMemory 34720

App   :INFO :availableIDX 32

App   :INFO :Free PHeap Central Gap 34208

App   :INFO :Free freeTransient 3808

SSS Status: SUCCESS

 

In case of situations where the Central gap is much smaller as the available persistent memory a memory compaction needs to be triggered. This can be done e.g. with deleting an object or running the example se05x_InvokeGarbageCollection.

 

Please kindly refer to "simw-top/doc/demos/se05x/se05x_InvokeGarbageCollection/readme.html" for more details.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

725 Views
adinathmhatre
Contributor I

Hi @Kan_Li ,

 

Did you see any failure in "se05x_Delete_and_test_provision"? or you need any more information to check this?

Is there any possibility that chip itself has less NV memory?

 

Regards,

Adinath

0 Kudos