Skip to content

stacksmash-vuln/LexxHard-MainBoard-Firmware

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LexxPluss Main Board Software

CI release

For Docker (Ubuntu)

Install dependencies

$ mkdir -p $HOME/zephyrproject/
$ cd $HOME/zephyrproject/
$ git clone https://github.com/LexxPluss/LexxHard-MainBoard-Firmware

Setup Zephyr

$ export ZEPHYR_BASE=/workdir/LexxHard-MainBoard-Firmware/zephyr
$ cd /workdir/LexxHard-MainBoard-Firmware
$ make setup

Build

Build bootloader (MCUboot)

$ make bootloader

Build firmware

$ make firmware
$ make firmware_initial

Build firmware ( enable interlock )

$ make firmware_interlock

Build firmware ( enable tug )

$ make firmware_tug

For macOS

Install dependencies 

Prepare a development environment referring to https://docs.zephyrproject.org/2.7.0/getting_started/

Install Homebrew

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Utils

$ brew install cmake ninja gperf python3 ccache qemu dtc
$ pip3 install -U west

Setup Zephyr

$ west init -l lexxpluss_apps
$ west update
$ west zephyr-export
$ pip3 install -r zephyr/scripts/requirements.txt

Install Toolchain

Install Toolchain and set environment variables referring to https://docs.zephyrproject.org/2.7.0/getting_started/toolchain_3rd_party_x_compilers.html

export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=/Applications/ARM

Build

Build bootloader (MCUboot)

$ west build -b lexxpluss_mb02 bootloader/mcuboot/boot/zephyr -d build-mcuboot

Build firmware

$ west build -p auto -b lexxpluss_mb02 lexxpluss_apps

Build firmware ( enable interlock )

$ west build -p auto -b lexxpluss_mb02 lexxpluss_apps -- -DENABLE_INTERLOCK=1

Build firmware ( enable tug )

$ west build -p auto -b lexxpluss_mb02 lexxpluss_apps -- -DENABLE_TUG=1

Program of the built firmware

First time program

Program the bootloader and signed firmware after erasing the entire Flash ROM. Output binaries are in following output directories.

mac

  • : out
  • : out

linux

  • : build-mcuboot/zephyr
  • : build/zephyr
$ brew install stlink
$ st-flash --reset --connect-under-reset erase
$ st-flash --reset --connect-under-reset write <bootloader output dir>/zephyr.bin 0x8000000
$ st-flash --reset --connect-under-reset write <firmware output dir>/zephyr.signed.bin 0x8040000

Update

Program the firmware for update to the update area.

$ st-flash --reset --connect-under-reset write <firmware output dir>/zephyr.signed.confirmed.bin 0x8080000

Program of the released firmware

$ st-flash --reset --connect-under-reset erase
$ st-flash --reset --connect-under-reset write LexxHard-MainBoard-Firmware-Initial-v?.?.? 0x8000000

Update via ROS

Use LexxPluss/LexxHard-MainBoard-Updator.

The firmware is automatically updated when the robot is turned on again after executing the following command.

$ rosrun mainboard_updator mainboard_updator LexxHard-MainBoard-Firmware-Update-v?.?.?.bin

License

Copyright (c) 2022, LexxPluss Inc. Released under the BSD License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.5%
  • Makefile 1.7%
  • CMake 0.8%