Thread Tools
This thread is privately moderated by necbot, who may elect to delete unwanted replies.
May 09, 2020, 10:49 AM
Registered User
Thread OP
Discussion

Compiling and flashing Silverware on BetaFPV Lite (or similar board) on Linux


Hey everyone. I recently updated my BetaFPV Lite board with the latest version of Silverware, which is a firmware designed mainly for tinywhoop style brushed quads. The process for flashing this firmware on Linux was spread out all over the web so I wanted to try to collect it in one place so someone else going through this process wouldn't have to spend as much time as I did researching it. Here is what you have to do....


Install OpenOCD 0.9.0 (or greater)

My Linux distro had OpenOCD version 0.10.0. I installed it by opening a terminal and typing:
Code:
sudo apt install openocd

Install build dependencies (you might have these already in your distro)

Most of these were already install on my Linux distro, but run this anyway to make sure you have them
Code:
sudo apt install git build-essential gcc-arm-none-eabi libnewlib-arm-none-eabi

Get the arm compiler

This was tricker because there is currently no apt package on my Linux distro so I had to download it. The Silverware build that I was compiling seemed to need this specific version, which is version 5.06 update 6. Extract the setup.sh script and run it. When I ran this script it created a folder in my home directory: /home/necbot/ARM_Compiler_5.06u6


Get the Keil MDK Lite v5 elmap files

Next download the Keli mapping files (you have to register to do this) and move them to /home/necbot/ARM_Compiler_5.06u6/sw/mappings so the arm compiler can find them. I extracted the mapping files from the .exe file using my Linux distros default archiver, Engrampa. The mapping files are in the .exe file at ARM/sw/mappings so just copy everything in the mappings directory to the compiler folder you created in the previous step. In my case the mapping files were copied to /home/necbot/ARM_Compiler_5.06u6/sw/mappings


Compile Silverware

I used NotFastEnuf's fork. Download it and change directory to it by running this in your terminal:
Code:
git clone https://github.com/NotFastEnuf/NFE_Silverware
cd NFE_Silverware
Before you compile please read the README file! You might have to configure things depending on your build. For example, I'm running my quad on a transmitter that runs deviation firmware so I had to go into the config.h file and comment out the #define USE_MULTI and uncomment the #define USE_DEVO line. Also my quad is setup in a "props in" configuration so in the config.h file I had to comment out the #define INVERT_YAW_PID line. The changes you have to make may differ so PLEASE READ this file!

Next you need to tell your bash environment where the arm compiler is. The best way to do this is to temporarily add the arm compiler directory to your path by running
Code:
export PATH=/home/necbot/ARM_Compiler_5.06u6/bin/:"$PATH"
This is safer because you can simply close your terminal and your path will reset back to normal. Finally, run
Code:
make
and the compiler will generate a file called silverware.hex, which is the firmware file you will flash.


Flash Silverware to your board

You need a USB ST-Link flashing stick, I used this one. You can solder the connecting wires to your board if you want but I didn't feel like resoldering wires every time I wanted to flash so I ordered some 4 pin micro JST molex connectors 1.25 mm spacing. This vendor sold the male and female connectors so I soldered the connector to my flight controller board and made a 4 pin wire connector that I attached to my USB flashing stick. The pin mapping on the board from left to right is...

3.3v Red wire
Ground Black wire
SWCLK Yellow wire
SWDIO White wire

Connect this to your USB flash sticks appropriate pins (see pictures below if this is unclear). Plug the USB stick in and your board should power up. You do not need to plug in a battery, the 3.3v output from the USB stick seemed to power the board just find for me. In your terminal cd to the location of the silverware.hex file and run:
Code:
openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/share/openocd/scripts/target/stm32f0x.cfg -c init -c "reset halt" -c "flash write_image erase silverware.hex" -c "verify_image silverware.hex" -c "reset run" -c shutdown
Your board should flash. Enjoy Silverware.
Last edited by necbot; May 09, 2020 at 01:48 PM.
Sign up now
to remove ads between posts
May 12, 2020, 01:52 PM
Registered User
Great info for us Linux Users!
Thanks for all the info ;-)

See you in the Air!

Tony
Ground Control RC


Quick Reply
Message:
Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Mini-HowTo Some notes for silverware E011 flash on linux tetramonium Micro Multirotor Drones 4 Mar 18, 2021 05:45 AM
Help! Brushless Silverware on BetaFPV lite v1.0 ESC problem ansics Multirotor Drone Electronics 1 Jul 13, 2019 05:36 AM
New Product Betafpv lite FC ready loaded with silverware for acro whoop toys nigelsheffield Multirotor Drone Electronics 46 Dec 02, 2018 04:03 PM
Download Compiling and flashing Silverware on macOS 527FPV Micro Multirotor Drones 2 Apr 13, 2018 04:02 PM