Commit Graph

314 Commits

Author SHA1 Message Date
jflyper d924e59c3c [H7][LIB][SDMMC] Workaround for SDMMC Errata 2.11.4
Application of

STM32H750 - Apply workaround to the SDMMC Errata 2.11.4 (8446832)

to V1.4.0
2019-07-08 09:30:55 +09:00
jflyper 400a122f30 [H7] STM32H7.mk additions and cleanup 2019-07-08 09:30:21 +09:00
Michael Keller 9b04b5ebd7
H7 build script updates (#8492)
H7 build script updates
2019-06-28 19:23:20 +12:00
Dominic Clifton 0c7b161c32 STM32H750 - Allow targets to override TARGET_FLASH. 2019-06-27 02:57:55 +02:00
Dominic Clifton aea8733e4f STM32H7 - Allow targets to override linker script. 2019-06-27 02:57:55 +02:00
Dominic Clifton 05c518847d [H7] Relocate startup files to match betaflight/master branch 2019-06-26 12:36:57 +02:00
jflyper dad1110181 [H7] Relocate LD files to match betaflight/master branch 2019-06-26 12:36:34 +02:00
functionpointer 7cb34205b3 [VTX] vtxTable factory flag and full integration of vtxTable (#8380)
Moved vtxtable frequency mode implementation into `vtx_common.c`.
This makes the implementation available for all vtx types and allows
for some code deduplication (see point below)

Removed band and channel tracking from tramp and rtc6705.
The hardware underlying both only support frequency mode and
the tracking is now done in `vtx_common.c` using the new factory flag.

Deleted vtxStringXXX. to continue supporting builds without
`USE_VTX_TABLE`, new infrastructure was created in
`drivers/vtx_table.c`, which loads fixed tables into vtxTableXXX
when built witout `USE_VTX_TABLE`. Individual vtx implementations no
longer need to load any band/channel tables. They only need to load
their individual power tables when built without `USE_VTX_TABLE`.
Additionally this allows for the next point:

Fully integrated vtxTableXXX and removed the old and no longer needed
indirection of frequency and power tables in `vtxDevice_t`.

Removed VTX_SETTINGS_* constants from `vtx_common.h` and replaced them
with the vtxtable equivalent.

rtc6705 implementation now uses power values from vtxtable instead of
using indices directly. It also stops using index 0. This makes it
consistent with other vtx implementations and is more user configurable.
It also cleans up `telemetry\srxl.c` which had to have a special case for rtc6705.

Finally, frequency entries in the vtxtable can now be marked as empty
by setting their frequency to 0. Betaflight will never allow a blocked
channel to be selected. This is useful for vtxtable index mode
(FACTORY flag set) where manufacturer-defined bands can be truncated
to ensure compliance with local laws and regulations.
2019-06-24 12:28:46 +02:00
Dominic Clifton e81d11049f Fix F1/F3 OPBL targets using wrong linker script. 2019-06-09 19:04:39 +02:00
Dominic Clifton 0632eeb934 Support compilation of EXST (EXTERNAL STORAGE) targets
- Initial

- Adjust load address of EXST firmware.

- Add helper script to pad an EXST binary to the expected size.

Padded firmware currently required due to a bug in the flash/dfu code
which causes anything less than a flash page size to be truncated when
uploading new firmware via the bootloader DFU.

- Minor linker script cleanups.

- STM32H7.mk change hardcoded TARGET_FLASH (384) to FIRMWARE_SIZE

- Delete unused configuration section entries from linker
scripts.

- Increase EXST firmware size to 448K.
It turns out 384K wasn't enough for a feature-complete firmware.

- Update pad-exst.sh to use 448K by default.

- Move the EXST file generation to the makefile.

[EXST] Embed firmware hash in ELF

- Add debug marker at end of CODE_RAM section.

It was found when transferring firmware to the H7 RAM via a BMP probe
using the 'gdb load' command, that the last few bytes were not
transferred, this debug marker is present to ensure all needed parts of
the firmware are present.

Example memory view of corrupted bytes at end of transfer:
0x2407DFAE  DEB90000 DEB9DEB9 DEB9DEB9 DEB9DEB9  ..¹Þ¹Þ¹Þ¹Þ¹Þ¹Þ¹Þ
0x2407DFBE  000000B9 00000000 00000000 00000000  ¹...............

should be:
0x2407DFAE  DEB9DEB9 DEB9DEB9 DEB9DEB9 DEB9DEB9  ¹Þ¹Þ¹Þ¹Þ¹Þ¹Þ¹Þ¹Þ
0x2407DFBE  00000000 00000000 00000000 00000000  ................

- Remove debug marker in EXST firmware.

STM32H750_EXST - Provide space for empty hash.

* Bootloader will run firmware if hash is empty, without re-verifying
RAM content against hash.
* CODE_RAM always shows as 100% usage.

STM32H750_EXST - Use a specific ELF section for a hash.

Two benefits:
1) CODE_RAM no-longer shows 100% full, since it is no-longer
padded/filled.
2) Prepares the code so that objcopy can be used to inject the hash
into the ELF.

