Compare commits

...

3 Commits

Author SHA1 Message Date
QMK Bot
e57d703d50 Merge remote-tracking branch 'origin/master' into develop 2023-01-12 11:30:07 +00:00
Tom Barnes
0cff636739
weact docs patch re "security vulnerability" (#19572) 2023-01-12 22:29:25 +11:00
Stefan Kerkmann
ec09087543
Update ChibiOS[-Contrib], SIO driver, configs (#17915)
Co-authored-by: Nick Brassel <nick@tzarc.org>
2023-01-12 21:47:36 +11:00
12 changed files with 44 additions and 47 deletions

View File

@ -4,7 +4,7 @@ This document applies to the F401- and F411-based Blackpills.
The WeAct Blackpill is a popular choice for handwired boards, as it offers a powerful micro controller, USB Type C, a good number of pins to use, and a large amount of firmware space. All for a ~$6 USD price tag.
* [WeAct GitHub for F4x1 Blackpill](https://github.com/WeActTC/MiniSTM32F4x1)
* [WeAct GitHub for F4x1 Blackpill](https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1)
* Unfortunately, due to supply issues official WeAct F411 based blackpills may not be available.
![Blackpill F411](https://i.imgur.com/nCgeolTh.png)

View File

@ -17,7 +17,7 @@ Basic guide how to build 6x6 board is in root keyboard dir. This will help you t
If you want to use 5thumb cluster or stm32, you also should read base guide, but please came back here after you finish 😉.
For my build I used stm32f411 black pill. It's pretty cheap board and I highly recommend you to buy one from official distributors, to support board creators. [To buy it, please go into designer site](https://github.com/WeActTC/MiniSTM32F4x1).
For my build I used stm32f411 black pill. It's pretty cheap board and I highly recommend you to buy one from official distributors, to support board creators. [To buy it, please go into designer site](https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1).
I recommend using stm32 boards for this project, because QMK recently added support for [tinyuf2 bootloader](https://github.com/adafruit/tinyuf2). This bootloader is great for cases where you are going to use QMK Configurator and don't want to use any command line interface. This way when you need change keyboard layout, you only need an UF2 file. Setting up board in boot mode will allow you to drag and drop it on to created STM32F flash drive.
![BlackPill Schematic](blackpill_f411/STM32F4x1_PinoutDiagram_RichardBalint.png "Schematic of stm32f4 blackpill")

View File

@ -3,7 +3,7 @@
![](https://cdn.shopify.com/s/files/1/0374/9448/9228/files/Dygma-Raise-Hero2.png)
* Keyboard Maintainer: [ibash](https://github.com/ibash)
* Hardware Supported: [F411 Blackpill](https://github.com/WeActTC/MiniSTM32F4x1) with the [Dygma Raise](http://www.dygma.com)
* Hardware Supported: [F411 Blackpill](https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1) with the [Dygma Raise](http://www.dygma.com)
* Hardware Availability: See below

View File

@ -11,7 +11,7 @@
* SSD1306 OLED display (128x64) using PB6 and PB7 on I2C1
* Keyboard Maintainer: [Drashna Jael're](https://github.com/drashna)
* Hardware Supported: [Design files](https://gitlab.com/keyboards1/dm_r_track/-/tree/master/boolean), [WeAct BlackPill (F411)](https://github.com/WeActTC/MiniSTM32F4x1), [PMW3360 Optical Sensor](https://www.tindie.com/products/jkicklighter/pmw3360-motion-sensor/)
* Hardware Supported: [Design files](https://gitlab.com/keyboards1/dm_r_track/-/tree/master/boolean), [WeAct BlackPill (F411)](https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1), [PMW3360 Optical Sensor](https://www.tindie.com/products/jkicklighter/pmw3360-motion-sensor/)
Make example for this keyboard (after setting up your build environment):

View File

@ -19,7 +19,7 @@
## Keyboard Info
* Keyboard Maintainer: [Drashna Jael're](https://github.com/drashna)
* Hardware Supported: [Design files](https://gitlab.com/keyboards1/dm_r_track/-/tree/master/boolean), [WeAct BlackPill (F411)](https://github.com/WeActTC/MiniSTM32F4x1), [PMW3360 Optical Sensor](https://www.tindie.com/products/jkicklighter/pmw3360-motion-sensor/)
* Hardware Supported: [Design files](https://gitlab.com/keyboards1/dm_r_track/-/tree/master/boolean), [WeAct BlackPill (F411)](https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1), [PMW3360 Optical Sensor](https://www.tindie.com/products/jkicklighter/pmw3360-motion-sensor/)
Make example for this keyboard (after setting up your build environment):

@ -1 +1 @@
Subproject commit 0e9d558b525a8f28285f3bb509fd48a897c43151
Subproject commit 0062927e3058a8b5ef587234bbd98d42fb4e595e

@ -1 +1 @@
Subproject commit 1130173eae6b7402443aff18ad68228acbe25cc4
Subproject commit a224be155ae18d38deccf33a6c1d259b9a5ad8d3

View File

@ -1,9 +1,12 @@
/*
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -246,4 +249,4 @@
*/
#define STM32_WDG_USE_IWDG FALSE
#endif /* MCUCONF_H */
#endif /* MCUCONF_H */

View File

@ -29,7 +29,7 @@
#define HALCONF_H
#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_
#include <mcuconf.h>
@ -335,15 +335,18 @@
/*===========================================================================*/
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
* This option is recommended also if the SPI driver does not
* use a DMA channel and heavily loads the CPU.
* @brief Timeout before assuming a failure while waiting for card idle.
* @note Time is in milliseconds.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
#define MMC_NICE_WAITING TRUE
#if !defined(MMC_IDLE_TIMEOUT_MS) || defined(__DOXYGEN__)
#define MMC_IDLE_TIMEOUT_MS 1000
#endif
/**
* @brief Mutual exclusion on the SPI bus.
*/
#if !defined(MMC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define MMC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/

View File

@ -29,7 +29,7 @@
#define HALCONF_H
#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_
#include <mcuconf.h>
@ -335,15 +335,18 @@
/*===========================================================================*/
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
* This option is recommended also if the SPI driver does not
* use a DMA channel and heavily loads the CPU.
* @brief Timeout before assuming a failure while waiting for card idle.
* @note Time is in milliseconds.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
#define MMC_NICE_WAITING TRUE
#if !defined(MMC_IDLE_TIMEOUT_MS) || defined(__DOXYGEN__)
#define MMC_IDLE_TIMEOUT_MS 1000
#endif
/**
* @brief Mutual exclusion on the SPI bus.
*/
#if !defined(MMC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define MMC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/

View File

@ -72,27 +72,17 @@ inline void serial_transport_driver_clear(void) {
#elif HAL_USE_SIO
void clear_rx_evt_cb(SIODriver* siop) {
osalSysLockFromISR();
/* If errors occured during transactions this callback is invoked. We just
* clear the error sources and move on. We rely on the fact that we check
* for the success of the transaction by comparing the received/send bytes
* with the actual received/send bytes in the send/receive functions. */
sioGetAndClearEventsI(serial_driver);
osalSysUnlockFromISR();
}
static const SIOOperation serial_usart_operation = {.rx_cb = NULL, .rx_idle_cb = NULL, .tx_cb = NULL, .tx_end_cb = NULL, .rx_evt_cb = &clear_rx_evt_cb};
/**
* @brief SIO Driver startup routine.
*/
static inline void usart_driver_start(void) {
sioStart(serial_driver, &serial_config);
sioStartOperation(serial_driver, &serial_usart_operation);
}
inline void serial_transport_driver_clear(void) {
if (sioHasRXErrorsX(serial_driver)) {
sioGetAndClearErrors(serial_driver);
}
osalSysLock();
while (!sioIsRXEmptyX(serial_driver)) {
(void)sioGetX(serial_driver);
@ -132,10 +122,10 @@ inline bool serial_transport_send(const uint8_t* source, const size_t size) {
return serial_transport_receive(dump, bytes_left);
# else
/* The SIO driver directly accesses the hardware FIFOs of the USART
* peripheral. As these are limited in depth, the RX FIFO might have been
* overflowed by a large that we just send. Therefore we attempt to read
* back all the data we send or until the FIFO runs empty in case it
* overflowed and data was truncated. */
* peripheral. As these are limited in depth, the RX FIFO might have
* been overflowed by a large transaction that we just send. Therefore
* we attempt to read back all the data we send or until the FIFO runs
* empty in case it overflowed and data was truncated. */
if (unlikely(sioSynchronizeTXEnd(serial_driver, TIME_MS2I(SERIAL_USART_TIMEOUT)) < MSG_OK)) {
return false;
}

View File

@ -13,10 +13,8 @@ umask 022
# sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
# sudo apt-get update && sudo apt-get install adoptopenjdk-8-hotspot
#
# For Fedora 36-ish distros:
# # Prep yum repository from https://adoptium.net/installation/linux/
# sudo dnf install -y ant temurin-8-jdk
# export JAVA_HOME=/usr/lib/jvm/temurin-8-jdk
# For Fedora 37-ish distros:
# sudo dnf install -y ant java-1.8.0-openjdk.x86_64
sinfo() { echo "$@" >&2 ; }
shead() { sinfo "" ; sinfo "---------------------------------" ; sinfo "-- $@" ; sinfo "---------------------------------" ; }