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.
HI, I need information for recording the MSPM0L via the command line.
I also need information for cleaning the memory (command line) in cases where the MSPM0L needs to be re-recorded since my recording has "Debug Security Profiles" at level 1, re-recording without prior clearning is not permitted.
Hi TIAGO,
UniFlash supports command line interface.
And you can get the guide from the below link:
https://software-dl.ti.com/ccs/esd/uniflash/docs/v8_1/uniflash_quick_start_guide.html
As for the debug security profiles at level 1, do you mean this one:
it requires you do factory reset by command line to clear the MAIN and NONMAIN memory and then loading the new firmware. If so, I can give you some guidance then.
B.R.
Sal
Hi Sal Ye
Thanks for the info.
Kindly send me the available guidance for factory reset via command line to clear MAIN and NON-MAIN memory and then load new firmware.
Hi TIAGO,
I need prepare for some instructions, and give you the feedback in this threads by end of this week.
B.R.
Sal
Hi TIAGO,
Please refer to below instructions to do factory reset via CLI interface in UniFlash: (refers to "Modify .GEL file for auto factory reset" part)
1.UniFlash CLI for XDS110 probe factory reset
B.R.
Sal
hi Sal Ye
Reading his material he was unsuccessful, he was confused. Can you explain it another way? I don't know if I was missing some information...
Hi TIAGO,
So, which part are you stuck?
Please share you screenshot of yout file and then I can give some suggestions.
1.Successfully generate the CLI files by latest UniFLash. - Done?
2. Replace the gel file for the CLI files. - Done?
3. Edit the dslite-Cortex_M0P.bat for loading the firmware to device. - Done?
B.R.
Sal
1.Successfully generate the CLI files by latest UniFLash. - Done?
yes
2. Replace the gel file for the CLI files. - Done?
yes, but my "gel" folder is not inside "user_files>ccs_base_>emulation" like the example.. are you referring to the "gel" folder generated with the CLI package or in the root folder in uniflash?
3. Edit the dslite-Cortex_M0P.bat for loading the firmware to device. - Done?
I didn't understand this step... the CLI package generated by UNILFASH has already configured the firmware for recording.
This is part of the .bat:
set GENERATED_COMMAND=-c user_files/configs/MSPM0L1105.ccxml -l user_files/settings/generated.ufsettings -s VerifyAfterProgramLoad="No verification" -e -f -v "user_files/images/myFirmware.out"
set ADDITIONALS=
Hi Sal Ye
I'm trying to write a firmware file with "CONFIGURATION NVM SECURITY LEVEL 1 - CUSTOM RESTRICTIONS", I want to prevent other people from being able to read the memory... but I don't know if I'm on the right path. This firmware when I try to write using mspm0l1306_loadFirmware_autoFactoryReset.bat gives the following error:
error: CORTEX_M0P: File Loader: Memory write failed: Flash Programmer: Error, Attempting NONMAIN write without erasing!
When recording a file without "CONFIGURATION NVM" the recording is successful.
I tried to record the latter using the option: mspm0l1306_loadFirmware_autoPassword.bat, but the password does not prevent someone else from reading the memory.
Hi TIAGO,
error: CORTEX_M0P: File Loader: Memory write failed: Flash Programmer: Error, Attempting NONMAIN write without erasing!
You should modify the FLASH loading behavior of the CLI to let it erase NONMAIN and then load new firmware with NONMAIN data.
I tried to record the latter using the option: mspm0l1306_loadFirmware_autoPassword.bat, but the password does not prevent someone else from reading the memory.
If you enable the level 1, and it will prevent user to read without correct password. However, factory reset will erase the MAIN and NOMAIN data, which means your setting of level 1 is disable then.
B.R.
Sal
I tried to record the latter using the option: mspm0l1306_loadFirmware_autoPassword.bat, but the password does not prevent someone else from reading the memory.
mspm0l1306_loadFirmware_autoPassword.bat is used to unlock device with the SWD password, not for the setting the password of device. Please lock the device firstly (suggest you use CCS to lock the device with the password, it is easier to do) and then use this one to unlock device to read he firmware / load new firmware.
B.R.
Sal
Hi Sal Ye
I go through my needs and see if we are on the same path.
I'm not interested in having an unlock password if it's not mandatory
I need to write (via CLI) a firmware on a new chip.
I need to have a tool (CLI) to write firmware again on the same computer.
... Remembering that the firmware is configured in SYSCFG -> CONFIGURATION NVM for SECURITY LEVEL 1. I need my memory to be protected against reading.
Hi TIAGO,
Okay, i got your points.
error: CORTEX_M0P: File Loader: Memory write failed: Flash Programmer: Error, Attempting NONMAIN write without erasing!
Remembering that the firmware is configured in SYSCFG -> CONFIGURATION NVM for SECURITY LEVEL 1.
You should change the flash loader operation method here, user can not write NONMAIN to device with firstly erase it, or it will casue unexpected result. So, the CLI prevent you download the firmware.
Then it should be work with calling "mspm0l1306_loadFirmware.bat".
I have one more suggestion for you. In the real production scenario, below order is what I suggest:
1. load MAIN flash firmware to device firstly (only load MAIN and do not change the NVM). the flash loader could be set as "erased MAIN memory only"
2. load NONMAIN flash firmware to device secondly, at this moment, the flash loader should be set as "erased MAIN and NONAIN necessary sectors only"
3. Then firmware updated finished, and the device is protected now.
This order is more reliable for operation with NVM.
B.R.
Sal
Hi Sal Ye
1 - In this case, do I need to generate two firmware? One to record in MAIN and another to record in NONAIN?
2 - How to specify the recording location (MAIN AND NOMAIN) in "mspm0l1306_loadFirmware.bat"?
1 - In this case, do I need to generate two firmware? One to record in MAIN and another to record in NONAIN?
They both can work, and currently you can just combine them and load to device together to verify the scenario.
When it comes to mass production,I suggest you generate two firmware.
2 - How to specify the recording location (MAIN AND NOMAIN) in "mspm0l1306_loadFirmware.bat"?
Use two .bat, one is for MAIN, and the other is for NONMAIN.
B.R.
Sal
Okay, I'll add a detail about our production process.
1 - Firstly, the plate is recorded by our recording system. Protected firmware is written.
2 - In a second moment, this board can be subject to a rewrite of the same firmware, in the same way, by the same system.
We will not go into details of why this is repeated. Sometimes re-recording is necessary!
The recording system (CLI) (including firmware) must be the same to record and re-record as many times as necessary. If a factory reset is necessary, this must be done every time. Our recording system does not support different ways of recording for a microcontroller.
If a factory reset is necessary, this must be done every time. Our recording system does not support different ways of recording for a microcontroller.
Two methods for this:
1. Generate factory reset everytime, and then load MAIN and NONMAIN to device.
2. Generate swd password everytime (even if the password is not set), and then load new MIAN / NONMAIN to device.
B.R.
Sal
Hi,
Your description confused me little.
If you failed to do factory reset.
This one will do factory reset firstly and then load the firmware to device. Make sure you have connected NRST to the debugger.
If you do not want to do factort reset.
This one will generate a SWD password to device firstly, and then load the firmware to device. Make sure you have connected NRST to the debugger.
This thread have updated an guidance, maybe you can check it again.
B.R.
Sal
Hi Sal Ye
I tried a few times to create a package using UNIFLASH, I configured it to include the "Factory reset auto" option... the CLI works... but if I remove the power from the MSPM0L, reconnect and try to record again, I get the following error: Error connecting to the target: (Error -6305) PRSC module failed to write to a router register. (Emulation package 12.7.0.00059)
An interesting case that I noticed: I can't apply "Factory reset auto" through the UNIFLASH interface:
displays the following error:
Texas Instruments XDS110 USB Debug Probe/CORTEX_M0P
Error connecting to the target: (Error -6305) PRSC module failed to write to a router register. (Emulation package 12.7.0.00059)
I can only do the "Factory reset auto" through CCS, using the following method:
This one will do factory reset firstly and then load the firmware to device. Make sure you have connected NRST to the debugger.
Does this one work when you find the issue?
B.R.
Sal
using mspm0l1306_loadFirmware_autoFactoryReset.bat:
I edited the .bat to use my SX1500_Firmware.out file
GENERATED_COMMAND=-c user_files/configs/MSPM0L1306_autoFactoryReset.ccxml -l user_files/settings/generated.ufsettings -s VerifyAfterProgramLoad="No verification" -e -f -v "user_files/images/SX1500_FIRMWARE.out"
Have you check the guidance?
If not, please check the guidance.
You should change the flash loader operation method here, user can not write NONMAIN to device with firstly erase it, or it will casue unexpected result. So, the CLI prevent you download the firmware.
Then it should be work with calling "mspm0l1306_loadFirmware.bat".
You should modify the flash programmer operation. I think the ERROR clearly told you why you failed.
B.R.
Sal
Sal, I agree with you.
But it doesn't work here... I'm using this configuration...
...
but it doesn't work!
I've already told you that I can't do a factory reset using UNIFLASH...
here's another error when I try to rewrite or factory reset:
Hi TIAGO,
I've already told you that I can't do a factory reset using UNIFLASH...
The suggestion is for CLI package. Not for UniFlash.
Sal, did you test these and pass them in practice according to my application?
I do not get your application, but I used to test some modification with NONMAIN and it can work.
I think you have already done the factory reset by CLI,
To avoid this,
1. Change the flash loader setting in the CLI package.
This one will do factory reset firstly and then load the firmware to device. Make sure you have connected NRST to the debugger.
If you check this bat file, it will call a .ufsettings file, the default is nothing (Only erase MAIN memory)
You can generate the file which will "Erase MAIN and NONMAIN necessary sectors".
And then load the firmware which contains MAIN and NOMAIN data. [MUST load new NONMAIN data if you erase NONMAIN].
This will fix your "Load failed".
-> Have you done this?
2. Running the bat file to do factory reset and load the firmware.
B.R.
Sal
Do I need to define the "Sector Erase Start Address" and "Sector Erase End Address"?
Nope, it will automatically erase necessary sectors [according to your firmware memory].
Hi Sal,
I found the error in the .ufsettings file
Thank you for all your help and patience.