STM32H750_EXST - Patch MD5 into ELF.

Process is now as follows.

* Binary generated (via make target dependency) so there is something to
hash.
* Binary copied (and padded).
* MD5 Hash computed.
* xxd patch file generated from hash.
* xxd hash patch applied to copy of binary at correct address.
* elf .exst_hash section dumped.
* hash injected into into dumped section.
* elf .exst_hash section updated with updated dumped section.

Replace EXST with USE_EXST.

Add documentation for the EXST firmware format.

Add table formatting to EXST documentation.

Update bootloader block.

Update H750 EXST linker script to use block format 0x00.

Use .exst.elf and .exst.bin on the exst files.

Add 'no checksum' to list of checksum hash methods.

Update EXST build system so it generates the following sets of files

obj/main/betaflight_TARGET.elf
obj/main/betaflight_TARGET.map
obj/main/betaflight_TARGET_EXST.elf
obj/betaflight_VERSION_TARGET.bin
obj/betaflight_VERSION_TARGET.bin.md5
obj/betaflight_VERSION_TARGET_EXST.bin

Update EXST build system to be more user-friendly.

* user-flashable files are generated in the normal place.
* Intermediate files are generated in `obj/main/...`
* Removes the `exst` goal.
* Adds .hex generation for EXST builds based on the patched .elf.

To build EXST targets, simply use `make TARGET=x` as normal and flash
the resulting `.hex/.bin` files rather than the .exst.bin file.

Developers can use either the `.elf` or patched `_EXST.elf` file as is
appropriate for their needs.

EXST documentation updated to match changes to build system.
2019-06-07 09:14:49 +12:00
jflyper 6beeca38c3 Consolidate F7 and H7 VCP HAL code except usbd_conf.c 2019-06-01 11:57:50 +09:00
jflyper dacb709e38 [H7] System and build files
Basic system files

- Initial system files

- Additional RCC clock enables for testing

- Coding style tidy (target/system_stm32h7xx.c) and enable MCO for testing

- Clock generator changes for SPI support

- Setup MPU for "D2 SRAM as write-through by MPU, call it DMA_RAM"

- Drop USB clock enabling from driver/system_stm32h7xx.c

- stm32h7_hal_conf.h for persistent object storage

Basic build files

STM32H7.mk changes

- STM32H7.mk for USE_UART and USE_SERIAL_RX

- Modify STM32H7.mk for inclusion of SPI driver

- STM32H7.mk change for D2 SRAM as write-through by MPU, call it DMA_RAM

- STM32H7.mk for DMA facility

- STM32H7.mk for [TIMER] For "Initial cut without Dshot"

- STM32H7.mk change for [LED_STRIP] Add LED_STRIP

- STM32H7.mk for [ADC] Initial cut without internal sensors

- STM32H7.mk for Enable I2C (HAL)

- STM32H7.mk for "Enable HAL-based DShot (no burst yet)"

- STM32H7.mk change for transponder

- STM32H750 - Add platform support.

- STM32H750 - Add H750 MCU ID.

- STM32H743 - Add MCU ID.

STM32H7.mk change for "Burst Dshot First working version"

Fix boot loader request

STM32H750 - Add PERSISTENT memory support.

STM32H743 - Add PERSISTENT memory support.

Use PERSISTENT memory for bootloader request.

Using DTCM RAM did not work on H750.

Change flash latency from 4WS to 2WS

STM32H750 - Fix reset of RCC_CR to reset value.

Note: The comment above the code didn't match code.

STM32H750 - Remove duplicate startup code, see SystemClock_Config.

STM32H7.mk changes for Port RTC backup register based persistent storage for H7

Make use of persistent object facility

Force reboot after possible boot loader activity

Enable CRS

stm32h7xx_hal_conf.h for H7 - QuadSPI support

stm32h7xx_hal_conf.h for STM32H7 - SDCard/SDIO using HAL Driver

stm32h7xx_hal_conf.h : Fix systick to be 0x00 instead of ST's default 0x0F.
This fixes the ability to use HAL_Delay() from an ISR, as required by
the ST's USB Library.
Specifically, systick handler must be a higher priority than the USB
FS/HS Interrupt handler priorities.

stm32h7xx_hal_conf.h for Add PID-Audio support

source.mk for H7 - QuadSPI support

drivers/system_stm32h7xx.c for H7 - QuadSPI support

STM32H7.mk for H7 - QuadSPI support

STM32H7.mk change for CDC-HID support

