title: Using qemu-system-gnuarmeclipse command-line for nrf52840
body: <p>I want to run unit-tests for a firmware code written for nrf52840 using QEMU. I came across the GNU MCU Eclipse project which has forked the main QEMU project to provide better support for Cortex-M SoCs by allowing the creation of cortex-m devices through data definitions provided in CMSIS SVD files (as noted <a href="https://github.com/gnu-mcu-eclipse/qemu/tree/gnuarmeclipse-dev/gnu-mcu-eclipse/devices" rel="nofollow noreferrer">here</a>). Even though the project primarily supports the STM32 based boards and MCUs, their eclipse plugin does support adding new device packs for development and debugging. But I am not able to figure out how to use their command-line tool <strong><em>qemu-system-gnuarmeclipse</em></strong> to run an ELF file created for nrf52840. I have the following questions:</p>
  
  <ol>
  <li><p>How does eclipse plugin allow debugging for nrf52840 using custom SVD file even though their command-line tool doesn't have any option to provide a custom SVD file?</p></li>
  <li><p>How can I add support for nrf52840? Can I reuse board and MCU definitions for STM32 and just provide a JSON variant for SVD file <a href="https://github.com/gnu-mcu-eclipse/qemu/tree/gnuarmeclipse-dev/gnu-mcu-eclipse/devices" rel="nofollow noreferrer">here</a>?</p></li>
  </ol>