1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 13:25:30 +03:00
Commit graph

11902 commits

Author SHA1 Message Date
Michael Keller
7b2bdf304e
Remove blank overwrite in the OSD (#8416)
Remove blank overwrite in the OSD
2019-06-14 00:31:29 +12:00
Michael Keller
7b7250a811
Refactor of OSD fonts (#8390)
Refactor of OSD fonts
2019-06-14 00:31:11 +12:00
Michael Keller
9872dcd529
Remove unused nav_mode and related from GPS code (#8413)
Remove unused nav_mode and related from GPS code
2019-06-13 23:40:07 +12:00
azolyoung
568dc62087 use array to store the port1&port2 config 2019-06-13 16:17:11 +08:00
Dominic Clifton
45f8168b60 Prevent the system from booting when EEPROM_IN_FLASH is used and the
flash chip is not detected.

This will ensure that the flash config partition will always be present
when requested.
2019-06-13 09:16:29 +02:00
Dominic Clifton
720132b2af Improve robustness of reading config from flash. 2019-06-13 09:16:29 +02:00
Dominic Clifton
cf1ce1a67b Support load/save configuration to external flash
Fixes to 6a3e7d8e6 as the flash partition code had changed during
the merge to master.
2019-06-13 09:16:29 +02:00
Michael Keller
a6c07b046b
Allow the use of EEPROM_IN_RAM on MCUs. (#8376)
Allow the use of EEPROM_IN_RAM on MCUs.
2019-06-13 13:08:47 +12:00
Miguel Angel Mulero Martinez
fdc6aab7a9 Remove remaining blank overwrite in OSD warnings 2019-06-12 14:07:57 +02:00
Dominic Clifton
cf5e75bed4 Improve the code gating for the EEPROM_IN_FLASH and EEPROM_IN_FILE
cases.
2019-06-12 13:47:49 +02:00
Michael Keller
b3b535724e
Fix Flash API timeout issues. (#8401)
Fix Flash API timeout issues.
2019-06-12 23:24:16 +12:00
Dominic Clifton
bc19915bc1 Remove TARGET_EEPROM_INIT/targetEEPROMInit.
Since the only target specific code was for SITL, and really it wasn't
target specific but EEPROM_IN_FILE specific the code is just gated by
the EEPROM_IN_FILE define.
2019-06-12 12:58:52 +02:00
Dominic Clifton
2c4b8eaec3 Cleanup defaults for alternative config storage.
* Provide defaults for EEPROM_SIZE.
* __config_start/end.
2019-06-12 12:47:51 +02:00
Dominic Clifton
e83ba0db0e Allow the use of EEPROM_IN_RAM on MCUs.
If the MCU also supports PERSISTENT ram (not erased on a warm boot) it
allows testing of config changes without wearing out your flash.

e.g.

linker script
-------------
comment out __config_start/__config_end

target.c
--------
PERSISTENT uint8_t eepromData[EEPROM_SIZE]; // persistent, so it
survives warm boots.

target.h
--------
extern uint8_t eepromData[EEPROM_SIZE];

SITL actually keeps the EEPROM in a FILE, loaded into RAM using
alternate FLASH_* implementation.
2019-06-12 12:47:51 +02:00
Dominic Clifton
b09012621b Update default flash bulk-erase timeout and improve developer
documentation regarding timeouts.
2019-06-12 12:22:07 +02:00
Miguel Angel Mulero Martinez
f759ba75d7 Remove remaining blank overwrite in OSD elements 2019-06-12 08:48:29 +02:00
azolyoung
b7270917c8 add left side choosable for passthrough 2019-06-12 09:51:00 +08:00
Michael Keller
13389970c4
Some fixes for persistent stats. (#8408)
Some fixes for persistent stats.
2019-06-12 13:23:22 +12:00
Michael Keller
6b80fe83e1
Add missing CLI parm for ESC RPM Frequency OSD element (#8404)
Add missing CLI parm for ESC RPM Frequency OSD element
2019-06-12 13:21:56 +12:00
Michael Keller
0ea4a09850
Fix compile error if USE_ESC_SENSOR is not defined (#8403)
Fix compile error if USE_ESC_SENSOR is not defined
2019-06-12 13:18:31 +12:00
Bruce Luckcuck
9d2cda0b97 Remove unused nav_mode and related from GPS code
Eliminates some unused and unnecessary averaging calculations as well.
2019-06-11 13:35:40 -04:00
mikeller
1920a61226 Some fixes for persistent stats. 2019-06-11 02:05:19 +12:00
Bruce Luckcuck
778df74729 Add missing CLI parm for ESC RPM Frequency OSD element 2019-06-09 18:42:24 -04:00
Bruce Luckcuck
a1d5df0530 Fix compile error if USE_ESC_SENSOR is not defined
Also correct dependencies to USE_DSHOT_TELEMETRY instead of USE_RPM_FILTER.
2019-06-09 18:16:09 -04:00
Dominic Clifton
6189d6bdc5 Fix Flash API timeout issues.
Flash operations can specify how long to wait before the next operation
is issued.

Prior to this the amount of time waited, and when, was wrong.

e.g.
m25p16_eraseCompletely - possibly waits ages TO START, starts, exit.
m25p16_pageProgramContinue - waits DEFAULT_TIMEOUT_MILLIS to START,
starts, exits.

m25p16_pageProgramContinue would fail to write to the flash as the
device was still busy erasing and didn't wait long enough.


what happens now is:
m25p16_eraseCompletely - waits using the current timeout, starts, sets
timeout to be `now + BULK_ERASE_TIMEOUT_MILLIS`, exits.
m25p16_pageProgramContinue - waits using the current
`BULK_ERASE_TIMEOUT_MILLIS`, starts, exists, sets timeout to be `now +
DEFAULT_TIMEOUT_MILLIS`.

Since the timeout is stored in the flashDevice_t the solution also works
for multi-die devices which use an instance of flashDevice_t for each
die.
2019-06-09 20:31:24 +02:00
jflyper
22d046c879 [H7] Add USE_TIMER_MGMT to H7 2019-06-10 00:00:16 +09:00
Michael Keller
ad00c6b66b
[H7] Support USE_DMA_SPEC (#8389)
[H7] Support USE_DMA_SPEC
2019-06-10 01:20:55 +12:00
Michael Keller
d95b6ffaf2
Use DEFW instead of DEFA for UART dmaoptEntryTable (#8392)
Use DEFW instead of DEFA for UART dmaoptEntryTable
2019-06-09 20:12:00 +12:00
jflyper
6225b07c0b dma_reqmap.c updates 2019-06-09 11:50:16 +09:00
Michael Keller
43e90da1b0
[H7] Fix TIM13 and TIM14 def in timer_def.h (#8388)
[H7] Fix TIM13 and TIM14 def in timer_def.h
2019-06-09 12:41:08 +12:00
Michael Keller
843852e744
[H7] Cleanup io (#8391)
[H7] Cleanup io
2019-06-09 12:06:46 +12:00
jflyper
7db7431aeb Use DEFW instead of DEFA for UART dmaopts 2019-06-08 11:44:37 +09:00
MJ666
252f49872f Add RacePIT mini
RacePIT documentation update
2019-06-07 16:07:04 +02:00
jflyper
8185ee03ef [H7] Cleanup / consolidate io.c and io.h 2019-06-07 21:22:41 +09:00
Miguel Angel Mulero Martinez
240975f736 Refactor of OSD fonts 2019-06-07 12:35:02 +02:00
jflyper
246fba741b NUCLEOH743 update for USE_DMA_SPEC 2019-06-07 14:46:28 +09:00
Michael Keller
e3c8b1b46a
Support compilation of EXST (EXTERNAL STORAGE) targets (#8377)
Support compilation of EXST (EXTERNAL STORAGE) targets
2019-06-07 12:38:14 +12:00
jflyper
16f2392458 [H7] Add USE_DMA_SPEC to H7 2019-06-07 08:00:52 +09:00
Michael Keller
c6041e1ed6
[NUCLEOH743] Add missing USE_ADC (#8383)
[NUCLEOH743] Add missing USE_ADC
2019-06-07 09:19:43 +12:00
Michael Keller
c57d858774
Remove second symbol in the Throttle OSD element (#8372)
Remove second symbol in the Throttle OSD element
2019-06-07 09:17:24 +12:00
Michael Keller
62a815bb10
[H7] Use channel member for H7 DMA request (#8382)
[H7] Use channel member for H7 DMA request
2019-06-07 09:16:28 +12: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
76b508d17a [H7] Fix timer_def.h for TIM13 and TIM14 2019-06-06 15:23:04 +09:00
Michael Keller
0c8c671cde
Support MPU6000 for KakuteF7 (#8375)
Support MPU6000 for KakuteF7
2019-06-06 03:11:32 +12:00
Michael Keller
b5b18863dc
Fix GPS coordinate in the OSD between 0 and -1 (#8374)
Fix GPS coordinate in the OSD between 0 and -1
2019-06-06 01:33:16 +12:00
jflyper
97602c13b3 [NUCLEOH743] Add missing USE_ADC 2019-06-05 18:14:46 +09:00
jflyper
e18c4ec662 [H7] Use channel member for H7 DMA request 2019-06-05 18:13:17 +09:00
Michael Keller
d486c47bc1
Removed 'slots' from the adjustment range configuration. (#8369)
Removed 'slots' from the adjustment range configuration.
2019-06-05 18:51:02 +12:00
Michael Keller
d3a70bc635 Added comment about removed parameter in CLI. 2019-06-05 13:30:30 +12:00
Miguel Angel Mulero Martinez
a12f425325 Fix GPS coordinate in the OSD between 0 and -1 2019-06-04 16:47:18 +02:00