common_pre.h updates

- Scheduler parameters to same as F4 & F7

- Enable some important default features

- STM32H7 - Enable ITCM RAM.
Requires voltage scaling fix from commit
6e684c609310024141c43de484a5e78103140e3c

STM32H750 - Disable caches before reboot.

Prior to this when EEPROM_IN_RAM was used the persistent data section
would have corruption immediately after a reboot, prior to even the
Reset_Handler code having been executed.

drivers/system_stm32h7xx.c Touch-up after 2019-02-02 rebase

STM32H7 - Write protect ITCM ram.

Remove local defs for RESET_xxx symbols

STM32H750 - EXST firmware reboots to FLASH bootloader, rather than ROM bootloader.

STM32H750 - Disable some MCO/clock testing code as the pins interfere with new targets.

STM32H750 - Don't disable data caches after bootloader.

Observed that disabling dcache after cold boot with BOOT pin high causes
segfault.

drivers/system_stm32h7xx.c for STM32H7 - SDCard/SDIO using HAL Driver

drivers/system_stm32h7xx.c change for Move SDMMC clock init into SDIO driver

drivers/system_stm32h7xx.c: Cleanup some Clock/MCO/GPIO initialisation code.

drivers/system_stm32h7xx.c for Reset if systick is stuck.

STM32H7 - Fix missing CPU voltage scaling.

It appears this was the cause of other seemingly random issues:

* Crash soon after enabling USB.
* Flash write failures.
* Random un-explainable crashes.

Change RCC_HSE_BYPASS to RCC_HSE_ON

Even Nucleo-H743 seems to work without setting HSE_BYPASS.

STM32H7xx - Move memory section initialisation earlier into the init sequence.

Allows startup-code/libs/etc to be moved into different memory regions.

Don't touch vector table in EXST targets

STM32H750_EXST - fix boot loop

target/system_stm32h7xx.c for STM32H7 - SDCard/SDIO using HAL Driver

target/system_stm32h7xx.c change for Fix SD card clock speed selection

STM32H750_EXST - Reset MPU regions on boot.

* Failure to reset regions will result in mem-fault if bootloader has
configured a similar region.

STM32H750 - Fix missing include of platform.h in system_stm32h7xx.c

This caused the SDMMC peripheral clock to be un-configured (at reset
state) when USE_SDCARD_SDIO was defined.

Change MPU region number for DMA_RAM from 0 to 1

Avoid conflict with ITCM-RAM write protection.

STM32H7xx - HSERDY slow/stuck workarounds.

STM32H7xx - Fix region MPU number for SDIO.

* It was overwriting the previous region causing LED strip and
transponder issues.

Target/system_stmh7xx.c for Reset if systick is stuck.

startup/system_stm32h7xx.c change for non-caching DMA_RAM

H750 - Use SIZE optimization by default due to limited flash space.

STM32H7.mk for STM32H7 - SDCard/SDIO using HAL Driver

STM32H7.mk updates

- Decrease HSE_STARTUP_TIMEOUT to 1 second
* default is 5 seconds, which is too long when HSE gets stuck.

- Add PID-Audio support

Temporary override LINKER_DIR
2019-05-21 02:26:31 +09:00
jflyper ee9022de1e Add Winbond W25N01G support 2019-05-14 22:42:47 +09:00
jflyper e62cc6552d [F7] Move non-library CDC-HID code out of lib tree 2019-05-08 11:59:23 +09:00
mikeller 5141bbfa94 Moved 'rpm_filter' into 'flight'. 2019-05-06 00:10:31 +12:00
laz2wiringpi 22485e3e6e GPS Rescue cms menu 2019-04-15 10:33:38 -04:00
Michael Keller e12b802bb1
Merge pull request #7927 from krzysztofmatula/km-odometer
Flight statistics (odometer) added.
2019-04-14 21:49:31 +12:00
mikeller 2bed36b659 Make F3 targets unsupported to improve build times. 2019-04-14 19:31:24 +12:00
Krzysztof Matula 36c8f1e224 Flight statistics (odometer) added.
Supported counters:
- total flights count
- total flight time
- total flight distance (if GPS available)
2019-04-05 23:43:09 +02:00
Michael Keller 022d2708c8
Merge pull request #7623 from betaflight/bf-allow-per-file-compilation-without-optimization
Allow files to compiled without optimization.
2019-03-07 03:29:31 +13:00
Dominic Clifton e35d8a25d3 Allow files to compiled without optimization.
This is required when trying to see what the optimizer is doing to the
assembly or in aiding debugging CPU IMPRECISE bus fault errors.
2019-03-06 10:34:39 +01:00
Thorsten Laux cec679ac60 incorporte review feedback 2019-03-03 11:33:14 +01:00
Bruce Luckcuck 30672a37c5 Refactor OSD element display code
Remove the giant `select` block that contained all the code to generate the elements and transition them to individual functions called only when the element is active. Simplifies the code and results in a performance improvement as it's not necessary to fall through the large `select` statement for every element that will be drawn. The individual functions and the element to function mapping are moved to a new `osd_elements.c` file.

