Fix up firmware and demos
This commit is contained in:
parent
88379634a8
commit
32da9c4e8c
22 changed files with 563 additions and 342 deletions
13
.gitmodules
vendored
Normal file
13
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
[submodule "libopencm3"]
|
||||||
|
path = fw/libopencm3
|
||||||
|
url = https://github.com/libopencm3/libopencm3
|
||||||
|
[submodule "fw/src/crypto/noise-c"]
|
||||||
|
path = fw/src/crypto/noise-c
|
||||||
|
url = https://github.com/rweather/noise-c
|
||||||
|
[submodule "fw/upstream/stm32square"]
|
||||||
|
path = fw/upstream/stm32square
|
||||||
|
url = https://gitlab.com/neinseg/stm32square
|
||||||
|
branch = release
|
||||||
|
[submodule "fw/upstream/PyCortexMDebug"]
|
||||||
|
path = fw/upstream/PyCortexMDebug
|
||||||
|
url = https://github.com/bnahill/PyCortexMDebug
|
||||||
20
fw/.gdbinit
Normal file
20
fw/.gdbinit
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
target remote localhost:3333
|
||||||
|
set print pretty on
|
||||||
|
set print elements 512
|
||||||
|
|
||||||
|
# Update GDB's Python paths with the `sys.path` values of the local Python installation,
|
||||||
|
# whether that is brew'ed Python, a virtualenv, or another system python.
|
||||||
|
|
||||||
|
# Convert GDB to interpret in Python
|
||||||
|
python
|
||||||
|
import os,subprocess,sys
|
||||||
|
# Execute a Python using the user's shell and pull out the sys.path (for site-packages)
|
||||||
|
paths = subprocess.check_output('python -c "import os,sys;print(os.linesep.join(sys.path).strip())"',shell=True).decode("utf-8").split()
|
||||||
|
# Extend GDB's Python's search path
|
||||||
|
sys.path.extend(paths)
|
||||||
|
end
|
||||||
|
|
||||||
|
source upstream/PyCortexMDebug/cmdebug/svd_gdb.py
|
||||||
|
svd_load upstream/stm32square/svd/STM32F407.svd
|
||||||
|
|
||||||
3
fw/.gitmodules
vendored
3
fw/.gitmodules
vendored
|
|
@ -1,3 +0,0 @@
|
||||||
[submodule "libopencm3"]
|
|
||||||
path = libopencm3
|
|
||||||
url = https://amirhammad@github.com/amirhammad/libopencm3
|
|
||||||
|
|
@ -54,7 +54,7 @@ add_definitions (${CPP_FLAGS})
|
||||||
add_definitions (-DSTM32F4)
|
add_definitions (-DSTM32F4)
|
||||||
|
|
||||||
set (CMAKE_EXE_LINKER_FLAGS
|
set (CMAKE_EXE_LINKER_FLAGS
|
||||||
"--static -nostartfiles -T${CMAKE_SOURCE_DIR}/libusbhost_stm32f4.ld -Wl,-Map=FIXME_ONE.map -Wl,--gc-sections -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group"
|
"--static -nostartfiles -L${CMAKE_SOURCE_DIR}/libopencm3/lib -T${CMAKE_SOURCE_DIR}/libusbhost_stm32f4.ld -Wl,-Map=FIXME_ONE.map -Wl,--gc-sections -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group"
|
||||||
)
|
)
|
||||||
|
|
||||||
include_directories (
|
include_directories (
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ from noise.exceptions import NoiseInvalidMessage
|
||||||
import keymap
|
import keymap
|
||||||
from hexdump import hexdump
|
from hexdump import hexdump
|
||||||
|
|
||||||
|
BINDING_INCANTATION_LENGTH = 4
|
||||||
|
|
||||||
class PacketType(enum.Enum):
|
class PacketType(enum.Enum):
|
||||||
_RESERVED = 0
|
_RESERVED = 0
|
||||||
INITIATE_HANDSHAKE = 1
|
INITIATE_HANDSHAKE = 1
|
||||||
|
|
@ -122,7 +124,7 @@ class KeyMapper:
|
||||||
class Magic:
|
class Magic:
|
||||||
@classmethod
|
@classmethod
|
||||||
def map_bytes_to_incantation(kls, data):
|
def map_bytes_to_incantation(kls, data):
|
||||||
elems = [ f'{kls.ADJECTIVES[a]} {kls.NOUNS[b]}' for a, b in zip(data[0::2], data[1::2]) ]
|
elems = [ f'{kls.EVEN[a]} {kls.ODD[b]}' for a, b in zip(data[0::2], data[1::2]) ]
|
||||||
nfirst = ", ".join(elems[:-1])
|
nfirst = ", ".join(elems[:-1])
|
||||||
return f'{nfirst} and {elems[-1]}'
|
return f'{nfirst} and {elems[-1]}'
|
||||||
|
|
||||||
|
|
@ -232,6 +234,8 @@ class NoiseEngine:
|
||||||
def perform_handshake(self):
|
def perform_handshake(self):
|
||||||
self.packetizer.send_packet(PacketType.INITIATE_HANDSHAKE, b'')
|
self.packetizer.send_packet(PacketType.INITIATE_HANDSHAKE, b'')
|
||||||
self.debug_print('Handshake started')
|
self.debug_print('Handshake started')
|
||||||
|
import time
|
||||||
|
time.sleep(0.5) # FIXME
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
if self.proto.handshake_finished:
|
if self.proto.handshake_finished:
|
||||||
|
|
@ -262,7 +266,8 @@ class NoiseEngine:
|
||||||
|
|
||||||
def channel_binding_incantation(self):
|
def channel_binding_incantation(self):
|
||||||
hhash = self.proto.get_handshake_hash()
|
hhash = self.proto.get_handshake_hash()
|
||||||
return '\n'.join(Magic.map_bytes_to_incantation(hhash[i:i+8]) for i in range(0, 16, 8))
|
#return '\n'.join(Magic.map_bytes_to_incantation(hhash[i:i+8]) for i in range(0, 16, 8))
|
||||||
|
return '\n'.join(Magic.map_bytes_to_incantation(hhash[i:min(BINDING_INCANTATION_LENGTH, i+8)]) for i in range(0, BINDING_INCANTATION_LENGTH, 8))
|
||||||
|
|
||||||
def receive_loop(self):
|
def receive_loop(self):
|
||||||
while True:
|
while True:
|
||||||
|
|
@ -368,7 +373,8 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
ser = serial.Serial(args.serial, args.baudrate)
|
ser = serial.Serial(args.serial, args.baudrate)
|
||||||
packetizer = Packetizer(ser, debug=args.debug, width=args.width)
|
packetizer = Packetizer(ser, debug=args.debug, width=args.width)
|
||||||
noise = NoiseEngine(packetizer, debug=args.debug)
|
temp_priv_key = NoiseEngine.generate_private_key_x25519()
|
||||||
|
noise = NoiseEngine(temp_priv_key, packetizer, debug=args.debug)
|
||||||
noise.perform_handshake()
|
noise.perform_handshake()
|
||||||
|
|
||||||
print('Handshake channel binding incantation:')
|
print('Handshake channel binding incantation:')
|
||||||
|
|
|
||||||
23
fw/include/bits/alltypes.h
Normal file
23
fw/include/bits/alltypes.h
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
/* shim file for musl */
|
||||||
|
|
||||||
|
#ifndef __MUSL_SHIM_BITS_ALLTYPES_H__
|
||||||
|
#define __MUSL_SHIM_BITS_ALLTYPES_H__
|
||||||
|
|
||||||
|
#define _REDIR_TIME64 1
|
||||||
|
#define _Addr int
|
||||||
|
#define _Int64 long long
|
||||||
|
#define _Reg int
|
||||||
|
|
||||||
|
#define __BYTE_ORDER 1234
|
||||||
|
|
||||||
|
#define __LONG_MAX 0x7fffffffL
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
|
typedef unsigned wchar_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef float float_t;
|
||||||
|
typedef double double_t;
|
||||||
|
|
||||||
|
#endif /* __MUSL_SHIM_BITS_ALLTYPES_H__ */
|
||||||
81
fw/include/endian.h
Normal file
81
fw/include/endian.h
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
#ifndef _ENDIAN_H
|
||||||
|
#define _ENDIAN_H
|
||||||
|
|
||||||
|
#include <features.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#define __NEED_uint16_t
|
||||||
|
#define __NEED_uint32_t
|
||||||
|
#define __NEED_uint64_t
|
||||||
|
|
||||||
|
#include <bits/alltypes.h>
|
||||||
|
|
||||||
|
#define __PDP_ENDIAN 3412
|
||||||
|
|
||||||
|
#define BIG_ENDIAN __BIG_ENDIAN
|
||||||
|
#define LITTLE_ENDIAN __LITTLE_ENDIAN
|
||||||
|
#define PDP_ENDIAN __PDP_ENDIAN
|
||||||
|
#define BYTE_ORDER __BYTE_ORDER
|
||||||
|
|
||||||
|
static __inline uint16_t __bswap16(uint16_t __x)
|
||||||
|
{
|
||||||
|
return __x<<8 | __x>>8;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline uint32_t __bswap32(uint32_t __x)
|
||||||
|
{
|
||||||
|
return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline uint64_t __bswap64(uint64_t __x)
|
||||||
|
{
|
||||||
|
return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
|
#define htobe16(x) __bswap16(x)
|
||||||
|
#define be16toh(x) __bswap16(x)
|
||||||
|
#define htobe32(x) __bswap32(x)
|
||||||
|
#define be32toh(x) __bswap32(x)
|
||||||
|
#define htobe64(x) __bswap64(x)
|
||||||
|
#define be64toh(x) __bswap64(x)
|
||||||
|
#define htole16(x) (uint16_t)(x)
|
||||||
|
#define le16toh(x) (uint16_t)(x)
|
||||||
|
#define htole32(x) (uint32_t)(x)
|
||||||
|
#define le32toh(x) (uint32_t)(x)
|
||||||
|
#define htole64(x) (uint64_t)(x)
|
||||||
|
#define le64toh(x) (uint64_t)(x)
|
||||||
|
#else
|
||||||
|
#define htobe16(x) (uint16_t)(x)
|
||||||
|
#define be16toh(x) (uint16_t)(x)
|
||||||
|
#define htobe32(x) (uint32_t)(x)
|
||||||
|
#define be32toh(x) (uint32_t)(x)
|
||||||
|
#define htobe64(x) (uint64_t)(x)
|
||||||
|
#define be64toh(x) (uint64_t)(x)
|
||||||
|
#define htole16(x) __bswap16(x)
|
||||||
|
#define le16toh(x) __bswap16(x)
|
||||||
|
#define htole32(x) __bswap32(x)
|
||||||
|
#define le32toh(x) __bswap32(x)
|
||||||
|
#define htole64(x) __bswap64(x)
|
||||||
|
#define le64toh(x) __bswap64(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||||
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
|
#define betoh16(x) __bswap16(x)
|
||||||
|
#define betoh32(x) __bswap32(x)
|
||||||
|
#define betoh64(x) __bswap64(x)
|
||||||
|
#define letoh16(x) (uint16_t)(x)
|
||||||
|
#define letoh32(x) (uint32_t)(x)
|
||||||
|
#define letoh64(x) (uint64_t)(x)
|
||||||
|
#else
|
||||||
|
#define betoh16(x) (uint16_t)(x)
|
||||||
|
#define betoh32(x) (uint32_t)(x)
|
||||||
|
#define betoh64(x) (uint64_t)(x)
|
||||||
|
#define letoh16(x) __bswap16(x)
|
||||||
|
#define letoh32(x) __bswap32(x)
|
||||||
|
#define letoh64(x) __bswap64(x)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
40
fw/include/features.h
Normal file
40
fw/include/features.h
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
#ifndef _FEATURES_H
|
||||||
|
#define _FEATURES_H
|
||||||
|
|
||||||
|
#if defined(_ALL_SOURCE) && !defined(_GNU_SOURCE)
|
||||||
|
#define _GNU_SOURCE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_DEFAULT_SOURCE) && !defined(_BSD_SOURCE)
|
||||||
|
#define _BSD_SOURCE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \
|
||||||
|
&& !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \
|
||||||
|
&& !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__)
|
||||||
|
#define _BSD_SOURCE 1
|
||||||
|
#define _XOPEN_SOURCE 700
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 199901L
|
||||||
|
#define __restrict restrict
|
||||||
|
#elif !defined(__GNUC__)
|
||||||
|
#define __restrict
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
|
||||||
|
#define __inline inline
|
||||||
|
#elif !defined(__GNUC__)
|
||||||
|
#define __inline
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 201112L
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#define _Noreturn __attribute__((__noreturn__))
|
||||||
|
#else
|
||||||
|
#define _Noreturn
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __REDIR(x,y) __typeof__(x) x __asm__(#y)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
git submodule init
|
#git submodule init
|
||||||
git submodule update
|
#git submodule update
|
||||||
make -C libopencm3 -j3 lib/stm32/f4
|
#make -C libopencm3 -j3 lib/stm32/f4
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 798c1edf4d11e8a40a7263dc465fa225a63fa7e9
|
Subproject commit 458250dc6147dc807eec9e4d5a6caf38a699ecb1
|
||||||
|
|
@ -31,7 +31,7 @@ MEMORY
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Include the common ld script. */
|
/* Include the common ld script. */
|
||||||
INCLUDE libopencm3_stm32f4.ld
|
INCLUDE cortex-m-generic.ld
|
||||||
|
|
||||||
/* Extra stuff */
|
/* Extra stuff */
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ source [find interface/stlink-v2.cfg]
|
||||||
#transport select swd
|
#transport select swd
|
||||||
|
|
||||||
#source /usr/share/openocd/scripts/target/stm32f0x.cfg
|
#source /usr/share/openocd/scripts/target/stm32f0x.cfg
|
||||||
source [find target/stm32f4x_stlink.cfg]
|
source [find target/stm32f4x.cfg]
|
||||||
|
|
||||||
init
|
init
|
||||||
arm semihosting enable
|
arm semihosting enable
|
||||||
|
|
|
||||||
1
fw/src/crypto/noise-c
Submodule
1
fw/src/crypto/noise-c
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 604d48fc99b1ae349d4ceb01176a1adf83cb1b31
|
||||||
102
fw/src/demo.c
102
fw/src/demo.c
|
|
@ -24,8 +24,8 @@
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
#include <libopencm3/stm32/otg_hs.h>
|
#include <libopencm3/usb/dwc/otg_hs.h>
|
||||||
#include <libopencm3/stm32/otg_fs.h>
|
#include <libopencm3/usb/dwc/otg_fs.h>
|
||||||
#include <libopencm3/stm32/pwr.h>
|
#include <libopencm3/stm32/pwr.h>
|
||||||
#include <libopencm3/stm32/dma.h>
|
#include <libopencm3/stm32/dma.h>
|
||||||
#include <libopencm3/cm3/nvic.h>
|
#include <libopencm3/cm3/nvic.h>
|
||||||
|
|
@ -87,15 +87,16 @@ static inline void delay(uint32_t n) {
|
||||||
|
|
||||||
/* Set STM32 to 168 MHz. */
|
/* Set STM32 to 168 MHz. */
|
||||||
static void clock_setup(void) {
|
static void clock_setup(void) {
|
||||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||||
|
|
||||||
rcc_periph_clock_enable(RCC_GPIOA);
|
rcc_periph_clock_enable(RCC_GPIOA);
|
||||||
rcc_periph_clock_enable(RCC_GPIOB);
|
rcc_periph_clock_enable(RCC_GPIOB);
|
||||||
|
rcc_periph_clock_enable(RCC_GPIOC);
|
||||||
rcc_periph_clock_enable(RCC_GPIOD);
|
rcc_periph_clock_enable(RCC_GPIOD);
|
||||||
rcc_periph_clock_enable(RCC_GPIOE);
|
rcc_periph_clock_enable(RCC_GPIOE);
|
||||||
|
|
||||||
rcc_periph_clock_enable(RCC_USART1);
|
rcc_periph_clock_enable(RCC_USART1);
|
||||||
rcc_periph_clock_enable(RCC_USART2);
|
rcc_periph_clock_enable(RCC_UART4);
|
||||||
rcc_periph_clock_enable(RCC_OTGFS);
|
rcc_periph_clock_enable(RCC_OTGFS);
|
||||||
rcc_periph_clock_enable(RCC_TIM6);
|
rcc_periph_clock_enable(RCC_TIM6);
|
||||||
rcc_periph_clock_enable(RCC_DMA2);
|
rcc_periph_clock_enable(RCC_DMA2);
|
||||||
|
|
@ -139,7 +140,7 @@ static void finish_interrupted_scrub(void) {
|
||||||
|
|
||||||
/* setup 10kHz timer */
|
/* setup 10kHz timer */
|
||||||
static void tim6_setup(void) {
|
static void tim6_setup(void) {
|
||||||
timer_reset(TIM6);
|
rcc_periph_reset_pulse(RST_TIM6);
|
||||||
timer_set_prescaler(TIM6, 8400 - 1); // 84Mhz/10kHz - 1
|
timer_set_prescaler(TIM6, 8400 - 1); // 84Mhz/10kHz - 1
|
||||||
timer_set_period(TIM6, 65535); // Overflow in ~6.5 seconds
|
timer_set_period(TIM6, 65535); // Overflow in ~6.5 seconds
|
||||||
timer_enable_irq(TIM6, TIM_DIER_UIE);
|
timer_enable_irq(TIM6, TIM_DIER_UIE);
|
||||||
|
|
@ -180,13 +181,16 @@ static void gpio_setup(void)
|
||||||
//gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO6 | GPIO7);
|
//gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO6 | GPIO7);
|
||||||
//gpio_set(GPIOA, GPIO6 | GPIO7);
|
//gpio_set(GPIOA, GPIO6 | GPIO7);
|
||||||
|
|
||||||
/* Status LEDs (PE4-15) */
|
|
||||||
gpio_mode_setup(GPIOE, GPIO_MODE_INPUT, GPIO_PUPD_NONE, 0xfff0);
|
|
||||||
|
|
||||||
/* Alarm LEDs (PA6,7) */
|
/* Alarm LEDs (PA6,7) */
|
||||||
gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO6 | GPIO7);
|
gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO6 | GPIO7);
|
||||||
gpio_set(GPIOA, GPIO6 | GPIO7);
|
gpio_set(GPIOA, GPIO6 | GPIO7);
|
||||||
|
|
||||||
|
/* Mode LEDs */
|
||||||
|
gpio_mode_setup(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO13 | GPIO14);
|
||||||
|
|
||||||
|
/* Mode button */
|
||||||
|
gpio_mode_setup(GPIOE, GPIO_MODE_INPUT, GPIO_PUPD_PULLUP, GPIO15);
|
||||||
|
|
||||||
/* Speaker */
|
/* Speaker */
|
||||||
gpio_mode_setup(GPIOB, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO10);
|
gpio_mode_setup(GPIOB, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO10);
|
||||||
gpio_set(GPIOB, GPIO10);
|
gpio_set(GPIOB, GPIO10);
|
||||||
|
|
@ -199,12 +203,9 @@ static void gpio_setup(void)
|
||||||
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO9 | GPIO10);
|
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO9 | GPIO10);
|
||||||
gpio_set_af(GPIOA, GPIO_AF7, GPIO9 | GPIO10);
|
gpio_set_af(GPIOA, GPIO_AF7, GPIO9 | GPIO10);
|
||||||
|
|
||||||
/* USART2 (host link) */
|
/* UART4 (host link) */
|
||||||
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO2 | GPIO3);
|
gpio_mode_setup(GPIOC, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO10 | GPIO11);
|
||||||
gpio_set_af(GPIOA, GPIO_AF7, GPIO2 | GPIO3);
|
gpio_set_af(GPIOC, GPIO_AF8, GPIO10 | GPIO11);
|
||||||
|
|
||||||
/* K0 (PE4)/K1 (PE3) buttons */
|
|
||||||
//gpio_mode_setup(GPIOE, GPIO_MODE_INPUT, GPIO_PUPD_PULLUP, GPIO3 | GPIO4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct hid_report {
|
struct hid_report {
|
||||||
|
|
@ -221,7 +222,7 @@ void pairing_input(uint8_t modbyte, uint8_t keycode);
|
||||||
void pairing_parse_report(struct hid_report *buf, uint8_t len);
|
void pairing_parse_report(struct hid_report *buf, uint8_t len);
|
||||||
|
|
||||||
/* Minimum number of bytes of handshake hash to confirm during pairing */
|
/* Minimum number of bytes of handshake hash to confirm during pairing */
|
||||||
#define MIN_PAIRING_SEQUENCE_LENGTH 8
|
#define MIN_PAIRING_SEQUENCE_LENGTH 4
|
||||||
|
|
||||||
int pairing_check(struct NoiseState *st, const char *buf) {
|
int pairing_check(struct NoiseState *st, const char *buf) {
|
||||||
//LOG_PRINTF("Checking pairing\n");
|
//LOG_PRINTF("Checking pairing\n");
|
||||||
|
|
@ -491,10 +492,10 @@ void DMA_ISR(DEBUG_USART_DMA_NUM, DEBUG_USART_DMA_STREAM_NUM)(void) {
|
||||||
/*@ requires \valid_read(&pkt->type) && \valid_read(pkt->payload + (0..payload_length-1));
|
/*@ requires \valid_read(&pkt->type) && \valid_read(pkt->payload + (0..payload_length-1));
|
||||||
requires \valid(st);
|
requires \valid(st);
|
||||||
requires \valid(st->handshake);
|
requires \valid(st->handshake);
|
||||||
requires \separated(st, st->rx_cipher, st->tx_cipher, st->handshake, (uint8_t *)pkt->payload, &usart2_out, &st->handshake_hash);
|
requires \separated(st, st->rx_cipher, st->tx_cipher, st->handshake, (uint8_t *)pkt->payload, &uart4_out, &st->handshake_hash);
|
||||||
requires \valid(usart2_out);
|
requires \valid(uart4_out);
|
||||||
|
|
||||||
assigns pairing_buf_pos, *usart2_out, *st;
|
assigns pairing_buf_pos, *uart4_out, *st;
|
||||||
|
|
||||||
assigns st->handshake, st->handshake_state, st->rx_cipher, st->tx_cipher;
|
assigns st->handshake, st->handshake_state, st->rx_cipher, st->tx_cipher;
|
||||||
@*/
|
@*/
|
||||||
|
|
@ -515,7 +516,7 @@ void handle_host_packet(struct NoiseState *st, const struct control_packet *pkt,
|
||||||
} else {
|
} else {
|
||||||
LOG_PRINTF("Too many failed handshake attempts, not starting another one\n");
|
LOG_PRINTF("Too many failed handshake attempts, not starting another one\n");
|
||||||
struct control_packet out = { .type=HOST_TOO_MANY_FAILS };
|
struct control_packet out = { .type=HOST_TOO_MANY_FAILS };
|
||||||
send_packet(usart2_out, (uint8_t *)&out, sizeof(out));
|
send_packet(uart4_out, (uint8_t *)&out, sizeof(out));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (pkt->type == HOST_HANDSHAKE) {
|
} else if (pkt->type == HOST_HANDSHAKE) {
|
||||||
|
|
@ -525,7 +526,7 @@ void handle_host_packet(struct NoiseState *st, const struct control_packet *pkt,
|
||||||
TRACING_CLEAR(TR_NOISE_HANDSHAKE);
|
TRACING_CLEAR(TR_NOISE_HANDSHAKE);
|
||||||
LOG_PRINTF("Reporting handshake error to host\n");
|
LOG_PRINTF("Reporting handshake error to host\n");
|
||||||
struct control_packet out = { .type=HOST_CRYPTO_ERROR };
|
struct control_packet out = { .type=HOST_CRYPTO_ERROR };
|
||||||
send_packet(usart2_out, (uint8_t *)&out, sizeof(out));
|
send_packet(uart4_out, (uint8_t *)&out, sizeof(out));
|
||||||
} else TRACING_CLEAR(TR_NOISE_HANDSHAKE);
|
} else TRACING_CLEAR(TR_NOISE_HANDSHAKE);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -555,10 +556,10 @@ int main(void)
|
||||||
/* end unsafe debug code */
|
/* end unsafe debug code */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
usart_dma_init(usart2_out);
|
usart_dma_init(uart4_out);
|
||||||
usart_enable_rx_interrupt(USART2);
|
usart_enable_rx_interrupt(UART4);
|
||||||
nvic_enable_irq(NVIC_USART2_IRQ);
|
nvic_enable_irq(NVIC_UART4_IRQ);
|
||||||
nvic_set_priority(NVIC_USART2_IRQ, 3<<4);
|
nvic_set_priority(NVIC_UART4_IRQ, 3<<4);
|
||||||
nvic_set_priority(debug_out_s.irqn, 1<<4);
|
nvic_set_priority(debug_out_s.irqn, 1<<4);
|
||||||
|
|
||||||
LOG_PRINTF("\n==================================\n");
|
LOG_PRINTF("\n==================================\n");
|
||||||
|
|
@ -602,20 +603,52 @@ int main(void)
|
||||||
gpio_clear(GPIOA, GPIO6);
|
gpio_clear(GPIOA, GPIO6);
|
||||||
gpio_clear(GPIOA, GPIO7);
|
gpio_clear(GPIOA, GPIO7);
|
||||||
gpio_clear(GPIOB, GPIO10);
|
gpio_clear(GPIOB, GPIO10);
|
||||||
|
|
||||||
|
int last_btn_st = 0;
|
||||||
|
int debounce_ctr = 0;
|
||||||
|
int mode_debug = 0;
|
||||||
|
#define DEBOUNCE_IVL 1000
|
||||||
|
gpio_set(GPIOE, GPIO13);
|
||||||
|
gpio_clear(GPIOE, GPIO14);
|
||||||
|
|
||||||
while (23) {
|
while (23) {
|
||||||
delay(1);
|
delay(1);
|
||||||
|
|
||||||
|
if (debounce_ctr > 0) {
|
||||||
|
debounce_ctr -= 1;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (gpio_get(GPIOE, GPIO15)) {
|
||||||
|
if (!last_btn_st) {
|
||||||
|
debounce_ctr = DEBOUNCE_IVL;
|
||||||
|
|
||||||
|
mode_debug = !mode_debug;
|
||||||
|
|
||||||
|
if (mode_debug) {
|
||||||
|
gpio_clear(GPIOE, GPIO13);
|
||||||
|
gpio_set(GPIOE, GPIO14);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
gpio_set(GPIOE, GPIO13);
|
||||||
|
gpio_clear(GPIOE, GPIO14);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
last_btn_st = 1;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
last_btn_st = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
led_ctr++;
|
led_ctr++;
|
||||||
if (led_ctr == 10) {
|
if (led_ctr == 10) {
|
||||||
gpio_clear(GPIOA, GPIO6);
|
gpio_clear(GPIOA, GPIO6);
|
||||||
gpio_clear(GPIOA, GPIO7);
|
gpio_clear(GPIOA, GPIO7);
|
||||||
} else if (led_ctr == 300) {
|
|
||||||
gpio_mode_setup(GPIOE, GPIO_MODE_INPUT, GPIO_PUPD_NONE, 0xfff0);
|
|
||||||
} else if (led_ctr == 400) {
|
} else if (led_ctr == 400) {
|
||||||
if (++led_idx == 12)
|
if (++led_idx == 12)
|
||||||
led_idx = 0;
|
led_idx = 0;
|
||||||
gpio_mode_setup(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, 1<<(4+led_idx));
|
|
||||||
gpio_clear(GPIOE, 0xfff0);
|
|
||||||
if (led_idx & 1)
|
if (led_idx & 1)
|
||||||
gpio_set(GPIOA, GPIO6);
|
gpio_set(GPIOA, GPIO6);
|
||||||
else
|
else
|
||||||
|
|
@ -638,7 +671,7 @@ int main(void)
|
||||||
} else {
|
} else {
|
||||||
gpio_clear(GPIOB, GPIO10);
|
gpio_clear(GPIOB, GPIO10);
|
||||||
}
|
}
|
||||||
continue;
|
*/
|
||||||
|
|
||||||
if (++poll_ctr == 10) {
|
if (++poll_ctr == 10) {
|
||||||
poll_ctr = 0;
|
poll_ctr = 0;
|
||||||
|
|
@ -652,12 +685,13 @@ int main(void)
|
||||||
host_packet_length = 0; /* Acknowledge to USART ISR the buffer has been handled */
|
host_packet_length = 0; /* Acknowledge to USART ISR the buffer has been handled */
|
||||||
|
|
||||||
} else if (host_packet_length < 0) { /* USART error */
|
} else if (host_packet_length < 0) { /* USART error */
|
||||||
|
ssize_t err = host_packet_length;
|
||||||
host_packet_length = 0; /* Acknowledge to USART ISR the error has been handled */
|
host_packet_length = 0; /* Acknowledge to USART ISR the error has been handled */
|
||||||
if (noise_state.handshake_state < HANDSHAKE_DONE_UNKNOWN_HOST) {
|
if (noise_state.handshake_state < HANDSHAKE_DONE_UNKNOWN_HOST) {
|
||||||
LOG_PRINTF("USART error, aborting handshake\n");
|
LOG_PRINTF("USART error, aborting handshake: %zd\n", err);
|
||||||
|
|
||||||
struct control_packet pkt = { .type=HOST_COMM_ERROR };
|
struct control_packet pkt = { .type=HOST_COMM_ERROR };
|
||||||
send_packet(usart2_out, (uint8_t *)&pkt, sizeof(pkt));
|
send_packet(uart4_out, (uint8_t *)&pkt, sizeof(pkt));
|
||||||
|
|
||||||
if (reset_protocol_handshake(&noise_state))
|
if (reset_protocol_handshake(&noise_state))
|
||||||
LOG_PRINTF("Error starting protocol handshake.\n");
|
LOG_PRINTF("Error starting protocol handshake.\n");
|
||||||
|
|
@ -666,15 +700,17 @@ int main(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (noise_state.handshake_state == HANDSHAKE_IN_PROGRESS) {
|
#if 0
|
||||||
|
if (noise_state.handshake_state == HANDSHAKE_PHASE1 || noise_state.handshake_state == HANDSHAKE_PHASE2) {
|
||||||
TRACING_SET(TR_NOISE_HANDSHAKE);
|
TRACING_SET(TR_NOISE_HANDSHAKE);
|
||||||
if (try_continue_noise_handshake(&noise_state, NULL, 0)) { /* handle outgoing messages */
|
if (try_continue_noise_handshake(&noise_state, NULL, 0)) { /* handle outgoing messages */
|
||||||
TRACING_CLEAR(TR_NOISE_HANDSHAKE);
|
TRACING_CLEAR(TR_NOISE_HANDSHAKE);
|
||||||
LOG_PRINTF("Reporting handshake error to host\n");
|
LOG_PRINTF("Reporting handshake error to host\n");
|
||||||
struct control_packet pkt = { .type=HOST_CRYPTO_ERROR };
|
struct control_packet pkt = { .type=HOST_CRYPTO_ERROR };
|
||||||
send_packet(usart2_out, (uint8_t *)&pkt, sizeof(pkt));
|
send_packet(uart4_out, (uint8_t *)&pkt, sizeof(pkt));
|
||||||
} else TRACING_CLEAR(TR_NOISE_HANDSHAKE);
|
} else TRACING_CLEAR(TR_NOISE_HANDSHAKE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -192,15 +192,15 @@ void uninit_handshake(struct NoiseState *st, enum handshake_state new_state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
requires validity: \valid(st) && \valid(usart2_out) && \valid(st->handshake);
|
requires validity: \valid(st) && \valid(uart4_out) && \valid(st->handshake);
|
||||||
requires validity: \valid(st->remote_key + (0..sizeof(st->remote_key)-1));
|
requires validity: \valid(st->remote_key + (0..sizeof(st->remote_key)-1));
|
||||||
requires validity: \valid(st->handshake_hash + (0..sizeof(st->handshake_hash)-1));
|
requires validity: \valid(st->handshake_hash + (0..sizeof(st->handshake_hash)-1));
|
||||||
|
|
||||||
requires separation: \separated(usart2_out, st, buf, st->handshake);
|
requires separation: \separated(uart4_out, st, buf, st->handshake);
|
||||||
|
|
||||||
ensures \result \in {-1, 0};
|
ensures \result \in {-1, 0};
|
||||||
|
|
||||||
assigns *usart2_out, *st->handshake;
|
assigns *uart4_out, *st->handshake;
|
||||||
@*/
|
@*/
|
||||||
int handshake_phase1(struct NoiseState * const st, uint8_t *buf, size_t len) {
|
int handshake_phase1(struct NoiseState * const st, uint8_t *buf, size_t len) {
|
||||||
int err;
|
int err;
|
||||||
|
|
@ -218,7 +218,7 @@ int handshake_phase1(struct NoiseState * const st, uint8_t *buf, size_t len) {
|
||||||
pkt.header.type = HOST_HANDSHAKE;
|
pkt.header.type = HOST_HANDSHAKE;
|
||||||
noise_buffer_set_output(noise_msg, &pkt.payload, sizeof(pkt.payload));
|
noise_buffer_set_output(noise_msg, &pkt.payload, sizeof(pkt.payload));
|
||||||
HANDLE_NOISE_ERROR(noise_handshakestate_write_message(st->handshake, &noise_msg, NULL), "writing handshake message");
|
HANDLE_NOISE_ERROR(noise_handshakestate_write_message(st->handshake, &noise_msg, NULL), "writing handshake message");
|
||||||
send_packet(usart2_out, (uint8_t *)&pkt, noise_msg.size + sizeof(pkt.header));
|
send_packet(uart4_out, (uint8_t *)&pkt, noise_msg.size + sizeof(pkt.header));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
errout: /* for HANDLE_NOISE_ERROR macro */
|
errout: /* for HANDLE_NOISE_ERROR macro */
|
||||||
|
|
@ -228,14 +228,14 @@ errout: /* for HANDLE_NOISE_ERROR macro */
|
||||||
//@ ghost int key_checked_trace;
|
//@ ghost int key_checked_trace;
|
||||||
//@ ghost int key_match_trace;
|
//@ ghost int key_match_trace;
|
||||||
/*@
|
/*@
|
||||||
requires validity: \valid(st) && \valid(usart2_out) && \valid(st->handshake);
|
requires validity: \valid(st) && \valid(uart4_out) && \valid(st->handshake);
|
||||||
requires validity: \valid(st->remote_key + (0..sizeof(st->remote_key)-1));
|
requires validity: \valid(st->remote_key + (0..sizeof(st->remote_key)-1));
|
||||||
requires validity: \valid_read(st->remote_key_reference + (0..sizeof(st->remote_key)-1));
|
requires validity: \valid_read(st->remote_key_reference + (0..sizeof(st->remote_key)-1));
|
||||||
requires validity: \valid(st->handshake_hash + (0..sizeof(st->handshake_hash)-1));
|
requires validity: \valid(st->handshake_hash + (0..sizeof(st->handshake_hash)-1));
|
||||||
requires separation: \separated(usart2_out, st);
|
requires separation: \separated(uart4_out, st);
|
||||||
requires sanity: 0 <= st->failed_handshakes < 100;
|
requires sanity: 0 <= st->failed_handshakes < 100;
|
||||||
|
|
||||||
requires separation: \separated(&usart2_out, st, buf, st->handshake);
|
requires separation: \separated(&uart4_out, st, buf, st->handshake);
|
||||||
|
|
||||||
ensures result: \result \in {-1, 0, 1};
|
ensures result: \result \in {-1, 0, 1};
|
||||||
ensures sanity: 0 <= st->failed_handshakes <= 102;
|
ensures sanity: 0 <= st->failed_handshakes <= 102;
|
||||||
|
|
@ -244,7 +244,7 @@ errout: /* for HANDLE_NOISE_ERROR macro */
|
||||||
ensures permission_valid: \result != -1 ==> key_checked_trace == 1;
|
ensures permission_valid: \result != -1 ==> key_checked_trace == 1;
|
||||||
ensures permission_valid: \result == 1 ==> key_match_trace == 1;
|
ensures permission_valid: \result == 1 ==> key_match_trace == 1;
|
||||||
//
|
//
|
||||||
assigns *usart2_out, *st, *st->handshake, key_checked_trace, key_match_trace;
|
assigns *uart4_out, *st, *st->handshake, key_checked_trace, key_match_trace;
|
||||||
@*/
|
@*/
|
||||||
int handshake_phase2(struct NoiseState * const st, uint8_t *buf, size_t len) {
|
int handshake_phase2(struct NoiseState * const st, uint8_t *buf, size_t len) {
|
||||||
//@ ghost int old_failed_handshakes = st->failed_handshakes;
|
//@ ghost int old_failed_handshakes = st->failed_handshakes;
|
||||||
|
|
@ -288,7 +288,7 @@ int handshake_phase2(struct NoiseState * const st, uint8_t *buf, size_t len) {
|
||||||
uint8_t remote_fp[BLAKE2S_HASH_SIZE];
|
uint8_t remote_fp[BLAKE2S_HASH_SIZE];
|
||||||
BLAKE2s_context_t bc;
|
BLAKE2s_context_t bc;
|
||||||
BLAKE2s_reset(&bc);
|
BLAKE2s_reset(&bc);
|
||||||
fc_BLAKE2s_update_uint8(&bc, st->remote_key, sizeof(st->remote_key));
|
BLAKE2s_update(&bc, st->remote_key, sizeof(st->remote_key));
|
||||||
BLAKE2s_finish(&bc, remote_fp);
|
BLAKE2s_finish(&bc, remote_fp);
|
||||||
|
|
||||||
//@ ghost key_checked_trace = 1;
|
//@ ghost key_checked_trace = 1;
|
||||||
|
|
@ -319,13 +319,13 @@ errout:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/*@
|
/*@
|
||||||
requires validity: \valid(st) && \valid(usart2_out) && \valid(st->handshake);
|
requires validity: \valid(st) && \valid(uart4_out) && \valid(st->handshake);
|
||||||
requires validity: \valid(st->remote_key + (0..sizeof(st->remote_key)-1));
|
requires validity: \valid(st->remote_key + (0..sizeof(st->remote_key)-1));
|
||||||
requires validity: \valid(st->remote_key_reference + (0..sizeof(st->remote_key)-1));
|
requires validity: \valid(st->remote_key_reference + (0..sizeof(st->remote_key)-1));
|
||||||
requires validity: \valid(st->handshake_hash + (0..sizeof(st->handshake_hash)-1));
|
requires validity: \valid(st->handshake_hash + (0..sizeof(st->handshake_hash)-1));
|
||||||
requires sanity: 0 <= st->failed_handshakes < 100;
|
requires sanity: 0 <= st->failed_handshakes < 100;
|
||||||
|
|
||||||
requires separation: \separated(usart2_out, st, buf, st->handshake);
|
requires separation: \separated(uart4_out, st, buf, st->handshake);
|
||||||
|
|
||||||
ensures result: \result \in {0, -1};
|
ensures result: \result \in {0, -1};
|
||||||
|
|
||||||
|
|
@ -343,7 +343,7 @@ errout:
|
||||||
|
|
||||||
ensures state_advance_condition: (st->handshake_state == HANDSHAKE_DONE_KNOWN_HOST) ==> key_match_trace == 1;
|
ensures state_advance_condition: (st->handshake_state == HANDSHAKE_DONE_KNOWN_HOST) ==> key_match_trace == 1;
|
||||||
|
|
||||||
//assigns *usart2_out, *st, *st->rx_cipher, *st->tx_cipher, *st->handshake;
|
//assigns *uart4_out, *st, *st->rx_cipher, *st->tx_cipher, *st->handshake;
|
||||||
//assigns key_checked_trace, key_match_trace;
|
//assigns key_checked_trace, key_match_trace;
|
||||||
@*/
|
@*/
|
||||||
int try_continue_noise_handshake(struct NoiseState * const st, uint8_t *buf, size_t len) {
|
int try_continue_noise_handshake(struct NoiseState * const st, uint8_t *buf, size_t len) {
|
||||||
|
|
@ -400,18 +400,18 @@ errout:
|
||||||
void persist_remote_key(struct NoiseState *st) {
|
void persist_remote_key(struct NoiseState *st) {
|
||||||
BLAKE2s_context_t bc;
|
BLAKE2s_context_t bc;
|
||||||
BLAKE2s_reset(&bc);
|
BLAKE2s_reset(&bc);
|
||||||
fc_BLAKE2s_update_uint8(&bc, st->remote_key, sizeof(st->remote_key));
|
BLAKE2s_update(&bc, st->remote_key, sizeof(st->remote_key));
|
||||||
BLAKE2s_finish(&bc, st->remote_key_reference);
|
BLAKE2s_finish(&bc, st->remote_key_reference);
|
||||||
st->handshake_state = HANDSHAKE_DONE_KNOWN_HOST;
|
st->handshake_state = HANDSHAKE_DONE_KNOWN_HOST;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
requires validity: \valid(st) && \valid(usart2_out) && \valid(st->tx_cipher) && \valid_read(msg + (0..len-1));
|
requires validity: \valid(st) && \valid(uart4_out) && \valid(st->tx_cipher) && \valid_read(msg + (0..len-1));
|
||||||
requires separation: \separated(usart2_out, st);
|
requires separation: \separated(uart4_out, st);
|
||||||
|
|
||||||
ensures length: !(0 <= len <= MAX_HOST_PACKET_SIZE) <==> \result == -3;
|
ensures length: !(0 <= len <= MAX_HOST_PACKET_SIZE) <==> \result == -3;
|
||||||
ensures \result \in {0, -1, -2, -3};
|
ensures \result \in {0, -1, -2, -3};
|
||||||
assigns *st->tx_cipher, *usart2_out;
|
assigns *st->tx_cipher, *uart4_out;
|
||||||
*/
|
*/
|
||||||
int send_encrypted_message(struct NoiseState *st, const uint8_t *msg, size_t len) {
|
int send_encrypted_message(struct NoiseState *st, const uint8_t *msg, size_t len) {
|
||||||
int err;
|
int err;
|
||||||
|
|
@ -436,7 +436,7 @@ int send_encrypted_message(struct NoiseState *st, const uint8_t *msg, size_t len
|
||||||
noise_buffer_set_inout(noise_buf, pkt.payload, len, sizeof(pkt.payload));
|
noise_buffer_set_inout(noise_buf, pkt.payload, len, sizeof(pkt.payload));
|
||||||
|
|
||||||
HANDLE_NOISE_ERROR(noise_cipherstate_encrypt(st->tx_cipher, &noise_buf), "encrypting data");
|
HANDLE_NOISE_ERROR(noise_cipherstate_encrypt(st->tx_cipher, &noise_buf), "encrypting data");
|
||||||
send_packet(usart2_out, (uint8_t *)&pkt, noise_buf.size + sizeof(pkt.header));
|
send_packet(uart4_out, (uint8_t *)&pkt, noise_buf.size + sizeof(pkt.header));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
errout:
|
errout:
|
||||||
|
|
|
||||||
|
|
@ -12,54 +12,54 @@
|
||||||
volatile struct {
|
volatile struct {
|
||||||
struct dma_buf dma;
|
struct dma_buf dma;
|
||||||
uint8_t data[256];
|
uint8_t data[256];
|
||||||
} usart2_buf = { .dma = { .len = sizeof(usart2_buf.data) } };
|
} uart4_buf = { .dma = { .len = sizeof(uart4_buf.data) } };
|
||||||
|
|
||||||
struct dma_usart_file usart2_out_s = {
|
struct dma_usart_file uart4_out_s = {
|
||||||
.usart = USART2,
|
.usart = UART4,
|
||||||
.baudrate = 115200,
|
.baudrate = 115200,
|
||||||
.dma = DMA1,
|
.dma = DMA1,
|
||||||
.stream = 6,
|
.stream = 4,
|
||||||
.channel = 4,
|
.channel = 4,
|
||||||
.irqn = NVIC_DMA_IRQ(1, 6),
|
.irqn = NVIC_DMA_IRQ(1, 4),
|
||||||
.buf = &usart2_buf.dma
|
.buf = &uart4_buf.dma
|
||||||
};
|
};
|
||||||
struct dma_usart_file *usart2_out = &usart2_out_s;
|
struct dma_usart_file *uart4_out = &uart4_out_s;
|
||||||
|
|
||||||
void dma1_stream6_isr(void) {
|
void dma1_stream4_isr(void) {
|
||||||
TRACING_SET(TR_HOST_IF_DMA_IRQ);
|
TRACING_SET(TR_HOST_IF_DMA_IRQ);
|
||||||
static unsigned int fifo_errors = 0; /* debug */
|
static unsigned int fifo_errors = 0; /* debug */
|
||||||
if (dma_get_interrupt_flag(usart2_out->dma, usart2_out->stream, DMA_FEIF)) {
|
if (dma_get_interrupt_flag(uart4_out->dma, uart4_out->stream, DMA_FEIF)) {
|
||||||
/* Ignore FIFO errors as they're 100% non-critical for UART applications */
|
/* Ignore FIFO errors as they're 100% non-critical for UART applications */
|
||||||
dma_clear_interrupt_flags(usart2_out->dma, usart2_out->stream, DMA_FEIF);
|
dma_clear_interrupt_flags(uart4_out->dma, uart4_out->stream, DMA_FEIF);
|
||||||
fifo_errors++;
|
fifo_errors++;
|
||||||
TRACING_CLEAR(TR_HOST_IF_DMA_IRQ);
|
TRACING_CLEAR(TR_HOST_IF_DMA_IRQ);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Transfer complete interrupt */
|
/* Transfer complete interrupt */
|
||||||
dma_clear_interrupt_flags(usart2_out->dma, usart2_out->stream, DMA_TCIF);
|
dma_clear_interrupt_flags(uart4_out->dma, uart4_out->stream, DMA_TCIF);
|
||||||
|
|
||||||
if (usart2_out->buf->wr_pos != usart2_out->buf->xfr_end) /* buffer not empty */
|
if (uart4_out->buf->wr_pos != uart4_out->buf->xfr_end) /* buffer not empty */
|
||||||
schedule_dma(usart2_out);
|
schedule_dma(uart4_out);
|
||||||
TRACING_CLEAR(TR_HOST_IF_DMA_IRQ);
|
TRACING_CLEAR(TR_HOST_IF_DMA_IRQ);
|
||||||
}
|
}
|
||||||
|
|
||||||
void usart2_isr(void) {
|
void uart4_isr(void) {
|
||||||
TRACING_SET(TR_HOST_IF_USART_IRQ);
|
TRACING_SET(TR_HOST_IF_USART_IRQ);
|
||||||
static struct cobs_decode_state host_cobs_state = {0};
|
static struct cobs_decode_state host_cobs_state = {0};
|
||||||
if (USART2_SR & USART_SR_ORE) { /* Overrun handling */
|
if (UART4_SR & USART_SR_ORE) { /* Overrun handling */
|
||||||
LOG_PRINTF("USART2 data register overrun\n");
|
LOG_PRINTF("UART4 data register overrun\n");
|
||||||
/* Clear interrupt flag */
|
/* Clear interrupt flag */
|
||||||
(void)USART2_DR; /* FIXME make sure this read is not optimized out */
|
(void)UART4_DR; /* FIXME make sure this read is not optimized out */
|
||||||
host_packet_length = -1;
|
host_packet_length = -1;
|
||||||
TRACING_CLEAR(TR_HOST_IF_USART_IRQ);
|
TRACING_CLEAR(TR_HOST_IF_USART_IRQ);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t data = USART2_DR; /* This automatically acknowledges the IRQ */
|
uint8_t data = UART4_DR; /* This automatically acknowledges the IRQ */
|
||||||
|
|
||||||
if (host_packet_length) {
|
if (host_packet_length) {
|
||||||
LOG_PRINTF("USART2 COBS buffer overrun\n");
|
LOG_PRINTF("UART4 COBS buffer overrun\n");
|
||||||
host_packet_length = -1;
|
host_packet_length = -1;
|
||||||
TRACING_CLEAR(TR_HOST_IF_USART_IRQ);
|
TRACING_CLEAR(TR_HOST_IF_USART_IRQ);
|
||||||
return;
|
return;
|
||||||
|
|
@ -78,7 +78,7 @@ void usart2_isr(void) {
|
||||||
} else if (rv == -3) {
|
} else if (rv == -3) {
|
||||||
/* invalid empty frame */
|
/* invalid empty frame */
|
||||||
LOG_PRINTF("Got double null byte from host\n");
|
LOG_PRINTF("Got double null byte from host\n");
|
||||||
host_packet_length = -1;
|
/* FIXME DEBUG host_packet_length = -1; */
|
||||||
} else if (rv == -4) {
|
} else if (rv == -4) {
|
||||||
/* frame too large */
|
/* frame too large */
|
||||||
LOG_PRINTF("Got too large frame from host\n");
|
LOG_PRINTF("Got too large frame from host\n");
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#include "usart_helpers.h"
|
#include "usart_helpers.h"
|
||||||
|
|
||||||
|
|
||||||
extern struct dma_usart_file *usart2_out;
|
extern struct dma_usart_file *uart4_out;
|
||||||
|
|
||||||
enum control_packet_types {
|
enum control_packet_types {
|
||||||
_HOST_RESERVED = 0,
|
_HOST_RESERVED = 0,
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <usbh_core.h>
|
||||||
|
|
||||||
#include <libopencm3/stm32/f4/rng.h>
|
#include <libopencm3/stm32/f4/rng.h>
|
||||||
|
|
||||||
#include "usart_helpers.h"
|
#include "usart_helpers.h"
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <libopencm3/stm32/otg_hs.h>
|
#include <libopencm3/usb/dwc/otg_hs.h>
|
||||||
#include <libopencm3/stm32/otg_fs.h>
|
#include <libopencm3/usb/dwc/otg_fs.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
512
fw/src/words.c
512
fw/src/words.c
|
|
@ -261,261 +261,261 @@ const char * const even[256] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const char * const odd[256] = {
|
const char * const odd[256] = {
|
||||||
"aardvark", /* 00 */
|
"adroitness", /* 00 */
|
||||||
"absurd", /* 01 */
|
"adviser", /* 01 */
|
||||||
"accrue", /* 02 */
|
"aftermath", /* 02 */
|
||||||
"acme", /* 03 */
|
"aggregate", /* 03 */
|
||||||
"adrift", /* 04 */
|
"alkali", /* 04 */
|
||||||
"adult", /* 05 */
|
"almighty", /* 05 */
|
||||||
"afflict", /* 06 */
|
"amulet", /* 06 */
|
||||||
"ahead", /* 07 */
|
"amusement", /* 07 */
|
||||||
"aimless", /* 08 */
|
"antenna", /* 08 */
|
||||||
"Algol", /* 09 */
|
"applicant", /* 09 */
|
||||||
"allow", /* 0A */
|
"Apollo", /* 0A */
|
||||||
"alone", /* 0B */
|
"armistice", /* 0B */
|
||||||
"ammo", /* 0C */
|
"article", /* 0C */
|
||||||
"ancient", /* 0D */
|
"asteroid", /* 0D */
|
||||||
"apple", /* 0E */
|
"Atlantic", /* 0E */
|
||||||
"artist", /* 0F */
|
"atmosphere", /* 0F */
|
||||||
"assume", /* 10 */
|
"autopsy", /* 10 */
|
||||||
"Athens", /* 11 */
|
"Babylon", /* 11 */
|
||||||
"atlas", /* 12 */
|
"backwater", /* 12 */
|
||||||
"Aztec", /* 13 */
|
"barbecue", /* 13 */
|
||||||
"baboon", /* 14 */
|
"belowground", /* 14 */
|
||||||
"backfield", /* 15 */
|
"bifocals", /* 15 */
|
||||||
"backward", /* 16 */
|
"bodyguard", /* 16 */
|
||||||
"banjo", /* 17 */
|
"bookseller", /* 17 */
|
||||||
"beaming", /* 18 */
|
"borderline", /* 18 */
|
||||||
"bedlamp", /* 19 */
|
"bottomless", /* 19 */
|
||||||
"beehive", /* 1A */
|
"Bradbury", /* 1A */
|
||||||
"beeswax", /* 1B */
|
"bravado", /* 1B */
|
||||||
"befriend", /* 1C */
|
"Brazilian", /* 1C */
|
||||||
"Belfast", /* 1D */
|
"breakaway", /* 1D */
|
||||||
"berserk", /* 1E */
|
"Burlington", /* 1E */
|
||||||
"billiard", /* 1F */
|
"businessman", /* 1F */
|
||||||
"bison", /* 20 */
|
"butterfat", /* 20 */
|
||||||
"blackjack", /* 21 */
|
"Camelot", /* 21 */
|
||||||
"blockade", /* 22 */
|
"candidate", /* 22 */
|
||||||
"blowtorch", /* 23 */
|
"cannonball", /* 23 */
|
||||||
"bluebird", /* 24 */
|
"Capricorn", /* 24 */
|
||||||
"bombast", /* 25 */
|
"caravan", /* 25 */
|
||||||
"bookshelf", /* 26 */
|
"caretaker", /* 26 */
|
||||||
"brackish", /* 27 */
|
"celebrate", /* 27 */
|
||||||
"breadline", /* 28 */
|
"cellulose", /* 28 */
|
||||||
"breakup", /* 29 */
|
"certify", /* 29 */
|
||||||
"brickyard", /* 2A */
|
"chambermaid", /* 2A */
|
||||||
"briefcase", /* 2B */
|
"Cherokee", /* 2B */
|
||||||
"Burbank", /* 2C */
|
"Chicago", /* 2C */
|
||||||
"button", /* 2D */
|
"clergyman", /* 2D */
|
||||||
"buzzard", /* 2E */
|
"coherence", /* 2E */
|
||||||
"cement", /* 2F */
|
"combustion", /* 2F */
|
||||||
"chairlift", /* 30 */
|
"commando", /* 30 */
|
||||||
"chatter", /* 31 */
|
"company", /* 31 */
|
||||||
"checkup", /* 32 */
|
"component", /* 32 */
|
||||||
"chisel", /* 33 */
|
"concurrent", /* 33 */
|
||||||
"choking", /* 34 */
|
"confidence", /* 34 */
|
||||||
"chopper", /* 35 */
|
"conformist", /* 35 */
|
||||||
"Christmas", /* 36 */
|
"congregate", /* 36 */
|
||||||
"clamshell", /* 37 */
|
"consensus", /* 37 */
|
||||||
"classic", /* 38 */
|
"consulting", /* 38 */
|
||||||
"classroom", /* 39 */
|
"corporate", /* 39 */
|
||||||
"cleanup", /* 3A */
|
"corrosion", /* 3A */
|
||||||
"clockwork", /* 3B */
|
"councilman", /* 3B */
|
||||||
"cobra", /* 3C */
|
"crossover", /* 3C */
|
||||||
"commence", /* 3D */
|
"crucifix", /* 3D */
|
||||||
"concert", /* 3E */
|
"cumbersome", /* 3E */
|
||||||
"cowbell", /* 3F */
|
"customer", /* 3F */
|
||||||
"crackdown", /* 40 */
|
"Dakota", /* 40 */
|
||||||
"cranky", /* 41 */
|
"decadence", /* 41 */
|
||||||
"crowfoot", /* 42 */
|
"December", /* 42 */
|
||||||
"crucial", /* 43 */
|
"decimal", /* 43 */
|
||||||
"crumpled", /* 44 */
|
"designing", /* 44 */
|
||||||
"crusade", /* 45 */
|
"detector", /* 45 */
|
||||||
"cubic", /* 46 */
|
"detergent", /* 46 */
|
||||||
"dashboard", /* 47 */
|
"determine", /* 47 */
|
||||||
"deadbolt", /* 48 */
|
"dictator", /* 48 */
|
||||||
"deckhand", /* 49 */
|
"dinosaur", /* 49 */
|
||||||
"dogsled", /* 4A */
|
"direction", /* 4A */
|
||||||
"dragnet", /* 4B */
|
"disable", /* 4B */
|
||||||
"drainage", /* 4C */
|
"disbelief", /* 4C */
|
||||||
"dreadful", /* 4D */
|
"disruptive", /* 4D */
|
||||||
"drifter", /* 4E */
|
"distortion", /* 4E */
|
||||||
"dropper", /* 4F */
|
"document", /* 4F */
|
||||||
"drumbeat", /* 50 */
|
"embezzle", /* 50 */
|
||||||
"drunken", /* 51 */
|
"enchanting", /* 51 */
|
||||||
"Dupont", /* 52 */
|
"enrollment", /* 52 */
|
||||||
"dwelling", /* 53 */
|
"enterprise", /* 53 */
|
||||||
"eating", /* 54 */
|
"equation", /* 54 */
|
||||||
"edict", /* 55 */
|
"equipment", /* 55 */
|
||||||
"egghead", /* 56 */
|
"escapade", /* 56 */
|
||||||
"eightball", /* 57 */
|
"Eskimo", /* 57 */
|
||||||
"endorse", /* 58 */
|
"everyday", /* 58 */
|
||||||
"endow", /* 59 */
|
"examine", /* 59 */
|
||||||
"enlist", /* 5A */
|
"existence", /* 5A */
|
||||||
"erase", /* 5B */
|
"exodus", /* 5B */
|
||||||
"escape", /* 5C */
|
"fascinate", /* 5C */
|
||||||
"exceed", /* 5D */
|
"filament", /* 5D */
|
||||||
"eyeglass", /* 5E */
|
"finicky", /* 5E */
|
||||||
"eyetooth", /* 5F */
|
"forever", /* 5F */
|
||||||
"facial", /* 60 */
|
"fortitude", /* 60 */
|
||||||
"fallout", /* 61 */
|
"frequency", /* 61 */
|
||||||
"flagpole", /* 62 */
|
"gadgetry", /* 62 */
|
||||||
"flatfoot", /* 63 */
|
"Galveston", /* 63 */
|
||||||
"flytrap", /* 64 */
|
"getaway", /* 64 */
|
||||||
"fracture", /* 65 */
|
"glossary", /* 65 */
|
||||||
"framework", /* 66 */
|
"gossamer", /* 66 */
|
||||||
"freedom", /* 67 */
|
"graduate", /* 67 */
|
||||||
"frighten", /* 68 */
|
"gravity", /* 68 */
|
||||||
"gazelle", /* 69 */
|
"guitarist", /* 69 */
|
||||||
"Geiger", /* 6A */
|
"hamburger", /* 6A */
|
||||||
"glitter", /* 6B */
|
"Hamilton", /* 6B */
|
||||||
"glucose", /* 6C */
|
"handiwork", /* 6C */
|
||||||
"goggles", /* 6D */
|
"hazardous", /* 6D */
|
||||||
"goldfish", /* 6E */
|
"headwaters", /* 6E */
|
||||||
"gremlin", /* 6F */
|
"hemisphere", /* 6F */
|
||||||
"guidance", /* 70 */
|
"hesitate", /* 70 */
|
||||||
"hamlet", /* 71 */
|
"hideaway", /* 71 */
|
||||||
"highchair", /* 72 */
|
"holiness", /* 72 */
|
||||||
"hockey", /* 73 */
|
"hurricane", /* 73 */
|
||||||
"indoors", /* 74 */
|
"hydraulic", /* 74 */
|
||||||
"indulge", /* 75 */
|
"impartial", /* 75 */
|
||||||
"inverse", /* 76 */
|
"impetus", /* 76 */
|
||||||
"involve", /* 77 */
|
"inception", /* 77 */
|
||||||
"island", /* 78 */
|
"indigo", /* 78 */
|
||||||
"jawbone", /* 79 */
|
"inertia", /* 79 */
|
||||||
"keyboard", /* 7A */
|
"infancy", /* 7A */
|
||||||
"kickoff", /* 7B */
|
"inferno", /* 7B */
|
||||||
"kiwi", /* 7C */
|
"informant", /* 7C */
|
||||||
"klaxon", /* 7D */
|
"insincere", /* 7D */
|
||||||
"locale", /* 7E */
|
"insurgent", /* 7E */
|
||||||
"lockup", /* 7F */
|
"integrate", /* 7F */
|
||||||
"merit", /* 80 */
|
"intention", /* 80 */
|
||||||
"minnow", /* 81 */
|
"inventive", /* 81 */
|
||||||
"miser", /* 82 */
|
"Istanbul", /* 82 */
|
||||||
"Mohawk", /* 83 */
|
"Jamaica", /* 83 */
|
||||||
"mural", /* 84 */
|
"Jupiter", /* 84 */
|
||||||
"music", /* 85 */
|
"leprosy", /* 85 */
|
||||||
"necklace", /* 86 */
|
"letterhead", /* 86 */
|
||||||
"Neptune", /* 87 */
|
"liberty", /* 87 */
|
||||||
"newborn", /* 88 */
|
"maritime", /* 88 */
|
||||||
"nightbird", /* 89 */
|
"matchmaker", /* 89 */
|
||||||
"Oakland", /* 8A */
|
"maverick", /* 8A */
|
||||||
"obtuse", /* 8B */
|
"Medusa", /* 8B */
|
||||||
"offload", /* 8C */
|
"megaton", /* 8C */
|
||||||
"optic", /* 8D */
|
"microscope", /* 8D */
|
||||||
"orca", /* 8E */
|
"microwave", /* 8E */
|
||||||
"payday", /* 8F */
|
"midsummer", /* 8F */
|
||||||
"peachy", /* 90 */
|
"millionaire", /* 90 */
|
||||||
"pheasant", /* 91 */
|
"miracle", /* 91 */
|
||||||
"physique", /* 92 */
|
"misnomer", /* 92 */
|
||||||
"playhouse", /* 93 */
|
"molasses", /* 93 */
|
||||||
"Pluto", /* 94 */
|
"molecule", /* 94 */
|
||||||
"preclude", /* 95 */
|
"Montana", /* 95 */
|
||||||
"prefer", /* 96 */
|
"monument", /* 96 */
|
||||||
"preshrunk", /* 97 */
|
"mosquito", /* 97 */
|
||||||
"printer", /* 98 */
|
"narrative", /* 98 */
|
||||||
"prowler", /* 99 */
|
"nebula", /* 99 */
|
||||||
"pupil", /* 9A */
|
"newsletter", /* 9A */
|
||||||
"puppy", /* 9B */
|
"Norwegian", /* 9B */
|
||||||
"python", /* 9C */
|
"October", /* 9C */
|
||||||
"quadrant", /* 9D */
|
"Ohio", /* 9D */
|
||||||
"quiver", /* 9E */
|
"onlooker", /* 9E */
|
||||||
"quota", /* 9F */
|
"opulent", /* 9F */
|
||||||
"ragtime", /* A0 */
|
"Orlando", /* A0 */
|
||||||
"ratchet", /* A1 */
|
"outfielder", /* A1 */
|
||||||
"rebirth", /* A2 */
|
"Pacific", /* A2 */
|
||||||
"reform", /* A3 */
|
"pandemic", /* A3 */
|
||||||
"regain", /* A4 */
|
"Pandora", /* A4 */
|
||||||
"reindeer", /* A5 */
|
"paperweight", /* A5 */
|
||||||
"rematch", /* A6 */
|
"paragon", /* A6 */
|
||||||
"repay", /* A7 */
|
"paragraph", /* A7 */
|
||||||
"retouch", /* A8 */
|
"paramount", /* A8 */
|
||||||
"revenge", /* A9 */
|
"passenger", /* A9 */
|
||||||
"reward", /* AA */
|
"pedigree", /* AA */
|
||||||
"rhythm", /* AB */
|
"Pegasus", /* AB */
|
||||||
"ribcage", /* AC */
|
"penetrate", /* AC */
|
||||||
"ringbolt", /* AD */
|
"perceptive", /* AD */
|
||||||
"robust", /* AE */
|
"performance", /* AE */
|
||||||
"rocker", /* AF */
|
"pharmacy", /* AF */
|
||||||
"ruffled", /* B0 */
|
"phonetic", /* B0 */
|
||||||
"sailboat", /* B1 */
|
"photograph", /* B1 */
|
||||||
"sawdust", /* B2 */
|
"pioneer", /* B2 */
|
||||||
"scallion", /* B3 */
|
"pocketful", /* B3 */
|
||||||
"scenic", /* B4 */
|
"politeness", /* B4 */
|
||||||
"scorecard", /* B5 */
|
"positive", /* B5 */
|
||||||
"Scotland", /* B6 */
|
"potato", /* B6 */
|
||||||
"seabird", /* B7 */
|
"processor", /* B7 */
|
||||||
"select", /* B8 */
|
"provincial", /* B8 */
|
||||||
"sentence", /* B9 */
|
"proximate", /* B9 */
|
||||||
"shadow", /* BA */
|
"puberty", /* BA */
|
||||||
"shamrock", /* BB */
|
"publisher", /* BB */
|
||||||
"showgirl", /* BC */
|
"pyramid", /* BC */
|
||||||
"skullcap", /* BD */
|
"quantity", /* BD */
|
||||||
"skydive", /* BE */
|
"racketeer", /* BE */
|
||||||
"slingshot", /* BF */
|
"rebellion", /* BF */
|
||||||
"slowdown", /* C0 */
|
"recipe", /* C0 */
|
||||||
"snapline", /* C1 */
|
"recover", /* C1 */
|
||||||
"snapshot", /* C2 */
|
"repellent", /* C2 */
|
||||||
"snowcap", /* C3 */
|
"replica", /* C3 */
|
||||||
"snowslide", /* C4 */
|
"reproduce", /* C4 */
|
||||||
"solo", /* C5 */
|
"resistor", /* C5 */
|
||||||
"southward", /* C6 */
|
"responsive", /* C6 */
|
||||||
"soybean", /* C7 */
|
"retraction", /* C7 */
|
||||||
"spaniel", /* C8 */
|
"retrieval", /* C8 */
|
||||||
"spearhead", /* C9 */
|
"retrospect", /* C9 */
|
||||||
"spellbind", /* CA */
|
"revenue", /* CA */
|
||||||
"spheroid", /* CB */
|
"revival", /* CB */
|
||||||
"spigot", /* CC */
|
"revolver", /* CC */
|
||||||
"spindle", /* CD */
|
"sandalwood", /* CD */
|
||||||
"spyglass", /* CE */
|
"sardonic", /* CE */
|
||||||
"stagehand", /* CF */
|
"Saturday", /* CF */
|
||||||
"stagnate", /* D0 */
|
"savagery", /* D0 */
|
||||||
"stairway", /* D1 */
|
"scavenger", /* D1 */
|
||||||
"standard", /* D2 */
|
"sensation", /* D2 */
|
||||||
"stapler", /* D3 */
|
"sociable", /* D3 */
|
||||||
"steamship", /* D4 */
|
"souvenir", /* D4 */
|
||||||
"sterling", /* D5 */
|
"specialist", /* D5 */
|
||||||
"stockman", /* D6 */
|
"speculate", /* D6 */
|
||||||
"stopwatch", /* D7 */
|
"stethoscope", /* D7 */
|
||||||
"stormy", /* D8 */
|
"stupendous", /* D8 */
|
||||||
"sugar", /* D9 */
|
"supportive", /* D9 */
|
||||||
"surmount", /* DA */
|
"surrender", /* DA */
|
||||||
"suspense", /* DB */
|
"suspicious", /* DB */
|
||||||
"sweatband", /* DC */
|
"sympathy", /* DC */
|
||||||
"swelter", /* DD */
|
"tambourine", /* DD */
|
||||||
"tactics", /* DE */
|
"telephone", /* DE */
|
||||||
"talon", /* DF */
|
"therapist", /* DF */
|
||||||
"tapeworm", /* E0 */
|
"tobacco", /* E0 */
|
||||||
"tempest", /* E1 */
|
"tolerance", /* E1 */
|
||||||
"tiger", /* E2 */
|
"tomorrow", /* E2 */
|
||||||
"tissue", /* E3 */
|
"torpedo", /* E3 */
|
||||||
"tonic", /* E4 */
|
"tradition", /* E4 */
|
||||||
"topmost", /* E5 */
|
"travesty", /* E5 */
|
||||||
"tracker", /* E6 */
|
"trombonist", /* E6 */
|
||||||
"transit", /* E7 */
|
"truncated", /* E7 */
|
||||||
"trauma", /* E8 */
|
"typewriter", /* E8 */
|
||||||
"treadmill", /* E9 */
|
"ultimate", /* E9 */
|
||||||
"Trojan", /* EA */
|
"undaunted", /* EA */
|
||||||
"trouble", /* EB */
|
"underfoot", /* EB */
|
||||||
"tumor", /* EC */
|
"unicorn", /* EC */
|
||||||
"tunnel", /* ED */
|
"unify", /* ED */
|
||||||
"tycoon", /* EE */
|
"universe", /* EE */
|
||||||
"uncut", /* EF */
|
"unravel", /* EF */
|
||||||
"unearth", /* F0 */
|
"upcoming", /* F0 */
|
||||||
"unwind", /* F1 */
|
"vacancy", /* F1 */
|
||||||
"uproot", /* F2 */
|
"vagabond", /* F2 */
|
||||||
"upset", /* F3 */
|
"vertigo", /* F3 */
|
||||||
"upshot", /* F4 */
|
"Virginia", /* F4 */
|
||||||
"vapor", /* F5 */
|
"visitor", /* F5 */
|
||||||
"village", /* F6 */
|
"vocalist", /* F6 */
|
||||||
"virus", /* F7 */
|
"voyager", /* F7 */
|
||||||
"Vulcan", /* F8 */
|
"warranty", /* F8 */
|
||||||
"waffle", /* F9 */
|
"Waterloo", /* F9 */
|
||||||
"wallet", /* FA */
|
"whimsical", /* FA */
|
||||||
"watchword", /* FB */
|
"Wichita", /* FB */
|
||||||
"wayside", /* FC */
|
"Wilmington", /* FC */
|
||||||
"willow", /* FD */
|
"Wyoming", /* FD */
|
||||||
"woodlark", /* FE */
|
"yesteryear", /* FE */
|
||||||
"Zulu", /* FF */
|
"Yucatan" /* FF */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
1
fw/upstream/PyCortexMDebug
Submodule
1
fw/upstream/PyCortexMDebug
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 72134885be981628d8c224aa6ddced508cae715a
|
||||||
1
fw/upstream/stm32square
Submodule
1
fw/upstream/stm32square
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 81bd97f26ed9f73555e8f6bb9220f316c9860ed8
|
||||||
Loading…
Add table
Add a link
Reference in a new issue