Hi Tomas, 

Thank you very much :-) 
Please let me know when you've finished the patch. I'll wait for 
your message and build OpenOCD again. 

You're awesome! 

Kind greetings, 
Kristof Mulier 


Van: "Tomas Vanek" <[email protected]> 
Aan: "kristof mulier" <[email protected]> 
Cc: "openocd-devel" <[email protected]> 
Verzonden: Maandag 16 maart 2020 14:35:53 
Onderwerp: Re: [OpenOCD-devel] Cannot flash to nRF52833 

Kristof, 

I confim there is a problem in mass_erase of nRF52833 and 840 

Paradoxically the mass erase is completed just fine 
(you may check using 'flash erase_check 0') 
and the bogus error message is generated afterwards because protection 
cannot be read. I'll prepare a patch. 

[ http://openocd.zylin.com/#/c/5348/ | http://openocd.zylin.com/#/c/5348/ ] 
addressed the sector by sector erase 
only and I missed the check after mass erase. I recommend you to standard 
flash programming by 'program' command 
[ http://openocd.org/doc/html/Flash-Programming.html#Flash-Programming | 
http://openocd.org/doc/html/Flash-Programming.html#Flash-Programming ] 
or 
'reset init' 
'flash write_image erase ...' 
for combined erase/programming of device. 

Tom 

On 15/03/2020 19:06, [ mailto:[email protected] | 
[email protected] ] wrote: 



Hi Alan,
Thank you very much for your reply.
Right now, I'm using an OpenOCD version that I've built today.
But I still got this problem:

    (gdb) monitor nrf5 mass_erase
    Flash protection of this nRF device is not supported
    Failed to check chip's write protection

Did the patch [ http://openocd.zylin.com/#/c/5348/ | 
http://openocd.zylin.com/#/c/5348/ ] make it to the
master branch? Is there a way to test if the patch is actually
in my build?

Once again a big thank you to both of
you (@Alan and @Tomas)

Kind greetings,
Kristof Mulier 

BQ_BEGIN

On 3/15/20, [ mailto:[email protected] | [email protected] ] wrote:
Hi Kristof,
I think the nRF52833 has something different from nRF52832 related to
flash protection.

I think you should to test Tomas' suggestion.
Please note that his patch was include on Dec 12 2019 (you are using
an older version) : [ http://openocd.zylin.com/#/c/5348/ | 
http://openocd.zylin.com/#/c/5348/ ] BR,
Alan

-----------------------------------------------------------

On 3/15/20, [ mailto:[email protected] | [email protected] ] 
wrote:
Hi Alan,
Thank you for your quick response.
I've tried the command nrf5 mass_erase:

    (gdb) monitor nrf5 mass_erase
    Flash protection of this nRF device is not supported
    Failed to check chip's write protection

But without success.
What am I doing wrong here? 

BQ_BEGIN

-----------------------------------------------------------

On 3/15/20, [ mailto:[email protected] | [email protected] ] wrote:

Hi Kristof,
you are using the command to nrf51, but your nrf52.
As you could see in the second command I sent you, you should use:
nrf5 mass_erase

BR,
Alan

-----------------------------------------------------------

On 3/15/20, [ mailto:[email protected] | [email protected] ] [ 
mailto:[email protected] | <[email protected]> ] wrote:
Dear Mr. Alan Carvalho de Assis
and
Mr. Tomas Vanek,

Thank you very much for your quick reply. I've tried the
command to mass erase the chip. From GDB:

(gdb) monitor nrf51 mass_erase
Flash protection of this nRF device is not supported
Failed to check chip's write protection

Unfortunately, this doesn't work. OpenOCD seems to be
unable to handle the chip's write protection. I'm using
the following version:

Open On-Chip Debugger 0.10.0+dev-00973-g80f1a92bd
(2019-12-02-17:58)

As you can see, I built this OpenOCD on December 2nd 2019
for Windows 10.
I've built it using the xPack method from Mr. Liviu Ionescu
(see [ https://xpack.github.io/ | https://xpack.github.io/ ] and [ 
https://embeetle.com/#embedded-dev/software/dev-tools/flash/openocd_build | 
https://embeetle.com/#embedded-dev/software/dev-tools/flash/openocd_build ] )


I've just built OpenOCD again today. Now I've got the following
version:

Open On-Chip Debugger 0.10.0+dev-01133-ge03de33c
(2020-03-15-08:55)

How can I be sure that merge 5348 (see [ http://openocd.zylin.com/#/c/5348/ | 
http://openocd.zylin.com/#/c/5348/ ] )
is included in this build?
Anyhow, it doesn't look good because I still get the same problem
when trying a mass erase:

(gdb) monitor nrf51 mass_erase
Flash protection of this nRF device is not supported
Failed to check chip's write protection

Many thanks for your help ^_^
Kind regards,
Kristof Mulier

-----------------------------------------------------------

On 3/14/20 at 23:35, [ mailto:[email protected] | 
[email protected] ] wrote: 

BQ_BEGIN

The problem was solved by [ http://openocd.zylin.com/5348 | 
http://openocd.zylin.com/5348 ] Please use a newer OpenOCD build.
Tomas 



-----------------------------------------------------------

On 3/14/20 at 23:40, [ mailto:[email protected] | [email protected] ] wrote: 

BQ_BEGIN

Hi Kristof,
I just you missed the mass erase command to fix it, I faced same issue
with nRF51 some years ago: [ 
https://acassis.wordpress.com/2015/10/21/nrf51822-and-openocd-cannot-erase-protected-sector-at-0x0/
 | 
https://acassis.wordpress.com/2015/10/21/nrf51822-and-openocd-cannot-erase-protected-sector-at-0x0/
 ] I think nRF52833 is just same nRF52833 but for industrial grade. I
also used OpenOCD with nRF52: [ 
https://acassis.wordpress.com/2018/04/03/how-to-install-nuttx-on-nordic-nrf52832/
 | 
https://acassis.wordpress.com/2018/04/03/how-to-install-nuttx-on-nordic-nrf52832/
 ] BR,
Alan 

BQ_END

-----------------------------------------------------------

On 3/14/20 at 22:57, [ mailto:[email protected] | 
[email protected] ] wrote: 

BQ_BEGIN

Hi everyone,
I'm one of the cofounders of Embeetle IDE - a new free microcontroller
IDE.
We're using OpenOCD to flash the microcontrollers. So first I'd like to
express my gratitude to all of you for this free software.

Currently, I'm trying to support a set of microcontrollers from Nordic
Semiconductor . I start with the nRF52833 microcontroller (on the
PC10100

development board). Unfortunately, OpenOCD has a problem with the flash
protection of this device. Everything is explained in my post on the
Nordic
DevZone: [ 
https://devzone.nordicsemi.com/f/nordic-q-a/59106/i-m-trying-to-support-nrf52833-in-embeetle-ide-but-flashing-through-openocd-gdb-doesn-t-work
 | 
https://devzone.nordicsemi.com/f/nordic-q-a/59106/i-m-trying-to-support-nrf52833-in-embeetle-ide-but-flashing-through-openocd-gdb-doesn-t-work
 ] Your help is greatly appreciated.
Kind regards,
Kristof Mulier 

BQ_END


BQ_END


BQ_END

BQ_END




_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to