/*!
    \file    readme.txt
    \brief   description of the EEMUL simple demo

    \version 2026-07-01, V1.0.0, firmware for gd32f3x0
*/

/*
    Copyright (c) 2026, GigaDevice Semiconductor Inc.

    Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this
       list of conditions and the following disclaimer.
    2. Redistributions in binary form must reproduce the above copyright notice,
       this list of conditions and the following disclaimer in the documentation
       and/or other materials provided with the distribution.
    3. Neither the name of the copyright holder nor the names of its contributors
       may be used to endorse or promote products derived from this software without
       specific prior written permission.

    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.
*/

  This example is based on the GD32F350R-EVAL board and shows the everyday use case
for the EEMUL (Flash-backed EEPROM emulation) middleware: a small parameter store
(boot counter, mode, threshold) that survives every power cycle. SysTick is
configured and the demo prints over EVAL_COM (115200-8-N-1). Connect the board's
USB-to-UART / COM port to a terminal to watch the demo run.

  On every reset the demo:
    1. initialises EEMUL,
    2. reads the current parameter values (or writes factory defaults on first boot),
    3. prints them on EVAL_COM,
    4. bumps the boot counter and persists it via eemul_write_param().

  No error injection or Flash tampering is performed; that scenario coverage lives
in the companion EEMUL_Functional_Demo. The expected console output across resets
is a steadily-rising boot counter and a sequence number that advances by one per
write, demonstrating wear-leveled rotation and atomic commit without any extra
test scaffolding.

  EEMUL configuration used by this demo (see eemul_config.h):
    - block header   : compact (16 bytes, no CRC)
    - program align  : 4 bytes (word)
    - flash page     : 1 KB
    - block mode     : sub-blocks
    - bad-block policy: retry
    - region         : two Flash pages reserved at the top of the main array
