The structure is as shown below
First zephyr SDKs are needed.
sudo apt update
sudo apt upgrade
sudo apt install --no-install-recommends git cmake ninja-build gperf \
ccache dfu-util device-tree-compiler wget \
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1可以提前更换PIP源:
pip install --upgrade pip --index-url https://mirrors.sustech.edu.cn/pypi/web/simple
pip config set global.index-url https://mirrors.sustech.edu.cn/pypi/web/simplepip install westThen initialize the workspace folder (my-workspace) where
the example-application and all Zephyr modules will be cloned. Run the following
command:
# initialize my-workspace for the example-application (main branch)
west init -m https://www.github.com/ttwards/mambo --mr master my-workspace
# update Zephyr modules
cd my-workspace
west updateThen export a Zephyr CMake package. This allows CMake to automatically load boilerplate code required for building Zephyr applications.
west zephyr-export
pip install -r ./zephyr/scripts/requirements.txt
west sdk installTo build the application, run the following command:
cd mambo
west build -b robomaster_board_c samples\motor\dji_m3508_demo$BOARD is the target board. Here you can use robomaster_board_c
A sample debug configuration is also provided. To apply it, run the following command:
west build -b $BOARD samples\motor\dji_m3508_demoOnce you have built the application, run the following command to flash it:
west flash默认为cmsis-dap, 如果使用stlink请加上--runner stlink, Jlink则为--runner jlink
If everything goes well, the LED on the board should be blinking
Then you can have your motors running!
另外,VSC_sample_configs下有.vscode的示例配置文件
本项目使用 pre-commit 和 GitHub Actions CI 来确保代码质量。
快速设置:
./setup-precommit.sh
make check详细说明请参考 CONTRIBUTING.md
详细的文档请参考Documents文件夹
好无聊逗逗梅总吧
嘬嘬嘬𐃆 ˒˒ ͏
͏
͏ ╱|、
(˚ˎ 。7
|、˜ 〵
じしˍ,_)ノ
