1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00
Commit graph

58 commits

Author SHA1 Message Date
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