Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frm301 #1

Open
wants to merge 98 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
e922235
900Mhz ESP32 RX
pkendall64 Jul 2, 2022
5abf669
Rename unified RX header file as it's ESP independant
pkendall64 Jul 2, 2022
28ea47d
Merge branch 'master' into 900mhz-esp32-rx
pkendall64 Jul 5, 2022
8d3c733
Merge branch 'master' into 900mhz-esp32-rx
pkendall64 Aug 13, 2022
bd25b9a
Fix popup touch events, remove from B&W (#1753)
CapnBry Aug 14, 2022
21a78ad
ant_ctrl typo
SunjunKim Aug 17, 2022
087f567
Merge pull request #1776 from SunjunKim/fix_namimno_diversity_target
FOG-Yamato Aug 17, 2022
733fc77
Fix spelling errors in web ui (#1786)
pkendall64 Aug 22, 2022
a90a9f4
Avoid updating the thermal device if no change (#1780)
pkendall64 Aug 24, 2022
5d03674
Foxeer RX target (#1796)
pkendall64 Aug 26, 2022
d2238a2
Fullres power level reports 0mW for 50mW (#1795)
CapnBry Aug 26, 2022
877b0f4
Fix wifi auto-on default value (#1798)
pkendall64 Aug 30, 2022
d1c9d2a
Fix 8285 RX as TX (#1764)
pkendall64 Sep 3, 2022
d3e75ac
Add delay after CRSFconnect before TX transmit starts (#1775)
CapnBry Sep 3, 2022
659aec6
Return sensitivity to the Packet Rate item (#1808)
CapnBry Sep 3, 2022
d6b486c
Fixes TFT quirk displaying overwritten text (#1770)
pkendall64 Sep 3, 2022
5aa9c8e
Don't pause Lua loading when in edit mode. Why? (#1809)
CapnBry Sep 3, 2022
945d8c1
Allow changing switch mode when connected (#1792)
CapnBry Sep 3, 2022
19ed259
Use 250hz default rate for 2.4 to avoid prohibited pkt-vs-baud mismat…
wvarty Sep 5, 2022
1b3f770
Add EMAX targets (#1787)
pkendall64 Sep 5, 2022
d5a9d0c
Change 868/900 back to 200hz default
wvarty Sep 6, 2022
793a233
Merge pull request #1815 from ExpressLRS/fix-default-pkt-rates
JyeSmith Sep 6, 2022
02c68cc
adds Happymodel EP1 Dual target (#1821)
JyeSmith Sep 7, 2022
bbaa36d
Power level 0 is malfunctioning on Team900 HWs (#1822)
SunjunKim Sep 7, 2022
8aa1b03
Fixes configurator passed Lua name not getting into Unified firmware …
pkendall64 Sep 8, 2022
adabcd2
Fix ESP32 RX being labelled as TX in MDNS
pkendall64 Sep 10, 2022
bef2ca5
Merge remote-tracking branch 'origin/3.x.x-maintenance' into 3.x-merge
pkendall64 Sep 10, 2022
6ab5eba
Merge pull request #1829 from ExpressLRS/3.x-merge
JyeSmith Sep 12, 2022
6c03bdd
Merge pull request #1666 from pkendall64/900mhz-esp32-rx
JyeSmith Sep 12, 2022
b0f7d43
Merge pull request #1827 from pkendall64/fix-mdns
JyeSmith Sep 12, 2022
98a2da7
Add foxeer to the main ini file!
pkendall64 Sep 16, 2022
b9a3642
catch potentially random IRQs (#1839)
JyeSmith Sep 22, 2022
52a117d
Continuous wave test mode (#1785)
pkendall64 Sep 22, 2022
f9148d5
Merge pull request #1842 from ExpressLRS/foxeer
maybenikhil Sep 24, 2022
69825cd
Powersave/gsensor for OLED devices (#1729)
pkendall64 Sep 24, 2022
24f0759
Platform lib upgrade (#1831)
pkendall64 Sep 24, 2022
06da005
Put "important" tasks on core 1 (loop core) (#1830)
pkendall64 Sep 24, 2022
6bf2a4c
User configurable TX button actions (#1761)
pkendall64 Sep 24, 2022
0006c2d
User configurable RGB LED colors for user buttons (#1837)
pkendall64 Sep 25, 2022
bab53c5
PWM fan support (#1760)
pkendall64 Sep 27, 2022
05733e7
Renamed full diversity rx json configs to be more descriptive (#1748)
David-OConnor Sep 28, 2022
3c540fe
update mismatch firmware warning (#1859)
JyeSmith Sep 29, 2022
10a8b5b
Add guards to RXdoneISR and TXdoneISR (#1865)
JyeSmith Oct 3, 2022
9364464
Hide the "unlock higher power" option if MaxPower and HighPower in ha…
pkendall64 Oct 10, 2022
bad7d1a
Fix HappyModel Dual using wrong target file (#1872)
pkendall64 Oct 12, 2022
0578d00
Fix for RX not having the action button config (#1863)
pkendall64 Oct 12, 2022
ac57a24
ESP32 RX Betaflight Passthrough with esptool (#1806)
pkendall64 Oct 12, 2022
7b50ecd
Allow config of RX initial packet rate (#1757)
CapnBry Oct 12, 2022
2b047f3
add uplink_RSSI_2 to true diversity rx (#1876)
JyeSmith Oct 12, 2022
8586df2
Add PWM mapping/failsafe to RX Lua (#1763)
CapnBry Oct 12, 2022
1203b73
Radio GPIO optimisation (#1841)
pkendall64 Oct 13, 2022
bc8d1a4
[3.0.1] Radio GPIO optimisation (#1845)
pkendall64 Oct 13, 2022
82e088a
adds HappyModel_EP_Dual_2400_RX_via_BetaflightPassthrough (#1878)
JyeSmith Oct 13, 2022
233ff26
Faster OTX sync recovery and stability (#1867)
pkendall64 Oct 13, 2022
b425179
Merge branch '3.x.x-maintenance' into 3.x-merge
pkendall64 Oct 14, 2022
78c23db
Merge pull request #1879 from ExpressLRS/3.x-merge
pkendall64 Oct 14, 2022
044d0a8
lowercase the target layout part name! (#1886)
pkendall64 Oct 15, 2022
7ac23fb
Fix wifi led when in binding mode (#1881)
pkendall64 Oct 15, 2022
f6a6314
Update 500 -> 1000 Hz in feature list (#1891)
anderso Oct 17, 2022
79374c4
Disable TX diversity on FM30 (#1882)
CapnBry Oct 18, 2022
2470fce
Move uart writes from ISR on STM32 (#1874)
alteman Oct 18, 2022
8bdb66b
Lowering upload speed (#1889)
SunjunKim Oct 18, 2022
255f788
Add EMAX nano TX targets (#1896)
pkendall64 Oct 23, 2022
26ce80f
Fix power on boot always being default power (#1901)
pkendall64 Oct 24, 2022
ad5580a
Set BLE to max power (#1897)
pkendall64 Oct 24, 2022
a0efde3
Add native barometer support (#1892)
CapnBry Oct 24, 2022
48dd167
Target validation during github build (#1888)
pkendall64 Oct 24, 2022
bb1d7a5
LBT bug fixes and telemetry lost/recovered solution (#1870)
pkendall64 Oct 26, 2022
f71b550
Remove binary file so it's built each time (#1911)
pkendall64 Oct 27, 2022
6b42284
Fix QuadKoptersNano 2400 RX referencing Generic 900 target (#1922)
deadbytefpv Oct 30, 2022
fbf40c7
The FIFO's actions need to be atomic (#1913)
pkendall64 Oct 31, 2022
3d111b4
Update u8g2, it got removed from the registry! (#1924)
pkendall64 Nov 1, 2022
4f06144
Fix error in initial network setting (#1933)
pkendall64 Nov 6, 2022
a3a9ea3
Scale PWM failsafe timeout with packet rate (#1930)
CapnBry Nov 6, 2022
61e89ef
change-binding-to-use-deferExecution (#1921)
JyeSmith Nov 7, 2022
37b3434
Add high pwm freq and duty mode support (#1850)
Ncerzzk Nov 9, 2022
b5552e2
Merge branch '3.x.x-maintenance' into 3.x-merge
JyeSmith Nov 9, 2022
b08737f
Merge pull request #1938 from ExpressLRS/3.x-merge
pkendall64 Nov 9, 2022
1dd934f
Adds some missing targets (#1939)
pkendall64 Nov 10, 2022
61f27ac
Add Radiomaster Ranger targets (#1940)
pkendall64 Nov 12, 2022
bc84c9e
Allow resetting temporary power level via OLED and Lua (#1937)
pkendall64 Nov 17, 2022
8f182b8
revert-SX1280_REG_FLRC_SYNC_ADDR_CTRL (#1942)
JyeSmith Nov 17, 2022
d0015c6
Gemini (#1914)
JyeSmith Nov 19, 2022
52f0064
first support frm301
porfiheli Nov 6, 2021
0d71a14
deleted fm30 definitions
porfiheli Nov 6, 2021
836be2c
fixed some wrong values of stm32f030c8t6 uC
porfiheli Nov 6, 2021
68aa6ed
fix variants files
porfiheli Nov 9, 2021
ceb32b5
fixes
porfiheli Nov 13, 2021
e4fa09e
more fix uart config crsf
porfiheli Nov 16, 2021
37f1282
uart config fixed
porfiheli Nov 25, 2021
e4bc71b
Delete .vscode directory
porfiheli Nov 16, 2021
3fe1cd4
Coretx-M0 adaption
gagarinlg Sep 2, 2022
305c553
fix comment on SPI speed
gagarinlg Sep 3, 2022
e279032
started work on bootloader for FRM301
gagarinlg Sep 8, 2022
65e9ef3
bootloader for FRM301 compiles, starting the app won't work yet, IRQ …
gagarinlg Sep 9, 2022
59e8435
The boot loader does not load the app successfully on STM32F0 targets
gagarinlg Sep 17, 2022
c27bd91
continued boot loader work
gagarinlg Sep 17, 2022
42b0dc8
started Cortexd M0 bootloader integration
gagarinlg Nov 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Cache pip
uses: actions/cache@v2
Expand All @@ -39,6 +41,20 @@ jobs:
cd src
PLATFORMIO_BUILD_FLAGS="-DRegulatory_Domain_ISM_2400" pio test -e native

validation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Validate target files
run: |
cd src
python python/targets_validator.py

targets:
runs-on: ubuntu-latest
outputs:
Expand All @@ -65,7 +81,9 @@ jobs:
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Cache pip
uses: actions/cache@v2
Expand Down Expand Up @@ -114,7 +132,7 @@ jobs:
esac
# copy the common ESP32 files
if [[ ${{matrix.target}} == *ESP32* ]] ; then
cp ~/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin ~/artifacts/firmware/
cp ~/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.bin ~/artifacts/firmware/
cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin ~/artifacts/firmware/
mv .pio/build/${{ matrix.target }}/partitions.bin ~/artifacts/firmware/
fi
Expand All @@ -127,7 +145,7 @@ jobs:
continue-on-error: true

firmware:
needs: build
needs: [build, validation, test]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -152,14 +170,15 @@ jobs:
path: dist/**/*

installer:
needs: [validation, test]
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.7

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For general information on the project please refer to our guides on the [websit

## About

ExpressLRS is an open source Radio Link for Radio Control applications. Designed to be the best FPV Racing link, it is based on the fantastic Semtech **SX127x**/**SX1280** LoRa hardware combined with an Espressif or STM32 Processor. Using LoRa modulation as well as reduced packet size it achieves best in class range and latency. It achieves this using a highly optimized over-the-air packet structure, giving simultaneous range and latency advantages. It supports both 900 MHz and 2.4 GHz links, each with their own benefits. 900 MHz supports a maximum of 200 Hz packet rate, with higher penetration. 2.4 GHz supports a blistering fast 500 Hz on [EdgeTX](http://edgetx.org/). With over 60 different hardware targets and 13 hardware manufacuturers, the choice of hardware is ever growing, with different hardware suited to different requirements.
ExpressLRS is an open source Radio Link for Radio Control applications. Designed to be the best FPV Racing link, it is based on the fantastic Semtech **SX127x**/**SX1280** LoRa hardware combined with an Espressif or STM32 Processor. Using LoRa modulation as well as reduced packet size it achieves best in class range and latency. It achieves this using a highly optimized over-the-air packet structure, giving simultaneous range and latency advantages. It supports both 900 MHz and 2.4 GHz links, each with their own benefits. 900 MHz supports a maximum of 200 Hz packet rate, with higher penetration. 2.4 GHz supports a blistering fast 1000 Hz on [EdgeTX](http://edgetx.org/). With over 60 different hardware targets and 13 hardware manufacuturers, the choice of hardware is ever growing, with different hardware suited to different requirements.

## Configurator
To configure your ExpressLRS hardware, the ExpressLRS Configurator can be used, which is found here:
Expand All @@ -38,7 +38,7 @@ We have both a [Discord Server](https://discord.gg/expresslrs) and [Facebook Gro

ExpressLRS has the following features:

- 500 Hz Packet Rate
- 1000 Hz Packet Rate
- Telemetry (Betaflight Lua Compatibility)
- Wifi Updates
- Bluetooth Sim Joystick
Expand Down
2 changes: 2 additions & 0 deletions src/.clang-format
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
BasedOnStyle: Microsoft
ColumnLimit: 0
AccessModifierOffset: -4
IndentWidth: 4
AllowShortFunctionsOnASingleLine: Inline
43 changes: 43 additions & 0 deletions src/boards/FRM301.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"build": {
"core": "stm32",
"cpu": "cortex-m0",
"extra_flags": "-DSTM32F0 -DSTM32F0xx -DSTM32F030x8",
"f_cpu": "48000000L",
"ldscript": "variants/FRM301/ldscript.ld",
"mcu": "stm32f030c8t6",
"variants_dir": "variants",
"variant": "FRM301"
},
"debug": {
"default_tools": [
"jlink"
],
"jlink_device": "STM32F030C8",
"openocd_target": "stm32f0x",
"svd_path": "STM32F030.svd"
},
"frameworks": [
"arduino",
"mbed",
"cmsis",
"libopencm3",
"stm32cube"
],
"name": "FRM301",
"upload": {
"maximum_ram_size": 8192,
"maximum_size": 65536,
"protocol": "jlink",
"protocols": [
"jlink",
"cmsis-dap",
"stlink",
"blackmagic",
"mbed",
"dfu"
]
},
"url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103c8.html",
"vendor": "ST"
}
Binary file added src/bootloader/frm301_tx_bootloader.bin
Binary file not shown.
23 changes: 23 additions & 0 deletions src/bootloader/src/Src/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,20 @@ flash_status flash_write_halfword(uint32_t address, uint16_t *data,
return status;
}

#if defined(STM32F0)
volatile uint32_t VectorTable[48] __attribute__((section(".RAMVectorTable")));
//copy the vector table to SRAM
void flash_copy_vectors_to_sram( void )
{
uint32_t vecIndex = 0;

for(vecIndex = 0; vecIndex < 48; vecIndex++){
VectorTable[vecIndex] = *(volatile uint32_t*)(FLASH_APP_START_ADDRESS + (vecIndex << 2));
}
}
#endif


/**
* @brief Actually jumps to the user application.
* @param void
Expand All @@ -288,9 +302,18 @@ void flash_jump_to_app(void)
/* Remove configs before jump. */
uart_deinit();
HAL_DeInit();
#if defined(STM32F0)
flash_copy_vectors_to_sram();
#endif
/* Change the main stack pointer. */
asm volatile("msr msp, %0" ::"g"(*(volatile uint32_t *)FLASH_APP_START_ADDRESS));
#if defined(STM32F0)
__disable_irq();
__HAL_SYSCFG_REMAPMEMORY_SRAM();
__enable_irq();
#else
SCB->VTOR = (__IO uint32_t)(FLASH_APP_START_ADDRESS);
#endif
//__set_MSP(*(volatile uint32_t *)FLASH_APP_START_ADDRESS);
jump_to_app();

Expand Down
2 changes: 2 additions & 0 deletions src/bootloader/src/Src/flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include "stm32l1xx_hal.h"
#elif defined(STM32L4xx)
#include "stm32l4xx_hal.h"
#elif defined(STM32F030x8)
#include "stm32f0xx_hal.h"
#elif defined(STM32F1)
#include "stm32f1xx_hal.h"
#elif defined(STM32F3xx)
Expand Down
4 changes: 4 additions & 0 deletions src/bootloader/src/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,11 @@ int main(void)
/* MCU Configuration---------------------------------------------*/

/* Make sure the vectors are set correctly */
#if defined(STM32F0)
__HAL_SYSCFG_REMAPMEMORY_FLASH();
#else
SCB->VTOR = BL_FLASH_START;
#endif

/* Reset of all peripherals, Initializes the Flash interface and the
* Systick.
Expand Down
5 changes: 5 additions & 0 deletions src/bootloader/src/Src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
#include "stm32l1xx_hal.h"
#include "stm32l1xx_ll_gpio.h"
#include "stm32l1xx_ll_usart.h"
#elif defined(STM32F030x8)
#include "stm32f0xx.h"
#include "stm32f0xx_hal.h"
#include "stm32f0xx_ll_gpio.h"
#include "stm32f0xx_ll_usart.h"
#elif defined(STM32F1)
#include "stm32f1xx.h"
#include "stm32f1xx_hal.h"
Expand Down
10 changes: 9 additions & 1 deletion src/bootloader/src/Src/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ void uart_init(uint32_t baud, int32_t pin_rx, int32_t pin_tx,
/* TX USART peripheral config */
usart_hw_init(uart_ptr, baud, 0, halfduplex);

#if defined(STM32F3xx)
#if defined(STM32F3xx) || defined(STM32F0)
/* F3 can swap Rx and Tx pins */
if (swapped) {
LL_USART_SetTXRXSwap(uart_ptr, LL_USART_TXRX_SWAPPED);
Expand All @@ -538,15 +538,23 @@ void uart_init(uint32_t baud, int32_t pin_rx, int32_t pin_tx,

IRQn_Type irq = usart_get_irq(uart_ptr_rx);
if (irq) {
#if defined(STM32F030x8)
NVIC_SetPriority(irq,2);
#else
NVIC_SetPriority(irq,
NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 2, 0));
#endif
NVIC_EnableIRQ(irq);
}
if (uart_ptr_rx != uart_ptr) {
irq = usart_get_irq(uart_ptr);
if (irq) {
#if defined(STM32F030x8)
NVIC_SetPriority(irq,2);
#else
NVIC_SetPriority(irq,
NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 2, 0));
#endif
NVIC_EnableIRQ(irq);
}
}
Expand Down
40 changes: 40 additions & 0 deletions src/bootloader/src/boards/stm32f030c8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"build": {
"core": "stm32",
"cpu": "cortex-m0",
"extra_flags": "-DSTM32F0xx=1 -DSTM32F030X8=1",
"f_cpu": "48000000L",
"ldscript": "linker/stm32.ld",
"mcu": "stm32f030c8t6",
"product_line": "STM32F"
},
"debug": {
"default_tools": [
"jlink"
],
"jlink_device": "STM32F030C8",
"openocd_target": "stm32f0x",
"svd_path": "STM32F030.svd"
},
"frameworks": [
"arduino",
"cmsis",
"libopencm0",
"stm32cube",
"zephyr"
],
"name": "BL_F030C8",
"upload": {
"maximum_ram_size": 8192,
"maximum_size": 16384,
"protocol": "jlink",
"protocols": [
"jlink",
"stlink",
"blackmagic",
"dfu"
]
},
"url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f0-series/stm32f030/stm32f030c8.html",
"vendor": "Generic"
}
Loading