.. _setup_xm112:

Setting up your XM112
=====================

.. include:: ../../getting_started/evk_setup/find_serial_port.rst

.. include:: ../../getting_started/evk_setup/windows_com_port_drivers.rst
- XM112: `FTDI <https://ftdichip.com/drivers/vcp-drivers/>`_

Flashing
--------

For detailed flashing instructions visit our `developer page <https://developer.acconeer.com/>`_.

We recommend flashing using BOSSA (`website <http://www.shumatech.com/web/products/bossa>`_, `GitHub <https://github.com/shumatech/BOSSA>`_). **BOSSA 1.9 or newer is supported**.

To get into the bootloader:

- Hold down the ERASE button
- Push the NRST button
- Release the NRST button
- Let go of the ERASE button

Now you should be able to flash the Module software (``acc_module_server.bin``). After flashing, press the NRST button to reboot into the flashed software.

BOSSA on Linux
^^^^^^^^^^^^^^

If you're on Linux you likely will need to compile BOSSA on your own. Here's how to do it on Ubuntu 20.04.

Get everything you need to build::

   sudo apt update
   sudo apt install -y make build-essential

Clone the BOSSA repository to a suitable location (below we use the home directory)::

   cd ~
   git clone https://github.com/shumatech/BOSSA.git

Go into to the repository::

   cd BOSSA

Build ``bossac`` (the CLI tool)::

   make -j8 bossac

To flash::

   sudo ./bin/bossac -e -w -v -p /dev/ttyUSB0 -b /path/to/acc_module_server.bin

Note:
If you want the full BOSSA GUI, you will also need to install ``libreadline-dev`` and ``libwxgtk3.0-dev`` before compiling with ``make``.
