GithubHelp home page GithubHelp logo

brucejcooper / dali-sw-bt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stawiski/da14531-cmake-template

0.0 0.0 0.0 207 KB

Template to build firmware for DA14531 BLE microcontroller using CMake and GCC for ARM.

License: MIT License

Shell 0.18% C 91.47% Assembly 4.08% CMake 4.27%

dali-sw-bt's Introduction

Introduction

The purpose of this repository is to provide a template to build firmware for DA14531 (Dialog's BLE microcontroller) under CMake with GCC for no code limits. This template integrates SEGGER RTT library for debug printfs through SWD using JLink debug probe (no need for hardware serial).

Author: Mikolaj Stawiski

Requirements

To build the template you'll need:

Additionally if you want to run the firmware on the target you'll need:

  • JLink debug probe
  • JLink RTT Viewer (for displaying and logging printfs from the target)
  • JLink Ozone debugger >= V3.22a
  • Hardware based on DA14531 chip with SWD (e.g. DA14531 Basic USB kit)

Having installed CMake, and downloaded and unzipped GCC for ARM and required Dialog SDK, run build-linux.sh (Ubuntu/WSL/MacOS) or build-windows.bat (Windows) and supply it with paths to GCC and the SDK.


NOTE for Windows

You'll need make to compile the code, for which you might have to install MSYS.


Running on target

Upon successful setup and build you'll get firmware files under ./build directory. The firmware will come in few handy formats: binary, hex and elf.

If you want to debug the firmware using Ozone debugger, open DA14531-debug.jdebug with Ozone. The script will load the firmware into target's RAM and name your target's registers for nice debugging experience.

Integration to VSCode

Below is an example of tasks.json for VSCode assuming you're on Linux, installed CMake, downloaded and unzipped GCC for ARM to ~/gcc-arm-none-eabi-10-2020-q4-major/, and downloaded and unzipped Dialog SDK v.6.0.14.1114 to ~/dialog-sdk/:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build",
            "type": "shell",
            "command": "${workspaceFolder}/build-linux.sh",
            "args": [
                "~/gcc-arm-none-eabi-10-2020-q4-major/",
                "~/dialog-sdk"
            ],
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

dali-sw-bt's People

Contributors

brucejcooper avatar stawiski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.