Re: [OpenOCD-devel] OpenOCD dev01138 cannot flash to nRF52 due to protected sectors
Hi Tomas, My apologies. I never used gerrit before, I'll look into it right after writing this email. The problem is fixed. The OpenOCD launcher accidentally pointed again to an older version. Such a stupid mistake. My sincere apologies. With dev01138, I get the following output: (gdb) monitor nrf5 mass_erase Flash protection of this nRF device is not supported Failed to check chip's write protection (gdb) monitor flash erase_check 0 successfully checked erase state Bank is erased (gdb) monitor program "C:/Users/Kristof/nordic_test/build/myApp.elf" target halted due to debug-request, current mode: Thread xPSR: 0x0100 pc: 0xfffe msp: 0xfffc ** Programming Started ** Adding extra erase range, 0x387c .. 0x3fff ** Programming Finished ** As you can see - it works just fine. There is only that misleading output after the 'mass_erase' command. But that's not a big deal. You're right about the GDB 'load' command. It works on most boards, but not all. I've just tried it now - it seems to work on the Nordic boards :-) Kind greetings, Kristof Mulier Van: "Tomas Vanek" Aan: "kristof mulier" , "openocd-devel" Verzonden: Zaterdag 21 maart 2020 13:49:58 Onderwerp: Re: OpenOCD dev01138 cannot flash to nRF52 due to protected sectors Hi Kristof, I would highly appreciate if you register to our gerrit at [ http://openocd.zylin.com/ | http://openocd.zylin.com ] and start using it instead of spamming the openocd-dev mailing list. Some time ago you wrote: Please let me know when you've finished the patch. If you were in gerrit, I would add you as a reviewer of [ http://openocd.zylin.com/5522 | http://openocd.zylin.com/5522 ] As I didn't find your mail in the gerrit users list I relied on you notice the gerrit message about new patch. Unfortunately it seems you didn't. Moreover the error message looks like you are still using an old openocd version (compiled from git master before December 12th, when [ http://openocd.zylin.com/5348 | http://openocd.zylin.com/5348 ] was merged) instead that one you've recently compiled. BTW: If you use gdb, why don't you use gdb 'load' command? It's quite simple, as gdb 'load' re-reads image (if changed) then does both flash erase and programming. I personally prefer using two gdb commands 'make' and 'load' over using any super-sophisticated IDE ;-) Tom On 21/03/2020 11:56, [ mailto:kristof.mul...@telenet.be | kristof.mul...@telenet.be ] wrote: BQ_BEGIN Hi, OpenOCD fails to flash my nRF52 microcontroller. Below is some more explanations. The board === I've got an nRF52 microcontroller from Nordic Semiconductor. More in particular the nRF52833 mcu on the PCA10100 board. See: [ https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52833-DK | https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52833-DK ] The OpenOCD version === This morning, I built OpenOCD with the xPacks method. It builds the most recent version of the master repo, which is dev01138 at the moment of writing. Flashing == I succeeded to flash about two or three times this morning. Unfortunately, now I constantly get an error related to "protected sectors" that cannot be erased: (gdb) monitor nrf5 mass_erase Flash protection of this nRF device is not supported Failed to check chip's write protection (gdb) monitor flash erase_check 0 successfully checked erase state Bank is erased (gdb) monitor program "C:/Users/Kristof/nordic_test/build/myApp.elf" target halted due to debug-request, current mode: Thread xPSR: 0x0100 pc: 0xfffe msp: 0xfffc ** Programming Started ** Adding extra erase range, 0x387c .. 0x3fff Cannot erase protected sector at 0x0 failed erasing sectors 0 to 3 embedded:startup.tcl:460: Error: ** Programming Failed ** in procedure 'program' in procedure 'program_error' called at file "embedded:startup.tcl", line 525 at file "embedded:startup.tcl", line 460 Your help is greatly appreciated. Notes I'm doing all this to support the nRF52 series in the free Embeetle IDE. I hope there is a solution to the problem that only involves OpenOCD - such that we don't need to add proprietary softwares (like JLink, ...) to Embeetle IDE. Kind regards, Kristof Mulier BQ_END ___ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel
Re: [OpenOCD-devel] OpenOCD dev01138 cannot flash to nRF52 due to protected sectors
Hi Kristof, I would highly appreciate if you register to our gerrit at http://openocd.zylin.com and start using it instead of spamming the openocd-dev mailing list. Some time ago you wrote: Please let me know when you've finished the patch. If you were in gerrit, I would add you as a reviewer of http://openocd.zylin.com/5522 As I didn't find your mail in the gerrit users list I relied on you notice the gerrit message about new patch. Unfortunately it seems you didn't. Moreover the error message looks like you are still using an old openocd version (compiled from git master before December 12th, when http://openocd.zylin.com/5348 was merged) instead that one you've recently compiled. BTW: If you use gdb, why don't you use gdb 'load' command? It's quite simple, as gdb 'load' re-reads image (if changed) then does both flash erase and programming. I personally prefer using two gdb commands 'make' and 'load' over using any super-sophisticated IDE ;-) Tom On 21/03/2020 11:56, kristof.mul...@telenet.be wrote: Hi, OpenOCD fails to flash my nRF52 microcontroller. Below is some more explanations. *The board* *===* I've got an *nRF52* microcontroller from Nordic Semiconductor. More in particular the *nRF52833* mcu on the *PCA10100* board. See: https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52833-DK *The OpenOCD version* *===* This morning, I built OpenOCD with the xPacks method. It builds the most recent version of the master repo, which is dev01138 at the moment of writing. *Flashing* *==* I succeeded to flash about two or three times this morning. Unfortunately, now I constantly get an error related to "protected sectors" that cannot be erased: (gdb) monitor nrf5 mass_erase Flash protection of this nRF device is not supported Failed to check chip's write protection (gdb) monitor flash erase_check 0 successfully checked erase state Bank is erased (gdb) monitor program "C:/Users/Kristof/nordic_test/build/myApp.elf" target halted due to debug-request, current mode: Thread xPSR: 0x0100 pc: 0xfffe msp: 0xfffc ** Programming Started ** Adding extra erase range, 0x387c .. 0x3fff Cannot erase protected sector at 0x0 failed erasing sectors 0 to 3 embedded:startup.tcl:460: Error: ** Programming Failed ** in procedure 'program' in procedure 'program_error' called at file "embedded:startup.tcl", line 525 at file "embedded:startup.tcl", line 460 Your help is greatly appreciated. *Notes* ** I'm doing all this to support the*nRF52* series in the free Embeetle IDE. I hope there is a solution to the problem that only involves OpenOCD - such that we don't need to add proprietary softwares (like JLink, ...) to Embeetle IDE. Kind regards, Kristof Mulier ___ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel
Re: [OpenOCD-devel] OpenOCD dev01138 cannot flash to nRF52 due to protected sectors
Hi, OpenOCD fails to flash my nRF52 microcontroller. Below is some more explanations. The board === I've got an nRF52 microcontroller from Nordic Semiconductor. More in particular the nRF52833 mcu on the PCA10100 board. See: [ https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52833-DK | https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52833-DK ] The OpenOCD version === This morning, I built OpenOCD with the xPacks method. It builds the most recent version of the master repo, which is dev01138 at the moment of writing. Flashing == I succeeded to flash about two or three times this morning. Unfortunately, now I constantly get an error related to "protected sectors" that cannot be erased: (gdb) monitor nrf5 mass_erase Flash protection of this nRF device is not supported Failed to check chip's write protection (gdb) monitor flash erase_check 0 successfully checked erase state Bank is erased (gdb) monitor program "C:/Users/Kristof/nordic_test/build/myApp.elf" target halted due to debug-request, current mode: Thread xPSR: 0x0100 pc: 0xfffe msp: 0xfffc ** Programming Started ** Adding extra erase range, 0x387c .. 0x3fff Cannot erase protected sector at 0x0 failed erasing sectors 0 to 3 embedded:startup.tcl:460: Error: ** Programming Failed ** in procedure 'program' in procedure 'program_error' called at file "embedded:startup.tcl", line 525 at file "embedded:startup.tcl", line 460 Your help is greatly appreciated. Notes I'm doing all this to support the nRF52 series in the free Embeetle IDE. I hope there is a solution to the problem that only involves OpenOCD - such that we don't need to add proprietary softwares (like JLink, ...) to Embeetle IDE. Kind regards, Kristof Mulier ___ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel