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

23 commits

Author SHA1 Message Date
ctzsnooze
254da8f460
Altitude hold for 4.6 (#13816) 2024-09-04 20:29:03 +10:00
Petr Ledvina
3e130de49c
Makefile - remove -j0 (#13838)
Makefile - don't override user-supplied --jobs argument

Some targets will default to parallel build, but only when no
-j / --jobs argument is specified on make command line
2024-08-30 16:12:17 +02:00
J Blackman
5d5697177a
CLEANUP: Removing source wild cards from makefiles (#13834) 2024-08-23 05:59:17 +10:00
luckk
6dcc268918
Add apm32f405/f407 support (#13796)
* Add APM32F4 driver libraries and USB middleware

* Add the APM32F405 and APM32F407 target files

* Add APM32 startup files

* Add APM32F4 linker files

* Add APM32F4.mk

* Add APM32 driver files

* Add APM32F40X MCU type

* Sync with the Betaflight master branch and modify the driver directory structure

* Implement CLI on the APM32

* Implement ADC on the APM32

* Implement  config streamer on the APM32

* Implement I2C on the APM32

* Implement SPI on the APM32

* Implement DSHOT on the APM32

* Implement transponder ir on the APM32

* Implement serial uart on the APM32

* Implement MCO on the APM32

* Implement DWT on the APM32

* Update the init.c file, adding APM32 MCO configuration

* Remove all duplicated APM32 driver files and retaining only the APM32 LIB directory

* Create APM32F4.mk

* Add linker files for APM32F405 and APM32F407

* Add startup and library config files for APM32F405 and APM32F407

* Add target files for APM32F405 and APM32F407

* Add apm32 MCU driver files

* Add build configuration for APM32 MCU

* Implement config streamer on APM32

* Implement CLI on the APM32

* Implement ADC on the APM32

* Implement RCC on the APM32

* Implement MCO on the APM32

* Implement I2C on the APM32

* Implement SPI on the APM32

* Implement serial uart on the APM32

* Implement IO on the APM32

* Implement DMA on the APM32

* Implement DSHOT on the APM32

* Implement transponder ir on the APM32

* Update init.c

* Add the inclusion of the 'platform.h' file to the APM USB driver source file

* Merge bus SPI duplicate code from APM32 to STM32

* Update timer_apm32.c

* Merge motor duplicate code from APM32 to STM32

* Merge serial uart duplicate code from APM32 to STM32

* Update APM32F4.mk

* Update cli.c

* Update APM32F4.mk

* Remove the apm32_flash_f4_split.ld

* Associate the apm32 linker file with stm32_flash_f4_split.ld
2024-08-19 08:34:31 +10:00
Ivan Efimov
8f10f17245
Piecewise linear interpolation routine (#13798)
* piecewise linear interpolation routines

* haslinghuis review

* triling spaces removed

* KarateBrot review

* ledvinap's review

* minor style fixes
2024-08-07 18:21:02 +02:00
J Blackman
5762688f6d
CLEANUP: Move flash drivers to their own directory (#13691)
* CLEANUP: Move flash drivers to their own directory

* Missed flash_w25q128fv.h.

* Directories in #include, and specifying all source files explicitly.

* Revert RX driver src file implicit declaration
2024-06-25 16:24:40 +02:00
J Blackman
c2c3d6740c
CLEANUP: MCU file locations (#13692) 2024-06-22 09:21:08 +10:00
J Blackman
a84042199d
CLEANUP: small adjustment to the legacy gyro directory (#13693)
* CLEANUP: small adjustment to the legacy gyro directory

* Legacy source explicit declaration.
2024-06-20 19:58:25 +02:00
J Blackman
a49c5c3a35
Adding initial H563 target files in preparation (#13686)
* Adding initial H563 target files in preparation
* Start up files
* Explicit inclusion of source files for @ledvinap suggestion
- adding system_stm32h5xx.c
2024-06-16 12:57:35 +10:00
J Blackman
d82c8facb2
Cleanup HAL usb driver (#13669) 2024-06-11 12:53:33 +10:00
Steve Evans
ab022b0467
Add support for W25N02K 2Gbit/256Mbyte FLASH (#13677)
* Add support for W25N02K 2Gbit/256Mbyte FLASH

* Remove duplicate defintion check

* Rename W25N01G_BB_*_BLOCK macros

* Remove debug

* Create unified driver for W25N01G and W25N02K devices

* Put device parameters in a table

* Add W25N01GV to stacked die driver
2024-06-09 08:30:33 +10:00
Mark Haslinghuis
1074950e42
Update ARM SDK (#12286)
* Update ARM SDK
* Add ARM_SDK_BASE_DIR
* Update ARM SDK to latest 13.2.Rel1
2024-05-30 13:06:42 +10:00
Petr Ledvina
76178a232f
I2C - unify i2cUnstick implementation, improve unstick a bit (#13541)
* I2C - unify i2cUnstick implemntation, improve unstick a bit

Three copies were spread in I2C implementations.

- i2cUnstick is a bit more carefull about clock stretching
- bus status is returned (return true when bus in idle state)

* fixup! I2C - unify i2cUnstick implemntation, improve unstick a bit

* fixup! I2C - unify i2cUnstick implemntation, improve unstick a bit

---------

Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
2024-04-20 17:07:53 +02:00
RoboSchmied
39c4603ac4
Fix typo in [tools.mk] (#13398)
fix typo in [tools.mk]

fix a small typo
tookchain -> toolchain
2024-04-10 09:37:36 +10:00
Károly Kiripolszky
9dfa09a07e
Extend build info with defined flags (#13333)
* Extend build info with defined flags

* Fix CI

* Formatting

* Update license header

* Build options (WIP)

* Review fixes

* Add MSP build info generator

* Review fixes

* Add input hash

* Fix for PascalCase

* Add comment about MSP version
2024-03-21 18:29:22 +01:00
Thomas Stibor
94be8f0673
Fix openocd makefile target by using TARGET_MCU_FAMILY (#13410)
* Fix openocd makefile target by using TARGET_MCU_FAMILY

The condition before this commit in mk/openocd.mk

ifeq ($(TARGET_MCU),STM32F4)
OPENOCD_CFG := target/stm32f4x.cfg

else ifeq ($(TARGET_MCU),STM32F7)
OPENOCD_CFG := target/stm32f7x.cfg
else
endif

ifneq ($(OPENOCD_CFG),)
OPENOCD_COMMAND = $(OPENOCD) -f $(OPENOCD_IF) -f $(OPENOCD_CFG)
endif

resulted in a not defined OPENOCD_COMMAND, because TARGET_MCU does not
contain the MCU family such as STM32F4, but e.g. STM32F411xE.

Thus executing e.g (note: CONFIG=BLACKPILL411 is a custom config I created for the Blackpill Board)

$ make DEBUG=GDB CONFIG=BLACKPILL411 openocd-gdb
make: *** No rule to make target 'openocd-gdb'.  Stop.

whereas after the patch:
$ make DEBUG=GDB CONFIG=BLACKPILL411 openocd-gdb

...
...
Linking STM32F411_BLACKPILL411
Memory region         Used Size  Region Size  %age Used
           FLASH:        7680 B        16 KB     46.88%
    FLASH_CONFIG:          0 GB        16 KB      0.00%
          FLASH1:      329297 B       480 KB     67.00%
   SYSTEM_MEMORY:          0 GB        29 KB      0.00%
             RAM:       62612 B       128 KB     47.77%
       MEMORY_B1:          0 GB         0 GB
   text	   data	    bss	    dec	    hex	filename
 331757	   5220	  56980	 393957	  602e5	./obj/main/betaflight_STM32F411_BLACKPILL411.elf
openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg & ./tools/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gdb ./obj/main/betaflight_STM32F411_BLACKPILL411.elf -ex "target remote localhost:3333" -ex "load"
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 2000 kHz
...
...
[stm32f4x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08009014 msp: 0x2001fff0
Start address 0x08009014, load size 336977
Transfer rate: 37 KB/sec, 11232 bytes/write.
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x08021a1c in scheduler () at ./src/main/scheduler/scheduler.c:695
695	                    task->taskAgePeriods = (cmpTimeUs(currentTimeUs, task->lastExecutedAtUs) / task->attribute->desiredPeriodUs);
(gdb) quit

works as expected.

In addition add also G4 and H7 TARGET_MCU_FAMILY support. When installing openocd the config files for G4 and H7, should
be provided in directory: /usr/share/openocd/scripts/target

$ grep -r TARGET_MCU_FAMILY | awk '/ STM32/{print $3}' | sort | uniq && find /usr/share/openocd/scripts/target -type f | grep "stm32f4x.cfg\|stm32f7x.cfg\|stm32g4x.cfg\|stm32h7x.cfg"

STM32F4
STM32F7
STM32G4
STM32H7

/usr/share/openocd/scripts/target/stm32g4x.cfg
/usr/share/openocd/scripts/target/stm32h7x.cfg
/usr/share/openocd/scripts/target/stm32f4x.cfg
/usr/share/openocd/scripts/target/stm32f7x.cfg

* Remove useless else
2024-03-08 11:14:26 +01:00
Steve Evans
05eda719ff
Install linux tools for appropriate architecture (#13335) 2024-01-29 21:37:51 +01:00
Steve Evans
465b05ec06
STMicro LIS2MDL mag support (#13150)
* STMicro LIS2MDL mag support

* Fix copyright headers

* Update PG_COMPASS_CONFIG
2023-12-06 07:14:35 +11:00
Ivan Efimov
dfef3bfb0e
Added throttle flight statistics (#12978)
* Added throttle flight statistics

* Changed rc_stats.c/h license header to a modern one

* rc_stats.c Style fix
2023-08-06 17:32:57 +02:00
Ivan Efimov
9332248742
Adding OSD quick menu (#12977)
* QUICK CMS menu

* Added RPM LIMIT to quick menu

* rpm_limiter csm step = 100

* Renamings + USE_OSD_QUICK_MENU define

* Small fixes

* Style fixes

* tests makefile fix

* Activate quick menu by default, if defined USE_OSD_QUICK_MENU

* Changed .c/.h license headers to a modern one
2023-07-26 08:54:02 +10:00
Mark Haslinghuis
949181e084
Add support for IST8310 compass (#12917)
* Add support for IST8310 compass

* fix read

* Using states

* Fixes after review
2023-07-10 15:47:12 +02:00
Eike Ahmels
214946bc3f
AT32F435 camera control (#12913)
* [AT32] camera control

* remove comments

* change to mcu specific implementation

* fix includes
2023-07-10 15:54:20 +10:00
Dmytro
7b39d3d296
Rename make folder to get rid of build error. (#12880)
When trying to build firmware with current directory in PATH environment
it scans for make command and generates "Permission denied" error in
case if current directory in PATH precedes /usr/bin/ directory.In my
case it was caused by incorrect pyenv init script.

Rename make folder to avoid errors like this.
2023-06-14 21:48:55 +02:00