1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 03:50:02 +03:00
Commit graph

18323 commits

Author SHA1 Message Date
Steve Evans
0736da8aa3
Move FLASH_PAGE_SIZE definition to CPU specific target.h files (#12394)
* Never block use of SWD pins

* Split the AT-START-F435 and REVO-AT configs out from AT32F435/target.h

* Move FLASH_PAGE_SIZE definition to CPU specific target.h files

---------

Co-authored-by: J Blackman <blckmn@users.noreply.github.com>
2023-02-22 02:06:40 +11:00
Dominic Clifton
c1c1f95578
Require explicit usage of firmware partition for EXST targets. (#12299)
Require explicit usage of firmware partition in preparation for memory
mapped EXST targets with a second flash chip for data storage and
config.
2023-02-21 13:30:18 +01:00
Steve Evans
1ff78c6aac
NEW TARGET: AT32 debug targets, ATSTARTF435 and REVO-AT (#12392)
* Never block use of SWD pins

* Split the AT-START-F435 and REVO-AT configs out from AT32F435/target.h
2023-02-21 13:14:07 +01:00
J Blackman
166ff9c9b3
FIX: Several build issues following configuration changes (#12389)
* FIX: Several build issues following configuration changes

1. RX_SPI pins undefined
2. SDCARD enabled but no utilisation (i.e. no blackbox selected).

* Improved readability (readiness for "black" macro magic)

* Adding Makefile rule to enable CI targets to include Configured targets
2023-02-20 15:17:45 +01:00
Alejandro Hernández Cordero
9dc9c51d3e
Added SITL Gazebo (#12346) 2023-02-19 06:39:54 +11:00
J Blackman
1c92d83c6f
FIX: Broken Build API for zulu following deployment to use config (#12377) 2023-02-17 17:39:15 +11:00
Hans Christian Olaussen
885d8228db
Fix MPU6000 reset (#12371) 2023-02-17 00:59:13 +01:00
J Blackman
17c7816a52
To enable display of pin mapping for config.h (#12363) 2023-02-16 17:28:27 +11:00
J Blackman
44abae2965
FIX: Poor performance due to platform movements. (#12373) 2023-02-16 13:58:11 +11:00
J Blackman
9e36ba6ec4
Using SPI default pins (#12367) 2023-02-16 08:25:39 +11:00
Steve Evans
3faf844010
Enable SPI DMA receive before transmit on AT32 (#12368)
* Enable DMA rx before tx

* Update bus_spi_at32bsp.c

Typo
2023-02-15 03:03:54 +01:00
James
4019369ec0
Initial ADC support for AT32 (#12356)
Reads internal and external ADC channels.
Internal Vref and temperature tested, external Vbat tested.
Expect temperature to be inaccurate as the AT chips don't come with
per chip calibration.
External current and the generic 'external' channels haven't been tested.
2023-02-14 21:40:00 +01:00
J Blackman
3598f3e41a
Remove USE_SWDIO, simply refer to DEBUG (#12361)
Remove USE_SWDIO, simply refer to debug

Command line of `make TARGET=STM32F405 DEBUG=GDB` will trigger this.

Alternative is simply `make TARGET=STM32F405 EXTRA_FLAGS="-DDEBUG"`
2023-02-14 21:37:16 +01:00
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