This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello everyone,
I am encountering an issue while flashing firmware using embedded programming exe. Previously, flashing with a dummy certificate chain worked without any issues. However, after switching to our custom certificate chain, the process fails with the error code -10289 and an extended error code 2633.
Interestingly, when I use UniFlash with the same custom certificates, the flashing completes successfully. Any insights on troubleshooting or addressing this would be greatly appreciated.
Thank you!
Hi,
This error means a signature error of a file (when closing the file).
What catalog have you included in the image and how files (MCU image file and other user files if you have any) are configured in terms of the certificate?
If it works with Uniflash, there is no reason it would not work with embedded programming.
Shlomi
Hi,
We are using a self.signed certificate.
Then we created a certificate catalog and the certificate catalog is signed by our root private key.
Our certificates are
root ca certificate vmedd_root_ca_cert
vendor certificate vmedd_cert_trusted
MCU images are signed by private key of this this respective vendor certificate “vmedd_cert_trusted”
no other file is signed or encrypted
We generated catalog like this
REM Generate certificate catalog
SLImageCreator.exe tools make_cert_catalog --cert_folder %CertificatesFolder% --out_file %CatalogPath%
REM Sign catalog with vendor private key
SLImageCreator.exe tools sign --file %CatalogPath% --priv %PrivateKeyPath% --out_file %CatalogSignedPath% --fmt "BINARY_SHA1"
Hi,
Not sure how your OTP procedure went but just to make sure, have you included the root CA you are using in your private catalog? I would assume the OTP is OK for now as you mentioned that it works with Uniflash.
Just want to make sure I understand, with Uniflash the programming is successful, right? and also the application is loaded and works as expected. Is this correct? is it only the embedded programming that does not work?
Shlomi
Hi,
Both of our certificate is present in root Directory such as
root ca certificate = vmedd_root_ca_cert
vendor certificate = vmedd_cert_trusted
Programmng with uniflash is 100% success. we have tested hundreds of devices so far and working fine for last two months.
"is it only the embedded programming that does not work?"
Yes with our private certificate, embedded programming does not work. We previously tested embedded programming with dummy certificates and worked perfectly
what I still don't understand in the flow is where does the OTP take place.
OTP can only be achieved using Uniflash. Can you describe the flow in both cases (Uniflash and embedded programming)?
Hi Shlomi,
This is my json file of the project. In the files para, SM_MCU_CERT_NAME always remain empty. Is this something relevant?
Hi,
I dont need otp for embedded programming. We are alreading doing otp with uniflash.
Can you describe the flow in both cases (Uniflash and embedded programming)?
Can you little bit more explain what did you mean by flow?
so you are programming when the OTP is already flash?
by flow I mean the steps you take when programming via embedded.
Can you attach the ImageConfig.xml file? I want to see the filenames and configuration.
Shlomi
<?xml version="1.0" ?> <Root> <ImageBuilderProp StorageCapacityBytes="8388608" IsTheDeviceSecure="true"> <RetToFactoryFlagsList> <RetToFactoryFlag>RET_TO_IMAGE_HOST</RetToFactoryFlag> <RetToFactoryFlag>RET_TO_DEFAULT_HOST</RetToFactoryFlag> <RetToFactoryFlag>RET_TO_IMAGE_GPIO</RetToFactoryFlag> </RetToFactoryFlagsList> </ImageBuilderProp> <CommandsSetList> <CommandsSet> <Command> <CommandFormatStorage EraseStorage="false" SecurityAlertThreshold="15"/> </Command> <Command> <CommandWriteCertificateStore SignatureFileName="C:/Users/Build-server/.SLImageCreator/projects\ProductionR0_34\sl_css\vmedd_certCatalog.lst.signed.bin"> <FileLocation>C:/Users/Build-server/.SLImageCreator/projects\ProductionR0_34\sl_cs\vmedd_certCatalog.lst</FileLocation> </CommandWriteCertificateStore> </Command> <Command> <CommandWriteServicePack ServicePackVersion="UCF_ROM"> <FileLocation>C:/Users/Build-server/.SLImageCreator/projects\ProductionR0_34\sl_sp\sp_3.22.0.1_2.7.0.0_2.2.0.7.bin</FileLocation> </CommandWriteServicePack> </Command> <Command> <CommandWriteSystemFile> <SystemFileId>CONFIG_TYPE_AP</SystemFileId> <FileLocation>C:/Users/Build-server/.SLImageCreator/projects\ProductionR0_34\sl_fs\sys\ap.cfg.bin</FileLocation> </CommandWriteSystemFile> </Command> <Command> <CommandWriteSystemFile> <SystemFileId>CONFIG_TYPE_DEVICE_NAME</SystemFileId> <FileLocation>C:/Users/Build-server/.SLImageCreator/projects\ProductionR0_34\sl_fs\sys\device.name.bin</FileLocation> </CommandWriteSystemFile> </Command> <Command> <CommandWriteSystemFile> <SystemFileId>CONFIG_TYPE_DHCP_SRV</SystemFileId> <FileLocation>C:/Users/Build-server/.SLImageCreator/projects\ProductionR0_34\sl_fs\sys\dhcpsrv.cfg.bin</FileLocation> </CommandWriteSystemFile> </Command> <Command> <CommandWriteSystemFile> <SystemFileId>CONFIG_TYPE_HTTP_SRV</SystemFileId> <FileLocation>C:/Users/Build-server/.SLImageCreator/projects\ProductionR0_34\sl_fs\sys\httpsrv.cfg.bin</FileLocation> </CommandWriteSystemFile> </Command> <Command> <CommandWriteSystemFile> <SystemFileId>CONFIG_TYPE_IP_CONFIG</SystemFileId> <FileLocation>C:/Users/Build-server/.SLImageCreator/projects\ProductionR0_34\sl_fs\sys\ipcfg.bin</FileLocation> </CommandWriteSystemFile> </Command> <Command> <CommandWriteSystemFile> <SystemFileId>CONFIG_TYPE_MODE</SystemFileId> <FileLocation>C:/Users/Build-server/.SLImageCreator/projects\ProductionR0_34\sl_fs\sys\mode.cfg.bin</FileLocation> </CommandWriteSystemFile> </Command> <Command> <CommandWriteSystemFile> <SystemFileId>CONFIG_TYPE_STA_CONFIG</SystemFileId> <FileLocation>C:/Users/Build-server/.SLImageCreator/projects\ProductionR0_34\sl_fs\sys\sta.cfg.bin</FileLocation> </CommandWriteSystemFile> </Command> <Command> <CommandWriteFile> <FileSystemName>@@.tmp</FileSystemName> <MaxFileSize>255</MaxFileSize> <FileLocation>../files\tmp.tmp</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>vmedd_cert_trusted</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>824</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpiqeuu1z9</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>digicertglobalrootg2.der</FileSystemName> <FileOpenFlagsList/> <MaxFileSize>914</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpupyurl03</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>isrg root x1</FileSystemName> <FileOpenFlagsList/> <MaxFileSize>1391</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpc99e1iaz</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>vm60882.psmanaged</FileSystemName> <FileOpenFlagsList/> <MaxFileSize>984</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpeutehmyf</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>vmedd_ota_cert</FileSystemName> <FileOpenFlagsList/> <MaxFileSize>396</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpgg7vcp8s</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>vmedd_root_ca_cert</FileSystemName> <FileOpenFlagsList/> <MaxFileSize>933</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpjqz53fji</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/config/alarmdispatch.json</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>48</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmphnbn8_5l</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/config/app.cfg</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>542</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmphi8sopp9</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/config/commands.json</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>175</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpcwlmgpq_</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/config/common.cfg</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>417</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpvdc2qfmy</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/config/email.cfg</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>875</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpyaxbkir7</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/config/radarmcu.cfg</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>2031</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmp8n1ntkk1</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/config/roomconfiguration.json</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>226</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmp0a_unir4</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/config/sensorinfo.json</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>118</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmp8k8j6fre</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/config/settingsapp.json</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>720</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmp47y3wbfn</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/config/settingssystem.json</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>196</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpasikdzob</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/sys/hs_vital_signs_tracking_68xx_demo.bin</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>751680</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpnueh4pyc</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile CertificationFileName="vmedd_cert_trusted" SignatureFileName="C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmprwcvxo5o"> <FileSystemName>/sys/mcuflashimg.bin</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> <FileOpenFlag>FILE_OPEN_FLAG_SECURE</FileOpenFlag> <FileOpenFlag>FILE_OPEN_FLAG_PUBLIC_WRITE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>1048576</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmprwk_lhlo</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/www/css/bootstrap.min.css</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>155845</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmp6xh7id0z</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/www/css/main.css</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>32707</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmp5ydbiu4x</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/www/device.html</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>23599</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpw88gy9ae</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/www/easy_config.html</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>27868</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmp7cabfiu_</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/www/index.html</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>23567</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmp2wzq_fvq</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/www/js/bootstrap.bundle.min.js</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>78743</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpuf7vup02</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/www/network.html</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>33473</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpfiuvae80</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/www/support.html</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>21158</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpx_hmzs4u</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/www/wifi.html</FileSystemName> <FileOpenFlagsList> <FileOpenFlag>FILE_OPEN_FLAG_FAILSAFE</FileOpenFlag> </FileOpenFlagsList> <MaxFileSize>51941</MaxFileSize> <FileLocation>C:\Users\Build-server\.SLImageCreator\projects\ProductionR0_34\sl_temp\tmpdg3mp576</FileLocation> </CommandWriteFile> </Command> <Command> <CommandWriteFile> <FileSystemName>/tmp/CrashMiniDump.bin</FileSystemName> <MaxFileSize>24576</MaxFileSize> <FileLocation>../files\CrashMiniDump.bin</FileLocation> </CommandWriteFile> </Command> </CommandsSet> </CommandsSetList> </Root>
so you are programming when the OTP is already flash?
Yes, otp is already flashed
Generally, i use both dslite cli or GUI to create an uniflash image
Using dslite cli, i am doing these steps
${dslite} --mode cc32xx project add_file --name ${uniflash_project_name} --file ${vmedd_root_ca-cert} --fs_path vmedd_root_ca_cert --flags nofailsafe,nopublicwrite --overwrite
3. Add trusted cert file
${dslite} --mode cc32xx project add_file --name ${uniflash_project_name} --file ${vmedd_cert} --fs_path vmedd_cert_trusted --flags nofailsafe,nopublicwrite --overwrite
4. Set trusted catalog
${dslite} --mode cc32xx project set_certstore --name ${uniflash_project_name} --file ${vmedd_catalog} --sign ${vmedd_catalog_signed} --overwrite
5. Add MCU image
${dslite} --mode cc32xx project add_file --name ${uniflash_project_name} --project_path ${uniflash_project_path} --file ${mcu_image} --mcu --flags failsafe,secure,publicwrite --overwrite --cert ${vmedd_cert} --priv ${priv_key}
6. Create Uniflash image
${dslite} --mode cc32xx project create_image --name ${uniflash_project_name} --project_path ${uniflash_project_path}
7. Flash devices using embedded programming
ImageProgramming.exe -p ${port} -i ${ucf_file} -v
Hi,
If I look at the procedure of Uniflash CLI (or GUI) to flash an image, there is a checkbox for using the vendor certificate catalog.
This flag is not part of the xml file so embedded programming fails on signature since it cannot be verified against the OTP public key.
To summarize, when OTP feature is used, Uniflash has to be used for image programming.
I don't have a way to verify it but seems this way.
Can you double check on your side and program via Uniflash CLI and see if programming succeeds?
Regards,
Shlomi
This flag is not part of the xml file so embedded programming fails on signature since it cannot be verified against the OTP public key.
For uniflash, when vendor certificate catalog is checked, programming succeds.
For embedded programming, when vendor certificate catalog is checked, programming fails.
This flag is not part of the xml file so embedded programming fails on signature since it cannot be verified against the OTP public key.
Does that mean i cant use my private catalog ?
In that case what should i do now?
Hi,
The problem is that the OTP support was added in later phase and requires a secondary bootloader to be loaded to RAM and executed.
This is done by Uniflash while embedded programming is using a much thinner secondary bootloader (older one) that does not have these capabilities.
Just changing to the new bootloader would not work since the procedure must also be modified (writing to different locations in RAM for example).
Thus, OTP is only supported via Uniflash.
Shlomi
Thanks a lot for your detailed Response. Can we expect any update of embedded programming tool in the near future?