From 08dc4e3c9e1aebe7f8be489f27a276dec80cb286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sat, 2 Apr 2022 04:03:55 +0200 Subject: [PATCH] add readme & switch to production build --- Makefile | 2 +- README.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/Makefile b/Makefile index 167957d..746752d 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ TARGET = bluepill-i2c-gw # debug build? DEBUG = 1 # optimization -OPT = -Og +OPT = -Os ####################################### diff --git a/README.md b/README.md new file mode 100644 index 0000000..e5c2753 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# Bluepill USB-I2C gateway + +## Hardware + +This is a firmware for STM32F103R8T6 Bluepill. + +## Customization + +The project can be customized using STM32CubeMX. + +there's some changes in the i2c HAL driver, careful! + +line 6364 + +``` + // HACK - ignore HAL_I2C_ERROR_AF + if (hi2c->ErrorCode != HAL_I2C_ERROR_NONE && hi2c->ErrorCode != HAL_I2C_ERROR_AF) +``` + +this allows receiving frames of unknown length + +## Building & programming + +use the makefile and flash using a st-link dongle. + +Requires: Make, arm-none-eabi-gcc, st-flash + +``` +make -j +make flash +``` +