1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00
Commit graph

18010 commits

Author SHA1 Message Date
J Blackman
4fe980384c
Refactor I2C to use I2Cx_SCL_PIN and I2Cx_SDA_PIN (#12357)
* Refactor I2C to use I2Cx_SCL_PIN and I2Cx_SDA_PIN
* Keeping the default pins for F4 and F7
2023-02-15 06:02:02 +11:00
Ivan Efimov
615adaf463
Fix: Renamed USE_LEDSTRIP_64 to USE_LED_STRIP_64 (#12365) 2023-02-14 16:57:44 +01:00
J Blackman
2a17cedde9
Adding additional MOTOR pin mappings for defaults (#12364) 2023-02-14 16:54:49 +01:00
J Blackman
25b3b58385
Simplified platform.h (#12355)
As targets are limited to MCU now, we can use this fact to remove the #ifdef statements related to MCU. This is implied by the target.h and can be used for including MCU platform specific includes.
2023-02-14 16:50:47 +01:00
J Blackman
2dbbd1882c
timerHardware removal - all targets use fullTimerHardware now. (#12349)
* Removing last items associated with old timerHardware

* target.c rename, to identify purpose (should probably move to drivers/sitl or similar)

* Removing timerHardware dependency from timerup.c
2023-02-14 16:47:44 +01:00
J Blackman
69c779c0f7
Makefile Cleanup - further simplification of local building (#12354)
* Makefile Cleanup - further simplification of local building

Can now use the commands:

make BETAFLIGHTF4

make BETAFLIGHTF4_clean

make configs

Target objects for config are now kept separate, so changing a config in use will rebuild as required.

* Minor correction for cummulative use in naming target
2023-02-14 16:44:20 +01:00
J Blackman
fd2ac2f77f
FIX: Flash status compilation error (#12360) 2023-02-14 20:12:58 +11:00
Mark Haslinghuis
14eac2d6c8
Refactor GPS state_position (#12330)
Refactor GPS
2023-02-14 16:57:30 +11:00
Vitaliy Nimych
ca4df610ed
add BMP280 to target FLMO GRAVITYF7 (#12352) 2023-02-14 13:35:29 +11:00
J Blackman
19f22f5120
Method for adding defaults using defines for resources. (#12342)
* Method for adding defaults using defines for resources.

* As we will always be using the fullTimerHardware, we just need to configure the pin mapping.

This is done in the config.h as

#define TIMER_PIN_MAPPING   \
    TIMER_PIN_MAP(0, PA0, 1, 0) \
    TIMER_PIN_MAP(0, PA1, 1, 0)

timerHardware[] dependencies to be removed in another PR

* Adding missing pin definitions (removing dependency on timerHardware)

* Typo

* In case MOTOR1_PIN is not defined, but a motor is configured
2023-02-12 04:06:49 +01:00
nerdCopter
bb875cd0d6
add thrust_linear to blackbox header (#12337) 2023-02-11 13:41:55 +01:00
J Blackman
693f55dcff
Simplified Local Build using Permanent Config (#12341) 2023-02-11 14:02:18 +11:00
Mark Haslinghuis
561d0ef996
Fix blackboxdevice missing (#12324) 2023-02-11 08:37:36 +11:00
Dominic Clifton
d27bea9ca6
Revert "Fix missing CUSTOM_DEFAULTS for H730/H750 targets. (#12261)" (#12333)
This reverts commit 9850749afa.
2023-02-11 05:56:14 +11:00
J Blackman
7b2d114c51
Tidy up of AT (timer defs), and STM specific init defines (#12339)
* Tidy up of AT Timer Definitions
* Removed unnecessary F1 code.
* Remove some STM specific define logic from init.c
* As per renaming suggestion from @klutvott123
2023-02-10 14:01:38 +11:00
Steve Evans
01df7f3057
Define USE_LATE_TASK_STATISTICS for AT32 (#12328) 2023-02-09 16:53:06 +11:00
Steve Evans
df70dc9574
Fix BMI160 accelerometer read in non-DMA SPI transfer (#12338) 2023-02-09 16:52:04 +11:00
Jan Post
1ec9ec6bdc
Fix SDFT batchSize rounding (#12329) 2023-02-09 06:25:25 +01:00
Steve Evans
0ac9962bd4
Enable DMA on AT32F435 SPI (#12327) 2023-02-08 20:54:41 +00:00
Hans Christian Olaussen
facf44b406
Include smartport telemetry for Fport (#12314) 2023-02-07 09:35:25 +11:00
J Blackman
72ab5b1275
Re-arranging VCP/IO/EXTI files in preparation for AT32 (#12289)
* Re-arranging VCP files in preparation for AT32

* Tab size 4

* Adding ADC driver for AT32F43x

* RCC code here is STM32 specific.

* Adding rcc.c for AT32

* pwm_output.c has very specific MCU coupling - to be re factored.

* Separating exti.c

* Split up io.c int stm32/io_stm32.c and at32/io_at32.c

* Adding in VCP files for AT32 and move timer

- note will require more cleanup

* Solving for sanity checks

* Inadvertent inclusion of timer.c for HAL

* rcc.c, timer.c and moving other spevific files out of the driver directory

* Adding I2C drivers

* Formatting

* ws2811 driver and usb_msc driver skeleton
2023-02-06 05:15:56 +01:00
J Blackman
dac1512b30
Update .gitignore (#12294) 2023-02-06 05:11:34 +01:00
Dominic Clifton
a19bf9b9a9
Don't enable all flash chips by default on EXST targets. (#12300) 2023-02-05 23:51:29 +01:00
Dominic Clifton
8fd592bedc
SD - Use SDIO by default if target uses USE_SDCARD_SDIO. (#12301) 2023-02-05 23:47:48 +01:00
Dominic Clifton
d873c5cc10
NVIC - Update ELRS and SPI atomic_block usage to use appropriate priority levels. (#12302)
NVIC - Update ELRS and SPI atomic_block usage to use appropriate
priority levels.
2023-02-05 23:44:37 +01:00
J Blackman
4f2a9055bb
Delete support directory (#12293) 2023-02-05 23:39:54 +01:00
Dominic Clifton
f0623a7422
ELRS - Simplify deferred ISR (#12303)
simplify deferred ISR

Co-authored-by: Alessandro Carcione <alessandroaus@gmail.com>
2023-02-05 21:13:30 +01:00
Dominic Clifton
cb2ab68c21
BF - Fix QuadSPI include paths. (#12298) 2023-02-05 21:54:53 +11:00
Mark Haslinghuis
6ba230f0be
Add VARIO if BARO or GPS defined (#12288) 2023-02-04 23:33:30 +01:00
Dominic Clifton
b3053be4dd
OctoSPI and Memory Mapped Flash support (#11825)
* STM32H730/STM32H750 - Fix use of USE_LP_UART1 instead of USE_LPUART1.

* STM32H723 - Prepare for being able to build for using non-internal-flash
config storage.

* STM32H723 - Prepare for using non-default strings.

* STM32H723 - Disable 'use custom defaults' when using USE_EXST.

* STM32H723 - Disable CUSTOM_DEFAULTS_EXTENDED when EXST is used.

* OCTOSPI - Add initialisation code.

* Add support for RAM_CODE.

* STM32H730 - Add support for RAM_CODE via the .ram_code attribute.

* OCTOSPI - Proof-of-concept for disabling/enabling memory mapped mode on
a running system.

NOTE: The HAL libs are compiled into a memory mapped region, and this cannot be used for OctoSPI access when memory mapped mode is disabled.

* OCTOSPI - Drop HAL support after determining that it's not suitable for
the memory mapped flash use-case.

* OCTOSPI - Sometimes, when disabling memory map mode, the abort fails.
Handle this by disabling the OSPI peripheral first and re-enabling it
afterwards.

* SD/FLASH - Update comments regarding possible solutions to the catch-22
issue with SD/SPI/QUADSPI/OCTOSPI pin configurations.

* OCTOSPI - Use device instance directly.

* OCTOSPI - Prepare W25Q flash driver for octospi support.

* OCTOSPI - Add octospi flash detection.

Note: The method to detect flash chips is similar to the method used for
QUADSPI and as such the code was used as a base. However the initial
OCTOSPI implementation doesn't support the non-memory-mapped use-case so
the un-tested code is gated with `USE_OCTOSPI_EXPERIMENTAL`.

The key differences are:
* uses octospi api not quadspi api.
* flash chip clock speeds should not be changed for memory-mapped flash
chips, bootloader already set it correctly.
* only certain flash chips are capable of memory mapped support.

* W25Q - Ensure w25q128fv_readRegister returns 0 if the receive fails.

* OCTOSPI - Implement octoSpiTransmit1LINE, octoSpiReceive1LINE and
octoSpiReceive4LINES.

* OCTOSPI - Specify device from init.

* OCTOSPI - More fixes and work on init.

Current status is that memory mapped mode is disabled and flash chip is
detected, but w25q128fv_detect should not be calling w25q128fv_reset.

* FLASH - Add comment regarding wasted flash space on targets that only
use one bus type for the flash chip.

* FLASH - Split `detect` into `identify` and `configure`.

* OCTOSPI - Extract flashMemoryMappedModeEnable/Disable to separate
methods.

* FLASH - Reduce size of targets that don't support the use of multiple
flash interfaces.

* Single-flash-chip targets usually only support one type of io
interface.
* Without this, compiler warnings are generated in `flashSpiInit` for
targets that only use flash chip drivers that support quadspi or octospi
that don't even use SPI for flash.

* FLASH - Use MMFLASH_CODE/DATA to conditionally move code/data to RAM.

Only targets compiled to support memory mapped flash chips need the some
specific code in RAM.  Otherwise the code/data should be in the normal
linker section.

* FLASH - W25Q Prepare for memory mapped flash usage.

* Wait/Delay functions must work with interrupts disabled.
* Code used for reading/writing must run from RAM.

* OCTOSPI - Implement remaining required methods.

* OCTOSPI - Fixes for earlier code (not last commit).

* FLASH - W25Q update timeout values from Datasheet Rev L.

* FLASH - Prepare flash driver for use when memory mapped flash is
disabled.

* System - Prepare microsISR for use when memory mapped flash is disabled.

* FLASH - Add support for CONFIG_IN_MEMORY_MAPPED_FLASH.

* Flash - Fix incorrect gating on cli flash commands.

When compiling with USE_FLASH_CHIP and without USE_FLASHFS there were
compiler warnings.

* MMFLASH - Fix release-mode build.

* FLASH - Allow SPI pins to be reconfigured when using CONFIG_IN_MEMORY_MAPPED_FLASH.

MMFLASH only works via QuadSPI/OctoSPI peripherals.

* EXST - Disable the 2GB workaround which is now causing a different
error.

The error we get with 'remove-section' enabled is:

"error in private header data: sorry, cannot handle this file".  The
cause of this new error in the objcopy codebase is an out of memory
condition, somehow the 2GB files and this error are related but the root
cause of both is still unknown.

* OCTOSPI - Add support for STM32H723.

* STM32H723 - Add linker scripts for EXST usage.

* NucleoH723ZG - Add build script to demonstrate OCTOSPI and Memory Mapped
flash support.

* FLASH - WUse the size in bits to set the size of the buffer.

* FLASH - Fix typo in W25N driver defines.

Was using W28N instead of W25N

* OCTOSPI - Fix missing semilcolon when compiling without
USE_FLASH_MEMORY_MAPPED.

* OCTPSPI - Fix missing call to 'memoryMappedModeInit'.

* SPRacingH7RF - Add example build script to allow for testing prior to
unified target / cloud-build support.
2023-02-04 06:24:01 +11:00
Mark Haslinghuis
e9269507ae
Remove duplicate and sort *_SRC files [H7] (#12282)
Remove duplicate and sort *_SRC files
2023-02-03 14:24:24 +11:00
Dominic Clifton
9850749afa
Fix missing CUSTOM_DEFAULTS for H730/H750 targets. (#12261) 2023-02-03 06:26:28 +11:00
Mark Haslinghuis
7207892ab1
Revert "Update ARM SDK to 11.3rel1" (#12285) 2023-02-02 21:13:53 +11:00
Mark Haslinghuis
8ca013dfc5
Update ARM SDK to 11.3rel1 (#12146) 2023-02-02 04:13:18 +01:00
Steve Evans
e5cd2cad7b
Fix max permissible CMS rows and up/down page arrows (#12277)
* Fix max permissible CMS rows and up/down page arrows

* For CMS displays of 30 columns or less shrink width of menu to fit

* Fix string overflow

* Use 'v' for down arrow rather than 'V' as it's less ugly as devices without OSD character set can display lower case
2023-02-01 23:51:58 +01:00
J Blackman
33a96bb5f6
Source file re-arrangement for better separation of MCU types (#12268)
Source file re-arrangement for better spearation of MCU types

- Move STM32 specific files to drivers/stm32
2023-02-01 01:12:34 +01:00
Mark Haslinghuis
a3b7d74016
Update ISSUE Template to require Support ID Only (#12259) 2023-02-01 04:55:03 +11:00
J Blackman
7604b05a00
Enable retrieval of the BUILD_KEY using MSP2 (#12264)
* Enable retrieval of the BUILD_KEY using MSP2

* Repositioning
2023-01-31 17:50:55 +01:00
ctzsnooze
395e8e8983
Fix Bug causing Dynamic Idle to fail if RPM filtering is turned off (#12270)
Init erpmToHz even if RPM filtering is disabled

Fix for no RPM values sent to Dynamic Idle when RPM filtering was turned off
2023-01-31 15:20:36 +01:00
J Blackman
74be33dfbc
AT32 development, introduction of AT32F435 target (#12247)
* AT32F435: new target (#12159)
* AT32F435: New target (WIP)
* IO and Timer Updates
* Adding pseudonyms for the STM TypeDef items.
- implementation to follow
* Adding config_streamer support for AT32
* Implementation for IO
* Adding in Peripheral mapping from emsr.
* Warnings cleanup for AT drivers
* Getting things to the linking stage
* Add AT-START-F435 LEDs as default in AT32F435 as a temporary measure to aid bringup
* Remove tabs
* Enable selection of serial port to use for MSP
* Setup defaults for AT-START-F435 to use MSP on UART1
* Fix for most recent 4.5.0 Makefile changes
* Solve for sanity check.
* Add AT32F435 MCU type
* Fix compilation issue with SITL
* Merge conflict resolution
* Minor cleanup
* Adding line feed.

---------

Co-authored-by: Steve Evans <Steve@SCEvans.com>
2023-01-31 11:31:23 +11:00
J Blackman
8900a831e5
AT32F435/7 Libraries (#12158) (#12263)
Source: https://github.com/ArteryTek/AT32F435_437_Firmware_Library
Version: 2.1.1
2023-01-30 22:05:32 +01:00
Dominic Clifton
5e16ddb01b
Don't bundle flash drivers and flash fs/tools together. (#12252)
Flash drivers need to be able to be compiled in without flashfs/flash tools.
2023-01-31 05:26:00 +11:00
Mark Haslinghuis
1b6208d63d
Fix gating for USE_ACC_SPI_MPU9250 (#12240) 2023-01-30 20:06:23 +11:00
Steve Evans
85d9ae2386
Add GYRO_CALIBRATION debug mode (#12241) 2023-01-30 20:05:48 +11:00
QuadMcFly
7dedaa4254
Add Octo X8 + to mixer defaults (#12175) 2023-01-29 02:19:47 +01:00
J Blackman
ecdbba2ce2
Cleanup make (#12179)
* Cleanup Makefiles

Given the targets are now simply the MCU, there is now a significant amount of duplication.

TODO:
- will possibly add STM32.mk for inclusion from STM32F4 etc to remove further duplication.

Noting it is now imperative that the gating is right.

* Removed the remnants of "features"

* Further clean up in preparation of new MCUs

* Typo for STM32F722xx

* Fix F411

* Last remnants of the _TARGETS lists.
2023-01-29 01:51:06 +01:00
Mark Haslinghuis
d9264045b3
Default blackbox device to NONE on reset (#12221)
* Default blackbox device to NONE on reset

* Add check for flashIsSupported

* Move blackbox validation outside of validateAndFixGyroConfig()
2023-01-29 01:42:32 +01:00
Mark Haslinghuis
99088f28d1
Fix picture and update links (#12244) 2023-01-29 10:55:49 +11:00
J Blackman
3cbafaf183
Update version for next release (#12234) 2023-01-29 10:24:02 +11:00
Hans Christian Olaussen
4605309d82
Increment EEPROM version for 4.4 (#12242) 2023-01-29 10:18:41 +11:00