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
* 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
* 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
* 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
* 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>
* 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
* 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
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.