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

366 commits

Author SHA1 Message Date
Steve Evans
6766f9cf43
Add NEUTRONRCF435 support including AT32F435RGT7 1M FLASH (#12534) 2023-03-20 12:33:43 +11:00
Steve Evans
6ff80a471a
Add USB MSC support to AT32 (#12481) 2023-03-15 04:29:38 +01:00
J Blackman
c224c075f8
Cleanup of USB drivers for AT32F4 (#12441)
* Cleanup of USB drivers for AT32F4
* F4 has different directories
2023-03-09 18:14:16 +11:00
J Blackman
80e9cfb998
Removing Brushed ESC auto detect (#12479)
- minimise pin "activation" on init.
2023-03-08 20:46:04 +01:00
J Blackman
4fff1b3c42
FIX: Legacy drivers required for STM32F411DISCOVERY target (#12411) 2023-02-25 21:19:45 +01:00
J Blackman
82566eb89a
REFACTOR: moving timer definitions to MCU locations. (#12397)
* REFACTOR: moving timer definitions to MCU locations.

* Now that the MCU directory needs to be included in the search path for includes, no need for target.h entry if filenaming is consistent.

* SITL needs the empty include.
2023-02-22 22:55:57 +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
693f55dcff
Simplified Local Build using Permanent Config (#12341) 2023-02-11 14:02:18 +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
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
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
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
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
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
Martin Luessi
f7b5df0ee8
Add support for Omron 2SMBP-02B barometer (#11173) 2022-12-27 22:17:27 +01:00
J Blackman
36b54ae33f
CLEANUP: target.mk is now mandatory (#12018) 2022-11-24 12:25:16 +11:00
blckmn
b6b76d1b88 Adding board scratch space.
- Including ability to define custom defaults as char[] that is baked into the build
- removed unnecessary size of custom defaults header parsing (defines provided by build process or in board.h for devs).
2022-10-30 17:43:43 +11:00
blckmn
06c5bb40b5 Final target cleanup 2022-10-25 14:28:13 +11:00
blckmn
8714bd13f4 Fixes for SITL - adding to the standard list of targets 2022-10-21 08:51:21 +11:00
phobos-
4ca3b9428f Review comment fixes 2022-09-07 14:41:36 +02:00
phobos-
f10413392b VtxDevice over msp 2022-09-07 14:41:36 +02:00
Mark Haslinghuis
683688c05d Fix gcc required subversion 2022-07-12 14:12:23 +02:00
blckmn
bc0fc26479 - Adding nightly build at 1am UTC
- Updating cache for tool chain
- Using 10.3 as the build chain, due to bug in 11.2 -> https://bugs.linaro.org/show_bug.cgi?id=5825.
- No inlining to prevent over flow. Perhaps other calls represent better choices.
2022-07-11 17:18:43 +10:00
blckmn
005299f085 Move to Github Actions for PRs 2022-07-11 10:27:52 +10:00
J Blackman
a100e68dbc
Merge pull request #11680 from haslinghuis/update-arm-sdk
Update ARM SDK to 11.2-2022
2022-07-11 09:53:00 +10:00
J Blackman
17c5420882
Merge branch 'master' into github-action-build 2022-07-08 15:00:31 +10:00
J Blackman
819296f077
Merge pull request #11214 from mathiasvr/pr-remove-unified
Remove unified target configurations from main repo
2022-07-08 14:49:27 +10:00
haslinghuis
73934cccc0
Merge pull request #11032 from daleckystepan/gcc10
Support for GCC 11.2.1
2022-07-06 02:41:14 +02:00
Mark Haslinghuis
0238a7e0f8 Update SDK to 11.2-2022 2022-06-30 02:40:20 +02:00
Štěpán Dalecký
4cf54f9ddc Support for GCC10 and some compilation tuning 2022-06-30 01:56:50 +02:00
blckmn
9bb1f18a82 Removing OPBL support. 2022-06-28 00:50:40 +10:00
Štěpán Dalecký
be8fbcdaac Remove unused STM32 USB FS lib 2022-06-21 14:01:32 +02:00
haslinghuis
a90a783c41
Merge pull request #10967 from SteveCEvans/remove_f1_f3
Remove F1 and F3 support
2022-06-16 22:07:23 +02:00
Steve Evans
701b0ae55c Remove F1 and F3 support 2022-06-14 19:10:13 +01:00
Steve Evans
6d17f3f765 Add STM32F411SX1280 unified target 2022-06-12 14:45:54 +01:00
Steve Evans
ee740d1381 Add support for ICM42605 and ICM42688P for unified targets except STM32F411 (for space reasons) 2022-01-16 12:25:19 +00:00
Mathias Rasmussen
abef8eaa3c Use GitHub Actions for CI 2022-01-06 23:18:27 +01:00
Mathias Rasmussen
95d81eaa1c Remove unified target configurations 2022-01-01 19:55:53 +01:00
Dominic Clifton
a325e2386d STM32H730 - Initial ST32H730 support.
The H730 is a value-line CPU, similar to the H723/H725, but with only
128kb RAM.

The FC firmware code is designed to RUN from external flash in MEMORY
MAPPED mode, via OctoSPI.  Use of ITCM/DTCM advised for core loops, like
PID control.

A bootloader is required to enable memory-mapped mode and jump to the
firmware, similar to how EXST bootloader system works.

Config storage is not part of this commit and is a problem when using a
single flash chip in memory mapped mode because the CPU can't run
read/write routines from the flash chip while writing to the flash chip.
Until flash read/write routines are updated the solution requires either
a second flash chip on an SPI interface, or the use of an SD card for
config storage.

Additional commits will support read/write of config to the code/data
storage flash chip to enable cheap and space efficient single-flash-chip
FC solutions.

Squashed commits:
STM32H730 - Workaround issue with 2GB `.elf` files being created.
STM32H730 - Reduce firmware size to 1MB.
STM32H730 - Add USB HS configuration.
STM32H730 - Add ADC internal tag mappings.
STM32H730 - Update all ADC mappings based on the referenced ST
documentation.  Add the VBAT channels.
STM32H730 - Fix DMA continuous requests.
STM32H730 - Fix ADC_INTERNAL confusion.
STM32H730/G4 - Disambiguate use of ADC_CHANNEL_INTERNAL_FIRST_ID.
STM32H730 - Fix documentation reference.
STM32H730 - Add DMA request mapping for ADC3.
STM32H730 - Explicitly set the ADC clock.
STM32H730 - Configure PLL2 speeds correctly.

* Tested with Ultrafast 64GB SanDisk SDXC card.

STM32H730 - Use 50Mhz clock for SDXC cards.

* Tested with SanDisk Ultra 64GB.  100Mhz clock gave CRC errors.

STM32H730 - Ensure USB has a lower NVIC priority than the SDMMC card
reads.

If it's higher, 0, then the SDMMC's DMA IRQ handler doesn't get called
when handing USB MSC storage reads.

STM32H730 - Support CPU name in CLI.

STM32H730 - Rebuild when linker scripts changes.
2021-12-23 15:02:23 +01:00
Michael Keller
80be08f050 Added resource allocation for DMA. 2021-09-28 02:44:07 +13:00
KarateBrot
8649f1003f Dynamic notch refactoring
+ added new parameter group for Dyn Notch
2021-09-01 12:39:21 +12:00
Steve Evans
ab66795eeb G4 SPI DMA support 2021-08-31 23:29:51 +12:00
Steve Evans
87c8847c13 New SPI API supporting DMA
Call targetConfiguration() once before config is loaded and again afterwards in case the config needs to be changed to load from SD card etc

Drop SPI clock during binding

Remove debug

Add per device SPI DMA enable

Fix sdioPinConfigure() declaration warning

Reduce clock speed during SPI RX initialisation
2021-07-25 12:40:25 +12:00
Michael Keller
5549a906f6 Added a Unified Target for STM32H743. 2021-06-27 18:49:45 +12:00
Michael Keller
b414be320f
Merge pull request #10727 from ctzsnooze/PT2-PT3-options-for-filters 2021-05-25 01:53:53 +12:00
Michael Keller
e37619e559
Merge pull request #10653 from klutvott123/i2c-configurable-clockspeed 2021-05-21 02:06:31 +12:00
Hans Christian Olaussen
5c7ff1ff94 I2C configurable clockspeed 2021-05-17 13:57:44 +02:00
ctzsnooze
636d563abe major rc changes ctzsnooze 2021 2021-05-07 14:40:43 +10:00