Elara Spacecraft
Source code & API documentation for Elara spacecraft system computers
Loading...
Searching...
No Matches
Elara Spacecraft Computer Docs

This is the source code & API documentation for the Elara spacecraft computer system. For non-computer documentation, please see the Codeberg repository and the Elara Handbook.

Specifications

The computer system is designed for an ARM Cortex-M architecture system that could eventually be used onboard the spacecraft. The system is hardware-agnostic and should be compatible with any Cortex-M3 Processor following the ARMv7-M architecture. Useful manuals and reference sheets can be found in the external resources folder in the repository.

Currently, the physical hardware we use for testing is an Arduino Due. Running on other hardware can be simulated via Qemu. We have verified the code to run in Qemu with an LM3S6965EVB board, whose datasheet can be found below. This board is one that has been used in other satellites before, hence why we have tested it.

Mandatory Standards

Bootloader Design

Arduino Reference Manuals

ARM Reference Manuals

Development quickstart

Tools needed

  • Arduino IDE/CLI
  • Qemu ARM/AARCH64 Emulator (qemu-system-aarch64)
  • ARM GCC Toolchain (arm-none-eabi-...)
  • GNU Make
  • Doxygen (only for building the documentation)

Make Commands

  • make: Compiles the source files into /bin/kernel.img
  • run: Loads and runs the image into qemu
  • clean: Cleans the /bin/ folder
  • dump: Provides a disassembly of the kernel.img file in /debug/
  • cdump: Cleans the /debug/ folder

Doxygen Commands

  • doxygen doxyconfig: Builds the HTML & LaTeX documentation using Doxygen, the HTML files can be found in tools/html and the LaTeX files can be found in tools/latex. This command needs to be run in the root of the spacecraft repository.

Development Notes

Addresses and Registers

  • Due to the limited onboard RAM of the system, using addresses via macros may be a better choice than setting up global static variables.

Regarding Issue #2:

  • Qemu does not properly set up the Cortex-M(3/7) running environment when using a direct loader. From experimentation, if the direct loader is used, the stack will be set to address 0x0000_0000 but execution will begin on the same line. This can lead to a fault escalation which resulted in Issue #2. To fix this, the -kernel flag is used to load the binary instead. This must be tested on actual hardware under multiple reset conditions (through configuring reset registers) to make sure an error like this can not occur under critical conditions.

About UART

  • Qemu does not use the Stellaris board's actual UART component. Rather, Qemu implements the PL011 UART the documentation of which can be found here.