awach

  • *
  • 2
Success in fierce fight with Sp Racing F3 V1
« on: June 17, 2019, 06:31:36 pm »
Hello

I spent weeks getting my Sp Racing F3 to run. At some point I gave up and turned to inav. Disappointed by inav I have resumed the fierce fight with the F3 and LP and would like to briefly describe how I succeeded in the end

I followed the instructions in LibrePilot Documentation / Developer Manual / Linux  Building and Packaging. On Linux MX 18.2 (Debian Stretch) I installed the dependencies and followed the steps until Build. Then:

make fw_resource
make gcs
make package (made no package)
make all
make install
make all_flight

Installed stm32flash from sourceforge.net
shorted the bootpins, connect usb,
flashed bl_spracingf3.hex (stm32flash -w <.my location.>/bl_spracingf3.hex /dev/ttyUSB0 in my case)
disconnect usb, connect usb,
flashed ef_spracingf3.bin the same way.

removed the jumper from the bootpins and connected the fc in librepilot-gcs. No Setup wizzard necessary.
Maybe this is useful to someone
Bavaria here - sorry for my bad english.

Re: Success in fierce fight with Sp Racing F3 V1
« Reply #1 on: June 17, 2019, 09:17:21 pm »
Your English is excellent.  :)

Generally, boards must have a bootloader and a normal flight firmware to fly.  For LP, the GCS asks the bootloader to flash the normal flight firmware, so the bootloader must be installed on the board if you want to use the LP GCS to flash normal flight firmware.

For future reference, bl_boardname means just raw bootloader for boardname.  ef_boardname means entire flash for boardname.  ef_boardname includes bootloader and normal flight firmware.  You should have been able to flash just the ef_boardname, but what you did is OK too.  :)

Since you didn't have an LP bootloader already on the board, you did need to short the (S)BL pins together to get it to run in System Boot Loader mode.  (FYI, (S)BL pins only must be shorted during power on, so I sometimes just hold a pin head between the pads while powering on instead of solder blob.)  Then there are several different programs you can use to flash the bootloader (bl_boardname.hex or maybe bl_boardname.bin): stm32flash, dfu-util ...

... or you can use CleanFlight or BetaFlight (if they support your board) to flash bl_boardname.hex to your board.

(S)BL pins that you shorted together should be un-shorted when done flashing bootloader to allow the bootloader to run.

bu_boardname is bootloader updater which starts as a normal firmware that gets written to the same place as normal flight firmware (fw_boardname.opfw) and so it wipes out the normal flight firmware.  It then moves itself to the normal bootloader location.  The nice thing about bu_boardname is that it is the easy way to install a new bootloader version.  You don't short the (S)BL pins and you use the LP GCS instead of being forced to use stm32flash or other program.  But it does require some old version of an LP bootloader is already installed so no good for first time on some boards.

After most of these procedures, you will have a working bootloader but will not have normal flight firmware.  LED is slowly fading on and off tells you this is the case.  You use what is called the Manual method on the wiki to install normal flight firmware:
https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/5669026/Firmware+Tab#FirmwareTab-Manualmethod
« Last Edit: June 17, 2019, 09:27:23 pm by TheOtherCliff »

awach

  • *
  • 2
Re: Success in fierce fight with Sp Racing F3 V1
« Reply #2 on: June 17, 2019, 09:45:26 pm »
Thank you for your explanation. I have tried the described method with Betaflight many times. I'll keep testing tomorrow. In fact, my actions are the result of pure desperation. I just want Librepilot. A (maybe) airbot omnibus f4 pro v3 burned down but the F3 seems to be of good quality.