TR-mbed 1.0
Loading...
Searching...
No Matches
TR-mbed

__________ __ __ ___ ____ ___ ______
/_ __/ __ \ ____ ___ / /_ ___ ____/ / |__ \ / __ \__ \ / ____/
/ / / /_/ /_____/ __ `__ \/ __ \/ _ \/ __ / __/ // / / /_/ //___ \
/ / / _, _/_____/ / / / / / /_/ / __/ /_/ / / __// /_/ / __/____/ /
/_/ /_/ |_| /_/ /_/ /_/_.___/\___/\__,_/ /____/\____/____/_____/

Table of Contents
Prerequisites
Setup
Flashing
Troubleshooting
Documentation

Prerequisites

We have setup guides for the major operating systems.

<strong>Please choose the appropriate setup guide for your operating system:</strong>

  • ### Linux
  • ### Windows Subsystem for Linux (WSL)
  • ### MacOS

Setup

  1. Clone this repo:
git clone https://github.com/Triton-Robotics/TR-mbed.git

At this point, you may choose to diverge from the CLI setup guide and set up an IDE instead. Check out the setup instructions for @ref "/home/runner/work/TR-mbed/TR-mbed/.md/ide/clion.md" "CLion" or @ref "/home/runner/work/TR-mbed/TR-mbed/.md/ide/vscode.md" "VSCode". We higly recommend @ref "/home/runner/work/TR-mbed/TR-mbed/.md/ide/clion.md" "CLion".

  1. Configure CMake project. This should only be done once per project, or after editing any CMakeLists.txt:
cmake -S . -B cmake-build-debug -GNinja
  1. Build the desired target using your IDE or via CLI:
cmake --build cmake-build-debug --target TR-TestBench -j $(nproc)

Viable targets for build are: TR-Engineer, TR-Infantry, TR-Sentry, TR-Hero, and TR-TestBench


Note: Go to the Embed Discord and search up makefile. After you find it, download it and upload it to your local TR-Embed folder. Most likely your computer will not work with E drive, to which you have to change it to D in the makefile. If you have problems with this, contact a embed member or the team lead.

After completing all of this you can make and flash your code to the nucleo using make testbench, make hero, make infantry, and make sentry. You should see a block with many numbers when the code is flashed. If you see a red text regarding "missing embed-tools" it is likely becuase you don't have the serial monitor downloaded which is not required to make and flash code.

Flashing STM32

  1. Locate the generated executable:

    eg. The built executable for TestBench will be present in cmake-build-debug/robots/TestBench/TR-TestBench.elf

  2. Flash the executable to the target device:
openocd -f board/st_nucleo_f4.cfg -c "program cmake-build-debug/robots/TestBench/TR-TestBench.elf verify reset exit"

‍For flashing device in WSL, see the WSL guide.

  1. View serial output:
mbed-tools sterm -b 115200

Troubleshooting

See the Troubleshooting guide for common issues and solutions.


Debugging

See the Debugging guide on how to run the debugger using STM32CubeIDE


Documentation

See our generated doxygen.