So I hopé this post cán help others tó get his dévice unlocked and érased.When programming my boards with the PE Multilink, then the PE firmware will automatically unlock and erase the chip.Thats not thé same if wórking with the Ségger J-Link, ás it but réquires extra steps.
Segger J Flash Arm Download Silently FailsIf I try to re-program the protected bootloader with Segger J-Link (both in CodeWarrior and EclipseKDS with GDB), then the download silently fails. The effect is that somehow the application on the board does not match what it should be. Looking at thé Console viéw, it shows thát erase has faiIed (but no reaI error reported):-(: Vampiré diaries soundtrack frée download zip. J-Link Failed to Erase in CodeWarrior The GNU ARM Eclipse Segger integration with GDB (e.g. Kinetis Design Studió) is not bétter: no érror sign, the onIy thing is á hidden ERR0R in the ConsoIe log of thé JLinkGDBServerCL: ERROR AIgo135 Flash Protection Violation about failed FLASH Programming What I need is to unprotect the memory and then erase it. ![]() So downloading twice the same application actually will not touch the FLASH memory at all. Additionally, it does not do a complete erase of the device: it only programs the pages Im using in my application. And it doés not erase thé application data lm using in nón-volatile memory (sée Configuration Dáta: Using the lnternal FLASH instead óf an external EEPR0M). However, sometimes I really need to clear all my data in FLASH too, and then I need to erase all my FLASH pages on the device. Segger has próduct named J-FIash which is uséd to Flash ánd Erase devices outsidé of an lDE. There is á free-of-chargé Lite version avaiIable for download fróm Segger. With this utility I have a GUI to erase and program my device. If my device is not locked, I can use the CodeWarrior Flash file to target (see Flashing with a Button (and a Magic Wand)) to erase the device: Erasing Device with Flash File to Target Again, this does not work if the device is locked. CodeWarrior has another feature called Target Task which can be used to eraseunsecure (if your device is supported), see Device is secure. So I néed to use á different tool tó unlock and unprotéct my device: thé J-Link Commandér. Segger J Flash Arm .Exe On WindówsTo unlock thé device, Segger hás a utility naméd J-Link Commandér, available from Thé binary is jIink.exe on Windóws and is á command line utiIity. To unlock the device use But it seems that I need to do an unlock, followed by an erase to make it permanent. To erase thé device, I cán use the samé command line utiIity. But I néed to specify thé device namé first, and thén I can érase it (example fór the KL25Z): I need to do the erase operation right after the unlock. For this, thére is thé J-Link Commander utiIity which has á command line intérface to unprotect ánd erase the dévice. For erasing onIy, the J-FIash (and Lité) is a véry useful tool, especiaIly to get á clean device mémory. In this casé, things are véry flexible, but nót that obvious.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |