This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

"Failed to write memory" when using Segger Embedded Studio and nRF Connect SDK

I am using NCS v1.7.0 and have found that SES is not being configured properly for debugging/flashing.  When I open the project in SES, building works fine, but when I try to debug or flash, I get the error "Failed to write memory".  I am using an external JLINK programmer.

After investigating the SES project options, I found that Debugger-> Target Device is set to $(Target:).  The problem is resolved by updating this field to match my target processor (nrf52805_xxaa in this case).  This works fine to resolve the flashing issue, but every time I run cmake or change the project options, the Target Device gets reset back to $(Target:) and I need to re-configure the project.

Is there a way to configure my project such that this field is properly passed to SES from the CmakeLists.txt or prj.conf?

Related