This example uses the mira_flash API to write dummy data into flash memory. The example support the nrf52840ble-os and nrf52832ble-os targets. The example assumes that the default link scripts are used.
The example writes a configurable amount of dummy data into the tail-end of the FLASH area, right up until the start of the SWAP area.
Do note that in practice, a separate flash area should be specified to not risk overwriting the application. But in this small example application we know that there is space left in the FLASH area.
To build the example, in this directory run:
make TARGET=<target>
The example assumes that libmira is placed in vendor/, to specify another path run:
make LIBDIR=<path-to-libmira> TARGET=<target>
To flash after building, add flashall
or flash.<programmer serial number>
to the make command:
make TARGET=<target> flashall
or
make LIBDIR=<path-to-libmira> TARGET=<target> flashall
Copyright (c) 2023, LumenRadio AB All rights reserved.
The software is provided as an example. The software is delivered without guarantees.
No guarantees is taken for protocol stability of the software, and future updates may change API.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.