Skip to content

Commit b996935

Browse files
committed
Initial public release of the OpenLST software
0 parents  commit b996935

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+9690
-0
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.hex
2+
*.lk
3+
*.map
4+
*.mem
5+
.vagrant
6+
*.log
7+
*.sig
8+
*.keys

LICENSE

+674
Large diffs are not rendered by default.

Makefile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# OpenLST
2+
# Copyright (C) 2018 Planet Labs Inc.
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
17+
include radios/openlst_437/Board.mk
18+
include open-lst/Build.mk
19+
20+
.PHONY: clean
21+
22+
vagrant: Vagrantfile
23+
vagrant up
24+
vagrant reload

README.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# OpenLST Radio
2+
3+
OpenLST is an open source, proven radio design for communicating with remote
4+
instruments, vehicles, and stations using low-cost commercial components.
5+
6+
## History
7+
8+
Planet developed the Low-Speed Transceiver (LST) for UHF telemetry, command,
9+
and control for the Dove satellite.
10+
11+
Over 100 on-orbit Dove satellites use the LST today.
12+
13+
OpenLST draws on Planet’s experience and success with the LST hardware and
14+
firmware.
15+
16+
## Reliability
17+
18+
Planet has used its LST UHF radio on over 200 Dove satellites. Based on
19+
commercial hardware, the LST has several hundred cumulative years of on-orbit
20+
operation.
21+
22+
The LST has an outstanding success record (with over 200 cumulative years of
23+
on-orbit operations) despite having a component cost of < $50.
24+
25+
## Applications
26+
27+
OpenLST is an open source, proven radio design for communicating with remote
28+
instruments, vehicles, and stations using low-cost commercial components.
29+
30+
### Use Cases
31+
* Remote sensing platforms
32+
* Drones
33+
* High-altitude balloons
34+
* Amateur wireless experimentation
35+
* University/Amateur Satellites
36+
37+
## What's Included
38+
39+
* A reference PCB schematic + layout utilizing the TI CC1110 -
40+
[link](https://www.planet.com/open/openlst-hw.git)
41+
* Firmware source for a bootloader and radio application reference project
42+
targeting the 70cm band - **this repostory**
43+
* Python tools for basic testing and operation - **this repository**
44+
* A user’s guide for getting started, programming, and customizing the project
45+
[link](./open-lst/USERS_GUIDE.md)
46+
47+
## Disclaimers
48+
49+
This repository may contain technology or software the export of which is or may
50+
be restricted by the Export Administration Act and the Export Administration
51+
Regulations (EAR), 15 C.F.R. parts 730-774. Diversion contrary to U.S. law is
52+
prohibited.

Vagrantfile

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# OpenLST
2+
# Copyright (C) 2018 Planet Labs Inc.
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
17+
Vagrant.configure("2") do |config|
18+
config.ssh.username = "vagrant"
19+
config.vm.box = "ubuntu/xenial64"
20+
config.vm.provision "shell", path: "open-lst/tools/install_cctool.sh"
21+
config.vm.provision "shell", path: "open-lst/tools/install_python_tools.sh"
22+
config.vm.synced_folder ".", "/home/vagrant/project"
23+
config.vm.provider "virtualbox" do |vb|
24+
vb.memory = 2048 # building cctool requires 2GB of RAM
25+
vb.customize ["modifyvm", :id, "--usb", "on"]
26+
vb.customize ["modifyvm", :id, "--usbehci", "on"]
27+
vb.customize ["usbfilter", "add", "0",
28+
"--target", :id,
29+
"--name", "CC Debugger",
30+
"--manufacturer", "Texas Instruments",
31+
"--product", "CC Debugger"]
32+
vb.customize ["usbfilter", "add", "0",
33+
"--target", :id,
34+
"--name", "TTL232R-3V3",
35+
"--manufacturer", "FTDI",
36+
"--product", "TTL232R-3V3"]
37+
end
38+
end

open-lst/.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.lst
2+
*.rel
3+
*.rst
4+
*.sym
5+
*.asm
6+
!flash_trigger.asm

open-lst/Bootloader.mk

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# OpenLST
2+
# Copyright (C) 2018 Planet Labs Inc.
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
17+
# This file provides a template for the bootloader
18+
# makefile
19+
HWID ?= 0x0000
20+
21+
BOOTLOADER_SECTION_START = 0x0000
22+
BOOTLOADER_SECTION_SIZE = 0x8000
23+
24+
BOOTLOADER_DIR := $(dir $(lastword $(MAKEFILE_LIST)))bootloader
25+
26+
BOOTLOADER_ASFLAGS = -plogsgff
27+
BOOTLOADER_CFLAGS = --model-$(MODEL) -I$(COMMON_DIR) -I$(BOOTLOADER_DIR) \
28+
-DBOOTLOADER -DKEEP_CODE_SMALL=1 -DHWID=$(HWID) -DGIT_REV=$(GIT_REV)
29+
BOOTLOADER_LDFLAGS = --model-$(MODEL) --out-fmt-ihx \
30+
--xram-loc 0xf000 --xram-size 0x0d00 --iram-size 0x100 \
31+
--code-loc $(BOOTLOADER_SECTION_START) \
32+
--code-size $(BOOTLOADER_SECTION_SIZE) \
33+
-Wl-bAPP_UPDATER=0x7000
34+
35+
BOOTLOADER_SRCS = $(BOOTLOADER_DIR)/main.c \
36+
$(BOOTLOADER_DIR)/commands.c \
37+
$(BOOTLOADER_DIR)/flash_storage.c \
38+
$(BOOTLOADER_DIR)/updater.c \
39+
$(BOOTLOADER_DIR)/flash.c \
40+
$(BOOTLOADER_DIR)/signature.c
41+
42+
BOOTLOADER_ASMS = $(BOOTLOADER_DIR)/start.asm
43+
44+
BOOTLOADER_HEADERS = $(BOOTLOADER_DIR)/*.h
45+
46+
# Template for building each radio bootloader
47+
define BOOTLOADER_template
48+
49+
# Build bootloader hex file
50+
$(1)_bootloader: $(1)_bootloader.hex
51+
52+
# Object Files used to build the radio
53+
# flash_trigger (part of COMMON_ASMS) must come first to preserve
54+
# even code alignment.
55+
$(1)_BL_OBJS = $(BOOTLOADER_ASMS:%.asm=%.$(1).bl.asm.rel) \
56+
$($(1)_ASMS:%.asm=%.$(1).bl.asm.rel) \
57+
$(COMMON_SRCS:%.c=%.$(1).bl.rel) \
58+
$(BOOTLOADER_SRCS:%.c=%.$(1).bl.rel) \
59+
$($(1)_SRCS:%.c=%.$(1).bl.rel) \
60+
$($(1)_BOOTLOADER_SRCS:%.c=%.$(1).rel)
61+
62+
# Rule to make the radio firmware hex file
63+
$(1)_bootloader.hex: $$($(1)_BL_OBJS)
64+
$(Q)$(CC) $(BOOTLOADER_LDFLAGS) $($(1)_BOOTLOADER_LDFLAGS) $($(1)_CFLAGS) $($(1)_BOOTLOADER_CFLAGS) $(BOOTLOADER_CFLAGS) $$^ -o $$@
65+
@echo
66+
@echo Memory usage summary for $$@:
67+
$(Q)tail -n5 $(1)_bootloader.mem
68+
$(Q)grep ^Stack $(1)_bootloader.mem
69+
@echo
70+
71+
# Rule to assemble objects for the radio
72+
$(BOOTLOADER_DIR)%.$(1).bl.asm.rel: $(BOOTLOADER_DIR)%.asm
73+
$(Q)$(AS) $(BOOTLOADER_ASFLAGS) $($(1)_ASFLAGS) $$@ $$^
74+
75+
# Rule to compile objects for the radio
76+
$(BOOTLOADER_DIR)%.$(1).bl.rel: $(BOOTLOADER_DIR)%.c $(BOOTLOADER_HEADERS)
77+
$(Q)$(CC) $(BOOTLOADER_CFLAGS) $($(1)_CFLAGS) $($(1)_BOOTLOADER_CFLAGS) -c $$< -o $$@
78+
79+
# Rule to assemble objects for the radio
80+
$(COMMON_DIR)%.$(1).asm.bl.rel: $(COMMON_DIR)%.asm
81+
$(Q)$(AS) $(BOOTLOADER_ASFLAGS) $($(1)_ASFLAGS) $$@ $$^
82+
83+
# Rule to compile objects for the radio
84+
$(COMMON_DIR)%.$(1).bl.rel: $(COMMON_DIR)%.c $(COMMON_HEADERS)
85+
$(Q)$(CC) $(BOOTLOADER_CFLAGS) $($(1)_CFLAGS) $($(1)_BOOTLOADER_CFLAGS) -c $$< -o $$@
86+
87+
88+
# Rule to assemble objects for the radio
89+
$($(1)_DIR)%.$(1).asm.bl.rel: $($(1)_DIR)%.asm
90+
$(Q)$(AS) $(BOOTLOADER_ASFLAGS) $($(1)_ASFLAGS) $$@ $$^
91+
92+
# Rule to compile objects for the radio
93+
$($(1)_DIR)%.$(1).bl.rel: $($(1)_DIR)%.c $($(1)_DIR)/*.h
94+
$(Q)$(CC) $(BOOTLOADER_CFLAGS) $($(1)_CFLAGS) $($(1)_BOOTLOADER_CFLAGS) -c $$< -o $$@
95+
96+
97+
# Append to the list of all objects (used to clean up intermediate files)
98+
ALL_OBJS += $$($(1)_BL_OBJS) $(1)_bootloader.hex $(1)_bootloader.lk $(1)_bootloader.mem $(1)_bootloader.map \
99+
$$($(1)_BL_OBJS:%.rel=%.asm) $$($(1)_BL_OBJS:%.rel=%.lst) \
100+
$$($(1)_BL_OBJS:%.rel=%.rst) $$($(1)_BL_OBJS:%.rel=%.sym)
101+
102+
endef

open-lst/Build.mk

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# OpenLST
2+
# Copyright (C) 2018 Planet Labs Inc.
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
17+
.PHONY: clean
18+
19+
Q ?= @
20+
MODEL = medium
21+
AS = sdas8051
22+
CC = sdcc
23+
24+
GIT_REV = $(shell git describe --always --dirty)
25+
GIT_REV_HEX = 0x$(shell git rev-parse --short=8 HEAD)
26+
27+
ALL_HEXS +=
28+
ROOT_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
29+
COMMON_DIR = $(ROOT_DIR)common
30+
COMMON_SRCS = $(COMMON_DIR)/board_defaults.c \
31+
$(COMMON_DIR)/clock.c \
32+
$(COMMON_DIR)/crc16.c \
33+
$(COMMON_DIR)/dma.c \
34+
$(COMMON_DIR)/input_handlers.c \
35+
$(COMMON_DIR)/interrupts.c \
36+
$(COMMON_DIR)/stringx.c \
37+
$(COMMON_DIR)/radio.c \
38+
$(COMMON_DIR)/uart0.c \
39+
$(COMMON_DIR)/uart1.c \
40+
$(COMMON_DIR)/watchdog.c
41+
COMMON_HEADERS = $(COMMON_DIR)/*.h
42+
43+
include $(ROOT_DIR)Bootloader.mk
44+
include $(ROOT_DIR)Radio.mk
45+
46+
all: bootloaders radios
47+
bootloaders: $(BOOTLOADERS:%=%_bootloader)
48+
radios: $(RADIOS:%=%_radio)
49+
50+
# Apply template to each radio
51+
$(foreach bootloader,$(BOOTLOADERS),$(eval $(call BOOTLOADER_template,$(bootloader))))
52+
$(foreach radio,$(RADIOS),$(eval $(call RADIO_template,$(radio))))
53+
54+
clean:
55+
$(Q)rm -f $(ALL_OBJS)

open-lst/Radio.mk

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# OpenLST
2+
# Copyright (C) 2018 Planet Labs Inc.
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
17+
# This file provides a template for the radio
18+
# makefile
19+
RADIO_SECTION_START = 0x0400
20+
# 0x7000-0x7FFF is reserved for the bootloader
21+
# 0x0000-0x0400 is also reserved for the bootloader
22+
# 0x6C00-0x6FFF is reserved for non-volatile storage
23+
# 0x6BE0-0x6BFF are reserved for the signature
24+
RADIO_SECTION_SIZE = 26592
25+
26+
RADIO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))radio
27+
28+
RADIO_ASFLAGS = -plogsgff
29+
RADIO_CFLAGS = --model-$(MODEL) -I$(COMMON_DIR) -I$(RADIO_DIR) \
30+
-DGIT_REV=$(GIT_REV) -DGIT_REV_HEX=$(GIT_REV_HEX)
31+
RADIO_LDFLAGS = --model-$(MODEL) --out-fmt-ihx \
32+
--xram-loc 0xf000 --xram-size 0x0d00 --iram-size 0x100 \
33+
--code-loc $(RADIO_SECTION_START) \
34+
--code-size $(RADIO_SECTION_SIZE) \
35+
-Wl-bFLASHTRIGSEG=0x0520
36+
37+
RADIO_SRCS = $(RADIO_DIR)/main.c \
38+
$(RADIO_DIR)/adc.c \
39+
$(RADIO_DIR)/commands.c \
40+
$(RADIO_DIR)/schedule.c \
41+
$(RADIO_DIR)/telemetry.c \
42+
$(RADIO_DIR)/timers.c
43+
44+
#flash_trigger must come first (code alignment)
45+
RADIO_ASMS = $(RADIO_DIR)/flash_trigger.asm
46+
47+
RADIO_HEADERS = $(RADIO_DIR)/*.h
48+
49+
# Template for building each radio
50+
define RADIO_template
51+
52+
# Build radio hex file
53+
$(1)_radio: $(1)_radio.hex
54+
55+
# Object Files used to build the radio
56+
# flash_trigger (part of COMMON_ASMS) must come first to preserve
57+
# even code alignment.
58+
$(1)_OBJS = $(RADIO_ASMS:%.asm=%.$(1).asm.rel) \
59+
$($(1)_ASMS:%.asm=%.$(1).asm.rel) \
60+
$(COMMON_SRCS:%.c=%.$(1).rel) \
61+
$(RADIO_SRCS:%.c=%.$(1).rel) \
62+
$($(1)_SRCS:%.c=%.$(1).rel) \
63+
$($(1)_RADIO_SRCS:%.c=%.$(1).rel)
64+
65+
# Rule to make the radio firmware hex file
66+
$(1)_radio.hex: $$($(1)_OBJS)
67+
$(Q)$(CC) $(RADIO_LDFLAGS) $($(1)_LDFLAGS) $($(1)_CFLAGS) $(RADIO_CFLAGS) $$^ -o $$@
68+
@echo
69+
@echo Memory usage summary for $$@:
70+
$(Q)tail -n5 $(1)_radio.mem
71+
$(Q)grep ^Stack $(1)_radio.mem
72+
@echo
73+
74+
# Rule to assemble objects for the radio
75+
$(RADIO_DIR)%.$(1).asm.rel: $(RADIO_DIR)%.asm
76+
$(Q)$(AS) $(RADIO_ASFLAGS) $($(1)_ASFLAGS) $$@ $$^
77+
78+
# Rule to compile objects for the radio
79+
$(RADIO_DIR)%.$(1).rel: $(RADIO_DIR)%.c $(RADIO_HEADERS)
80+
$(Q)$(CC) $(RADIO_CFLAGS) $($(1)_CFLAGS) -c $$< -o $$@
81+
82+
# Rule to assemble objects for the radio
83+
$(COMMON_DIR)%.$(1).asm.rel: $(COMMON_DIR)%.asm
84+
$(Q)$(AS) $(RADIO_ASFLAGS) $($(1)_ASFLAGS) $$@ $$^
85+
86+
# Rule to compile objects for the radio
87+
$(COMMON_DIR)%.$(1).rel: $(COMMON_DIR)%.c $(COMMON_HEADERS)
88+
$(Q)$(CC) $(RADIO_CFLAGS) $($(1)_CFLAGS) -c $$< -o $$@
89+
90+
91+
# Rule to assemble objects for the radio
92+
$($(1)_DIR)%.$(1).asm.rel: $($(1)_DIR)%.asm
93+
$(Q)$(AS) $(RADIO_ASFLAGS) $($(1)_ASFLAGS) $$@ $$^
94+
95+
# Rule to compile objects for the radio
96+
$($(1)_DIR)%.$(1).rel: $($(1)_DIR)%.c $($(1)_DIR)/*.h
97+
$(Q)$(CC) $(RADIO_CFLAGS) $($(1)_CFLAGS) -c $$< -o $$@
98+
99+
100+
# Append to the list of all objects (used to clean up intermediate files)
101+
ALL_OBJS += $$($(1)_OBJS) $(1)_radio.hex $(1)_radio.lk $(1)_radio.mem $(1)_radio.map \
102+
$$($(1)_OBJS:%.rel=%.asm) $$($(1)_OBJS:%.rel=%.lst) \
103+
$$($(1)_OBJS:%.rel=%.rst) $$($(1)_OBJS:%.rel=%.sym)
104+
105+
endef

0 commit comments

Comments
 (0)