# QT Creator setup

## Add new bare metal device

1. We can use OpenOCD for flashing and debugging, but before that we must add new device type. So in Qt Creator open settings and go to *Devices* - *Bare Metal* and add new OpenOCD device
    - Startup mode: TCP/IP Mode
    - Configuration file: board/BlueNRG-1.cfg (copy this from repository to OpenOCD scripts path)
    - Enter this init commands

        ```
        set remote hardware-breakpoint-limit 2
        set remote hardware-watchpoint-limit 1
        monitor reset halt
        load
        monitor reset halt
        ```
        
2. Add new device
3. Setup new kit using new device

After these steps you can start debugging.