Moved the OSD related code files to a new `osd/` directory.

Also pre-analyze the active elements and only process those that are active. This also saves processing as it's not necessary to loop through all 50 or so elements when only a couple are active.

Various other cleanup and removal of stale or unnecessary code.

In the default configuration the element drawing phase of the OSD task is reduced from ~51us to ~35us - resulting in about a 30% decrease in processing time.
2019-02-21 14:03:25 -05:00
blckmn 1bedb1b911 Moved hal config headers etc to ./src/main/startup 2019-02-20 18:24:16 +11:00
jflyper 96fc6dc934 CLI parser for vtxtable 2019-02-06 15:24:02 +09:00
mikeller 38e1ce04df Reorganised interfaces, putting them where they are used. 2019-01-27 13:38:22 +13:00
Michael Keller af64f93a9a
Merge pull request #7367 from etracer65/cms_save_exit_popup
CMS exit/save popup menu
2019-01-12 17:51:23 +13:00
Bruce Luckcuck 5b5581fa2a CMS exit/save popup menu
Adds a new exit/save menu that can be displayed at any time using the yaw-right stick command. Yaw-left still functions as "back".

Allows the user to save their settings even while nested deep in multiple menus. Previously the user was required to back up all the way to the top level menu to save or exit.
2019-01-10 18:59:50 -05:00
Bruce Luckcuck 330d93eb5b Add CMS failsafe setup menu
Located under the Features top-level menu. Allows configuring the failsafe procedure (like selecting GPS-RESCUE if applicable).

