EnduroSat OBC How-to Guide
A guide to running Flightkit software on the EnduroSat onboard computer.
1. Introduction
The EnduroSat onboard computer (OBC) is built around an STMicroelectronics STM32H7 device with a wide range of integrated peripherals. The board hosts additional peripherals.
|
Flightkit support for the EnduroSat OBC is at an early stage and only limited OBC functionality is currently available. This will be expanded in forthcoming releases. Note also that support which currently is present may be subject to breaking changes in forthcoming releases! |
2. Working With the EnduroSat OBC
This section outlines various procedures which you will need to use when working with the EnduroSat OBC
2.1. Installing the Toolchain
Flightkit support for the EnduroSat OBC requires the same toolchain as the ACS
Kryten: version 10.3-2021.10 of ARM’s arm-none-eabi toolchain.
|
This is the same version as required to use Flightkit’s ACS Kryten support, so if you have already installed it via the ACS Kryten How-to Guide then you can skip this section. |
|
A very similar version of this toolchain is available directly from the Ubuntu package repositories. However, it supplies a C standard library which is built without support for features which our Kryten board support code uses. As a result you should not use the toolchain in the Ubuntu package repositories. |
Once downloaded:
-
Extract the archive and make a note of its location. The
/optdirectory is a common location used for storing external toolchains. -
Add
/your/path/to/gcc-arm-none-eabi-10.3-2021.10/bin/to yourPATH, where/your/path/tois the path where you extracted the archive.
2.2. Building the Demo Mission
With the toolchain successfully installed, you can build flight software to run
on the EnduroSat OBC. The following steps will guide you through the process
for building the EnduroSatObcDemo mission from the FlightkitFoundation
bundle:
-
Create a new workspace for building the mission in.
-
Require the
FlightkitFoundationbundle so that the tooling can access its contents by running the following command:hfk workspace bundle require FlightkitFoundation -
Build the
EnduroSatObcDemomission from theFlightkitFoundationbundle by running the following command:hfk mission build EnduroSatObcDemo
This builds the single deployment instance in the mission, and generates a
mission database for interacting with them via Helix Lab. The binaries and
database can be found in
output/bundles/FlightkitFoundation/X.Y.Z/missions/EnduroSatObcDemo/, where
X.Y.Z is the version of FlightkitFoundation you are using.
2.3. Connecting to the EnduroSat OBC
There are three main connections that you will need to set up when working with the EnduroSat OBC: the telemetry and telecommand (TMTC) link, the debug link and the programmer.
The following sections will explain how to set up each one.
2.3.1. TMTC Link
The TMTC link is used to transport telemetry and telecommand (TMTC) packets between the EnduroSat OBC and the PC running Helix Lab.
The Default deployment instance in the EnduroSatObcDemo mission is
configured to provide the TMTC link using USART1 via an onboard RS485
transceiver.
To set up the TMTC link for the Default deployment instance connect a
suitable USB to RS485 adapter to the EnduroSat OBC’s SYSTEM1 RS485 connector,
shown in Figure 11 of the EnduroSat OBC User Manual (version 4.19).
The serial settings for the TMTC link are set as follows:
-
115200 baud
-
8 data bits
-
No parity bit
-
1 stop bit
-
No flow control
Helix Lab is only capable of exchanging TMTC packets with a spacecraft via a
TCP server. For this reason, you will also need to configure your host PC to
forward packets destined for the TCP port that Helix Lab transmits to to the
serial port that your TMTC link is connected to, and vice versa. There are many
ways this can be achieved, however we recommend you use a tool such as
ser2net or socat. If you are unfamiliar with how to use these tools, refer
to their documentation online.
2.3.2. Debug Link
The debug link is used for transporting debug information from the EnduroSat OBC to the PC where it can be displayed.
The Default deployment instance in the EnduroSatObcDemo mission is
configured to use UART8 with LVTLL voltage levels for debug output.
To set up the debug link for the Default deployment instance connect a
suitable USB to serial adapter to the EnduroSat OBC’s CSK connector.
Specifically, as shown in Figure 6 of the EnduroSat OBC User Manual (version
4.19), connect the adapter’s RX line to pin H1.33 - the OBC’s TX line.
There is no need to connect the adapter’s TX line to the OBC.
To view the debug produced by the board on the host PC run a terminal emulator,
such as minicom.
The serial settings for the debug link are set as follows:
-
115200 baud
-
8 data bits
-
No parity bit
-
1 stop bit
-
No flow control
You must apply these settings to your terminal emulator so that it interprets the incoming data correctly. The debug produced by the board uses linux line endings, so you may also need to enable implicit carriage returns in your terminal emulator to view the data properly.
2.3.3. Programmer
To program the EnduroSat OBC you will need to use an ST-LINK/V2 programmer.
-
Connect the ST-LINK/V2 programmer to the EnduroSat OBC according to EnduroSat’s documentation.
-
Install the STM32CubeProg tool from STMicroelectronics on the host machine.
If the programmer is able to communicate with the EnduroSat OBC you should be able to run the following command:
STM32_Programmer_CLI -c port=JTAG
and see output similar to the following:
-------------------------------------------------------------------
STM32CubeProgrammer v2.18.0
-------------------------------------------------------------------
ST-LINK SN : 38FF6B06304E4B3008211443
ST-LINK FW : V2J37S7
Board : --
Voltage : 3.23V
JTAG freq : 9000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x450
Revision ID : Rev V
Device name : STM32H7xx
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7
BL Version : 0x90
2.4. Programming the EnduroSat OBC
To program the EnduroSat OBC run the following command:
STM32_Programmer_CLI -c port=JTAG --download output/bundles/FlightkitFoundation/X.Y.Z/missions/EnduroSatObcDemo/BasicCommsDemo/Default/Default.bin 0x08000000 -rst
Where, as above X.Y.Z refers to the version of FlightkitFoundation you are using.
All being well, you should see the following output on the terminal emulator:
INF: Deployment.c:290 Running deployment:
INF: Deployment.c:291 - Deployment instance: Default
INF: Deployment.c:292 - Deployment type: endurosat.BasicCommsDemo
INF: Deployment.c:293 - Target: BasicCommsDemo
INF: Deployment.c:294 - Mission: EnduroSatObcDemo
INF: Deployment.c:419 Deployment initialisation successful