Coder Social home page Coder Social logo

leoli0605 / hello_numaker-m032btai Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 41.64 MB

Nuvoton NuMaker-M032BTAI Sample Code with Makefile, Docker and CICD workflows

License: MIT License

Makefile 0.08% C 94.45% Rich Text Format 1.21% Assembly 4.22% Batchfile 0.04% HTML 0.01%
m031btai m032btai makefile numake-m032btai numaker nuvoton pyocd docker dockerfile openocd gcc-arm-none-eabi

hello_numaker-m032btai's Introduction

Hello_NuMaker-M032BTAI

TL;DR

This repository demonstrates how to develop projects for the NuMaker-M032BTAI using gcc-arm-none-eabi with a makefile.

We use pyOCD for flashing and debugging because OpenOCD does not fully support the NuMaker-M032BTAI.

The example used is SampleCode/NuMaker-M03xBT/BLE/Demo/Central/TRSP_UART_Central.

Use make help to quickly see available commands.

Requirements

Before proceeding with the commands, ensure you have the following installed:

  • Required
    • make
    • gcc-arm-none-eabi 13.2.Rel1+ or docker
  • Optional
    • To install pyOCD:
      1. Install Python 3.7+ and pip
      2. Use make install to install pyOCD and required setup
    • To build documentation:
      1. Install node.js 18+ and npm
      2. Install pandoc and tinytex
      3. Use make docs-install to install required extensions

Windows

choco install -y make gcc-arm-embedded python3 nodejs-lts pandoc tinytex

Linux / macOS

# Linux
sudo apt update && sudo apt install -y curl git
# macOS
brew install coreutils curl git
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc
echo ". $HOME/.asdf/completions/asdf.bash" >> ~/.bashrc
source ~/.bashrc
asdf plugin add make
asdf plugin add gcc-arm-none-eabi
asdf plugin add python
asdf plugin add nodejs
asdf plugin add pandoc
asdf plugin add tinytex
asdf install make latest
asdf install gcc-arm-none-eabi latest
asdf install python latest
asdf install nodejs 18.18.0
asdf install pandoc latest
asdf install tinytex latest
asdf global make latest
asdf global gcc-arm-none-eabi latest
asdf global python latest
asdf global nodejs 18.18.0
asdf global pandoc latest
asdf global tinytex latest

Quick Start

  • Compile
make
  • Recompile
make clean && make
make rebuild
  • Flash
make flash
  • Recompile and Flash
make upgrade
  • Generate Documentation
make docs

Debugging with pyOCD

To debug the firmware manually, use the following commands:

Starting the GDB Server

Start the GDB server with pyOCD:

pyocd gdbserver -t M032BTAIAAN --elf Source\build\TRSP_UART_Central.elf

Connecting GDB to the Target

In the GDB command line, connect to the target and load the firmware:

(gdb) target remote localhost:3333
(gdb) monitor reset halt
(gdb) load

More Information

hello_numaker-m032btai's People

Contributors

leoli0605 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

turhalomer

hello_numaker-m032btai's Issues

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.