Bounded with `#ifdef USE_CMS_FAILSAFE_MENU` so it can be disabled for space critical targets.
2019-01-10 15:22:36 -05:00
Thorsten Laux 8d4ed72e13 rpm telemetry based notch filter 2019-01-07 13:36:01 +01:00
jflyper fe182bb2fb Introduce dma_reqmap 2018-12-30 09:40:37 +09:00
jflyper c0d51a5f55 Convert F7s to use RTC backup register based persistent memory 2018-12-03 23:56:41 +09:00
jflyper 99fde1a0ff Use RTC backup register for persistent storage 2018-12-03 09:45:36 +09:00
phobos- c88a5a3a22 Refactored SPI RX led blink and bind plug functionality to rx_spi_common 2018-11-25 10:37:18 +01:00
jflyper 9f47d130b9 Adds the MCO driver facility for F7 targets
MCO2 output as run time configurable option
Add sanity check for MCO2 pin
changed output mode to AF from OUTPUT in mco driver
MCO for F4 is not implemented yet
Reinstate original OMNIBUSF7 target.h
Add config variable mco2_on_pc9
Make MCO2 pin hardcoded with mco2_on_pin control variable
fixed mco2 clock config corruption
removed unused pin definitions
2018-10-26 19:51:19 +02:00
jflyper 00840ce40f Prepare SD card SPI and SDIO variants for consolidation 2018-10-01 19:44:04 +09:00
Blaine eb5af3a161 Add support for the ST LIS3MDL 3-Axis Magnetometer per #6437 2018-09-16 19:56:13 -07:00
Andrej Podzimek 17b66067bb Adding a reusable mapping function between alt and base targets. 2018-09-11 06:06:50 +02:00
Andrey Mironov 7a331d03f4 Added preliminary support for STM32F765xx 2018-09-07 22:47:20 +03:00
mikeller 0bce8549ee Renamed 'fc/fc_' files to remove the double 'fc'. 2018-08-26 14:07:06 +12:00
Michael Keller 072a9dbdd5
Merge pull request #6410 from wind0r/update_gcc
update gcc
2018-08-17 00:23:10 +12:00
Michael Keller fdb4e20ed0
Merge pull request #6224 from Scavanger/CMS-for-Hott-Textmode
CMS for HoTT-Textmode.
2018-08-16 23:57:15 +12:00
Michael Keller 283e55e45d Removed SPRACINGF3OSD support. 2018-08-08 08:32:20 +12:00
Andrey Mironov 5542578d98 Added KISSFCV2F7 back to supported targets 2018-07-23 23:41:41 +03:00
mikeller 3663fcb285 Removed KISSFCV2F7 from build because of ITCM_RAM overflow. 2018-07-22 11:49:43 +12:00
Steffen Windoffer 1924700e28 update gcc 2018-07-21 11:46:10 +02:00
Michael Keller 362d42fcaf
Merge pull request #6365 from mikeller/add_msc_msp
Added MSP for reboot to MSC.
2018-07-17 19:29:25 +12:00
mikeller df55fc99ec Added MSP for reboot to MSC. 2018-07-17 18:34:06 +12:00
Anders Hoglund 0185018973 Build target groups populated dynamically. 2018-07-16 18:10:03 +02:00
Andi Kanzler 31830dc10c Bring the CMS to the HoTT-Textmode. 2018-07-01 01:05:43 +02:00
azolyoung 53458d4cf1 Change rcsplit protocol to async 2018-06-23 11:55:15 +08:00
mikeller 444e5c43a5 Fixed USB HID channel mapping in Windows. 2018-06-13 01:34:36 +12:00
mikeller 935d61694d Re-enabled building of KISSFCV2F7. 2018-06-09 11:11:46 +12:00
mikeller 1a2c129306 Fixed build for SPRACINGF3OSD. 2018-05-31 23:25:03 +12:00
mikeller a101a58b68 Added ability to set and check board info. 2018-05-31 23:25:03 +12:00
Michael Keller 69a80a3bb0
Merge pull request #5965 from loopur/mybranch
Add barometer sensor QMP6988
2018-05-25 15:54:47 +12:00
jflyper c60eecbff0 Drop software SPI RX support 2018-05-23 20:59:52 +09:00
Michael Keller 61328c3996
Merge pull request #5926 from mikeller/cleanup_sdk_tool_version_check
Cleaned up SDK version check.
2018-05-23 22:06:18 +12:00
mikeller 57854eefc4 Cleaned up SDK version check. 2018-05-21 13:44:04 +12:00
s0up ac6b8088c9 add gps rescue mode 2018-05-20 16:28:17 -07:00
Loopur d36858a220 Add baro sensor of QMP6988 2018-05-18 18:37:28 +08:00
Loopur 495cfb4d07 Add barometer sensor QMP6988 2018-05-18 16:26:07 +08:00
jflyper 6c044829cc Mark unused acc/gyro support toward retirement. 2018-05-16 14:31:39 +09:00
mikeller 7a03ead75e Made SIMULATOR_BUILD a makefile driven option. 2018-05-14 19:13:37 +12:00
s0up de5fa47c4c navigation feature / reference removal 2018-05-09 10:28:36 -07:00
jflyper 5edd0c746f Move serial.c from SPEED_OPTIMZED to SIZE_OPTIMIZED 2018-05-08 17:09:24 +09:00
blckmn aad6efdf03 Timer clean up in preparation for configurable timers 2018-05-06 06:55:17 +10:00
blckmn 48e62ab8d6 Simplified source.mk slightly to ensure some common, and pg files are always included in build. 2018-05-05 14:37:38 +10:00
Michael Keller f7d5568d52
Merge pull request #5819 from jflyper/bfdev-introduce-nomk-extension-for-no-build
Use ".nomk" to designate "No build" target
2018-05-05 13:10:50 +12:00
jflyper 35df29f0bc Use nomk to signify no build target name 2018-05-05 01:13:12 +09:00
Diego Basch c46be03047 added gps for altitude estimation, remove most unused code, rename altitude.c to position.c, add hdop to nmea 2018-05-04 08:45:26 -07:00
jflyper 77cbeab783 Exclude KISSFCV2F7 from CI 2018-05-03 09:42:10 +09:00
jflyper ac13e87c86 OmniNXT F4/F7 support 2018-04-27 09:42:21 +09:00
Michael Keller 3ef12389da
Merge pull request #5743 from codecae/crsf_displayport
CMS Telemetry over CRSF w/ Lua Script (X9D, so far)
2018-04-25 00:09:58 +12:00
Curtis Bangert 9d4d3ad45c CMS Telemetry over CRSF w/ Lua Script (X9D, so far) 2018-04-23 22:34:30 -04:00
jflyper 0e4684e828 Serial port function mask initializer as a config helper 2018-04-23 21:44:40 +09:00
jflyper 0306accf6e FLASH Add W25M homogeneous stack driver and W25M512 support (#5722)
* Winbond W25M homogeneous mode driver

* W25M512 support on OMNIBUSF4 variants
2018-04-20 16:37:48 +12:00
Andrey Mironov bf984f39b1 F7 optimizations (#5674)
* Revert "Revert "Rewritten F7 dshot to LL (draft)" (#5430)"

This reverts commit aa42a69d2f.

* Reworked F7 linker scripts to maximize performance of both F74x and F72x

* Some comments and changes from original F7 HAL DSHOT

* Prohibit inlining of some functions to place them in ITCM-RAM

* Fixed usartTargetConfigure implicit declaration

* Moved back to SRAM1 as main RAM

* Added SRAM2 attribute

* Fixed LL DSHOT FOR SPRF7DUAL and probably other adv TIM users

* Fixed SPRF7DUAL rev. A motor order

* Enabled CCM for data on F40x

* Fixed F7 startup assembly symbols

* Fixed KISSFCV2F7 linker script

* Added a quick way of building F7 targets only

* Got rid of the useless F7 target script

* Added NOINLINE and got rid of useless __APPLE__ define

* Added some important functions to ITCM

* Added NOINLINE macro for tests

* Copy to ITCM before passing execution into it

* Minimized cache footprint of motor output code

* Evicted low-impact functions from ITCM

* Switched MATEKF722 and SPRACINGF7DUAL to burst DSHOT

* Switched CLRACINGF7 to burst DSHOT

* Moved UART RX&TX buffers to DTCM-RAM to avoid cache incoherency

* Marked taskMainPidLoop for ITCM-RAM, disallowed inlining per-function

* Revert "Added a quick way of building F7 targets only"

This reverts commit 22945189980deaf493be54a5056a080e7edad629.
2018-04-20 08:37:32 +12:00
jflyper 864dba98c1 Prepare flash code for multiple device type support (#5683)
* Prepare flash drivers for multiple device type support

* Add static assertions on device page and flashfs alloc sizes.
2018-04-19 21:05:42 +12:00
jflyper d749879cf6 FAT emulation of onboard flash for MSC (#5650) 2018-04-11 11:29:56 +12:00
jflyper 2811171ea3 Prepare MSC for simultaneous multiple storages 2018-04-09 11:18:59 +09:00
Chris 9d5fa7311e Add MSC for F7 (#5629)
* Add MSC for F7

* Fix compilation error.
2018-04-06 12:53:26 +12:00
Michael Keller 75bafb7b71
Merge pull request #3039 from cleanflight/f7-transponder-ir (#5618)
CF/BF - Add support for IR Transponder on STM32F7 boards.
2018-04-06 03:44:18 +12:00
Chris c71cfe1b8c Cache up SDIO Writing, add option to enable clock bypass. (#5612)
* Speed up SDIO Writing, add option to enable clock bypass.

* Fix identation

* Requested changes

* Move PG SDIO into correct place.
2018-04-05 12:52:30 +12:00
conkerkh 494e42610e Add SDIO for F7 (#5604) 2018-04-04 01:03:54 +12:00
conkerkh f00e4f2a82 Simplify compilation of F4 SDIO enabled targets. (#5603) 2018-04-02 14:41:16 +12:00
conkerkh a9136e2ba0 Add CDC+HID on F7 (#5596) 2018-04-02 14:35:51 +12:00
Michael Keller 92d19e7be6
Merge pull request #3036 from cleanflight/spracingf7dual-pidaudio (#5586)
PID-Audio feature
2018-04-01 11:08:41 +12:00
codecae 8131e4f840 Created generic SmartAudio interface (#5561) 2018-03-31 13:01:30 +13:00
codecae 22004cfd56 Created generic Tramp protocol interface (#5527) 2018-03-30 17:50:19 +13:00
conkerkh b9ab42d6a7 Enable Composite USB HID for all F4, add PG for USB device. (#5525) 2018-03-25 12:44:57 +13:00
Michael Keller a8e86880f5
Generalised USB MSC use for all F4 targets with SD card. (#5519) 2018-03-24 16:00:53 +13:00
conkerkh 4786e1a333 Add Composite CDC+HID device option. (#5478)
* Add Composite CDC+HID device option.

- It passes on though HID interface 8 channels received from TX
- Endpoints are reconfigured to support HID interface
- Potentially this can slow down SPI Flash transfer though CDC interface...
- This could be addressed by support for MSC when using SPI Flash (emulating FATFS)

* Different way to handle MIN redefine
2018-03-22 15:21:22 +13:00
conkerkh 3a917a3755 Add USB Mass Storage Class support (#5443)
* Add MSC support

* Add support for MSC to WORMFC and SDIO_DMA

* Cleanup in fc_init

* Fix headers
2018-03-22 00:11:34 +13:00
Petr Ledvina 2abcaebd81 Reimplement strtol/strtoul/atoi (#5400)
newlibc version is pulling in (part of) locale support

Adapted from uClibc source code
Addded support for 0b.... prefix for binary numbers
2018-03-13 09:24:15 +13:00
Dominic Clifton 0a2e5a5878 CF/BF - Update DSP_Lib and STM32F7/Drivers/CMSIS to CMSIS 5.3.0. (#5431)
* CF/BF - Update DSP_Lib and STM32F7/Drivers/CMSIS to CMSIS 5.3.0.

CMSIS 5.3.0 - https://github.com/ARM-software/CMSIS_5/releases/tag/5.3.0

* cleanup lib.

* pfft

* relocate driver files from lib/main/CMSIS/CM* to lib/main/STM32xx
folders

* Move DSP folder inside CM5.

It came from the same source as the other files inside CM5

* Remove the CM5 folder and move the files in it one level up.
2018-03-12 09:34:43 +13:00
Míguel Ángel Mulero Martínez 73eb5d396e Add compass QMC5883L driver (#5309) 2018-03-04 11:45:54 +13:00
Dominic Clifton cde9a9517b SPRacingF7DUAL - Dual SIMULTANEOUS gyro support. (#5264)
* CF/BF - Set STM32F7 SPI FAST clock to 13.5Mhz - Gyros not stable at
27mhz.

* CF/BF - Initial SPRacingF7DUAL commit.

Support two simultaneous gyro support (code by Dominic Clifton and Martin Budden)
There are new debug modes so you can see the difference between each gyro.

Notes:
* spi bus instance caching broke spi mpu detection because the detection
tries I2C first which overwrites the selected bus instance when using
dual gyro.
* ALL other dual-gyro boards have one sensor per bus.  SPRacingF7DUAL is has two per bus and thus commit has a lot of changes to fix SPI/BUS/GYRO initialisation issues.

* CF/BF - Add SPRacingF4EVODG target.

This target adds a second gyro to the board using the SPI pads on the back of the board.

* CF/BF - Temporarily disable Gyro EXTI pin to allow NEO target to build.
2018-03-04 11:29:31 +13:00
Petr Ledvina c11d016bc7 optimize math (#5287)
* optimize math

Results in considerable flash saving

* log_approx, exp_approx, pow_approx

Taken from https://github.com/jhjourdan/SIMD-math-prims/blob/master/simd_math_prims.h

* Fix pow in rangefinder

* Use approximate function in baro calculation

Maximum error is < 20cm

* fixup! Fix pow in rangefinder
2018-03-04 01:26:33 +13:00
rotcehdnih 89f8a377c9 ADD FPVM_BETAFLIGHTF7 Target 2018-03-01 19:49:35 +11:00
jflyper 6557b161aa Add box to pinio monitor/mapper 2018-02-12 13:54:40 +09:00
jflyper 8f76a11081 Generic pin output driver 2018-02-11 15:57:28 +09:00
Michael Keller 81e75badf3
Merge pull request #3724 from DanNixon/cms_power_config
CMS power menu
2018-02-11 13:19:30 +13:00
Michael Keller ec4b3b0d60 Revert "CAMERA_CONTROL Drop software PWM mode" 2018-02-11 12:33:00 +13:00
jflyper 93ce6e542a Separate pg related to pg directory 2018-02-09 16:46:12 +09:00
jflyper 86149361ab Drop softpwm option
Also separates PG related code to pg directory.
2018-02-04 12:29:22 +09:00
Dan Nixon 22874d8ba2 CMS power menu
Menu including:
- Voltage meter selection
- Current meter selection
- Max cell voltage (moved from MISC menu)
- Voltage scale adjust (moved from MISC menu)
- ADC current scale and offset adjust
- Virtual current scale and offset adjust
2018-02-01 15:31:45 +00:00
Michael Keller 14b3d574f7
Revert "Size Optimization: Move time-critical code from fc_core.c to fc_tasks.c" 2018-01-31 08:41:46 +13:00
Bruce Luckcuck 4712b0aca1 Discussion: Move time-critical code from fc_core.c to fc_tasks.c
Change fc_core.c to be size-optimized to reduce overall firmware size. Saves 3288 bytes on OMNIBUS as an example.
2018-01-29 20:11:25 -05:00
blckmn 39bb6ffe04 Configurable SDCARD, and clean up of DMA. 2018-01-29 11:50:14 +11:00
Anders Hoglund ac76179942 Spektrum VTX control moved to VTX control task. Added some missing compile conditionals and a few cosmetic updates too. 2018-01-26 13:52:29 +01:00
Martin Budden a4772d9dea
Merge pull request #4999 from martinbudden/bfa_mixer_tri
Add hooks for triflight
2018-01-23 10:59:29 +00:00
mikeller 67f08ce04d Stopped nrf24 drivers from being built for all targets for build time reduction. 2018-01-21 10:37:11 +13:00
Martin Budden ccb49583e9 Add hooks for triflight 2018-01-20 13:59:45 +00:00
Michael Keller 4258651b3a
Merge pull request #4881 from jflyper/bfdev-adc-internal-full-task-version
VREFINT and core temperature support, full task polling version
2018-01-10 16:12:05 +13:00
jflyper a03b85025c Internal ADC support, full task polling version 2018-01-10 11:49:56 +09:00
Chris efc556f91a Add LPS25HB driver 2018-01-07 18:00:19 +01:00
mikeller 09d396c05c Cleaned up parameter group handling.
Fixed missing include.
2017-12-31 10:51:01 +13:00
Anders Hoglund 1605b15cff Clean up the verbosity usage with echo commands in makefiles. 2017-12-30 16:28:52 +01:00
mikeller 0b9884961d Updated handling of FrSky telemetry processing, renamed to `FrSkyHub` for disambiguation. 2017-12-28 11:01:35 +13:00
mikeller b38738894c Moved bus_spi parameter group to `pg/`. 2017-12-25 07:24:32 +13:00
mikeller f6bdfd91e2 Moved beeper parameter groups to `pg/`. 2017-12-24 17:56:37 +13:00
Michael Keller 351294d19a
Merge pull request #4835 from mikeller/move_vcd_to_pg
Moved vcd parameter group to `pg/`.
2017-12-24 16:13:59 +13:00
mikeller 2d930b28ce Moved vcd parameter group to `pg/`. 2017-12-24 15:13:48 +13:00
mikeller b928950598 Moved rx drivers into `drivers/rx/`. 2017-12-24 13:55:18 +13:00
mikeller d82c72bc54 Moved sdcard parameter group to `pg/`. 2017-12-24 12:23:27 +13:00
mikeller 9cb4f6b097 Moved parameter group for rx_pwm to `pg` directory. 2017-12-24 10:04:45 +13:00
Michael Keller bf3dd1991d
Merge pull request #4824 from mikeller/move_max7456_pg
Moved max7456 parameter group into `pg/` directory.
2017-12-24 09:40:13 +13:00
mikeller 200167aaf7 Moved max7456 parameter group into `pg/` directory. 2017-12-24 09:09:26 +13:00
Martin Budden 671382234a Enabled switch fallthrough checking by compiler 2017-12-23 19:46:40 +00:00
mikeller 429c6cecda Moved parameter group for flash into `pg/`. 2017-12-24 02:21:02 +13:00
Michael Keller 060c4d3e9a
Merge pull request #4820 from mikeller/move_i2c_pg
Moved I2C parameter group into `pg` directory.
2017-12-24 01:35:09 +13:00
Steffen Windoffer 32fef3019a update to gcc 7 2017-12-23 13:05:11 +01:00
mikeller fa6a723c35 Moved I2C parameter group into `pg` directory. 2017-12-24 00:33:32 +13:00
Michael Keller a618de9e8e
Merge pull request #4793 from jflyper/bfdev-rangefinder-benewake-new
RANGEFINDER Add Benewake TFmini/TF02 support
2017-12-22 18:11:03 +13:00
Michael Keller 2df7b82037
Merge pull request #4785 from AndersHoglund/split_spektrum_rx_rssi
Moved Spektrum RX RSSI stuff to separate source files.
2017-12-21 14:26:02 +13:00
jflyper a510091bf1 Add Benewake TFmini/TF02 support 2017-12-21 02:21:36 +09:00
Anders Hoglund 6ec0b55c95 Moved Spektrum RX RSSI stuff to separate source files. 2017-12-20 10:45:58 +01:00
jflyper 11c47c631b Port iNav's rangefinder 2017-12-20 12:54:19 +09:00
mikeller b489d0ba9d Renamed 'parameter_group' to 'pg'. 2017-12-19 23:36:31 +13:00
Anders Hoglund 23b31736b7 Moved Spektrum VTX control stuff to separate source files. 2017-12-18 23:14:50 +01:00
Michael Keller 379382036f
Merge pull request #4680 from martinbudden/bfa_pg_adc
Separated ADC parameter group code into separate files
2017-12-18 19:05:48 +13:00
Martin Budden ed30e9f5c7 Moved gyro_sync into drivers/accgyro directory 2017-12-17 16:01:50 +00:00
felix cfc0dcf036 KISSFCV2F7 BF target 2017-12-16 10:19:28 +01:00
Martin Budden 725f0dfa26 Separated ADC parameter group code into separate files 2017-12-15 01:31:29 +00:00
Martin Budden d6d70d5a74 Fixed F1 build 2017-12-01 06:50:34 +00:00
Michael Keller 5fee45b704
Merge pull request #4643 from jflyper/bfdev-target-and-mcu-dependent-optimzation-alternative
Add MCU dependent optimization to sources.mk
2017-11-28 19:17:56 +13:00
Michael Keller 9e06c65fc1
Merge pull request #4653 from ledvinap/string_light
Use local implementation of some string functions
2017-11-26 02:04:30 +13:00
Petr Ledvina 91fff0a6dd Use local implementation of some string functions
library versions are replaced (libeary functions are weak).
System ctype.h is implemented using macros, local header file
(in -I path) is provided to override system one.
2017-11-24 13:01:39 +01:00
jflyper 5ada200874 Non-F3 list 2017-11-23 23:09:18 +09:00