Closed hydra closed 4 months ago
Additional commit added as the same applies to other SPRacingH7 targets, which all feature dedicated pads / ports.
make BOARD -EXTRA_FLAGS="-DCLOUD_BUILD"
...
Linking STM32H750_SPRACINGH7EXTREME
Memory region Used Size Region Size %age Used
ITCM_RAM: 9568 B 64 KB 14.60%
DTCM_RAM: 99888 B 128 KB 76.21%
RAM: 32980 B 64 KB 50.32%
CODE_RAM: 375505 B 458688 B 81.87%
EXST_HASH: 64 B 64 B 100.00%
D2_RAM: 0 GB 256 KB 0.00%
MEMORY_B1: 0 GB 0 GB
QUADSPI: 0 GB 0 GB
text data bss dec hex filename
368633 6936 125992 501561 7a739 ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME.elf
Creating BIN (without checksum) ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME_UNPATCHED.bin
Creating EXST ./obj/betaflight_4.5.0_STM32H750_SPRACINGH7EXTREME.bin
...
no errors.
No compilation errors for these builds either:
make CONFIG=SPRACINGH7RF -EXTRA_FLAGS="-DCLOUD_BUILD -DUSE_LED_STRIP"
make CONFIG=SPRACINGH7NANO -EXTRA_FLAGS="-DCLOUD_BUILD -DUSE_LED_STRIP"
make CONFIG=SPRACINGH7ZERO -EXTRA_FLAGS="-DCLOUD_BUILD -DUSE_LED_STRIP"
or these:
make CONFIG=SPRACINGH7EXTREME -EXTRA_FLAGS="-DCLOUD_BUILD"
...
Linking STM32H750_SPRACINGH7EXTREME
Memory region Used Size Region Size %age Used
ITCM_RAM: 9568 B 64 KB 14.60%
DTCM_RAM: 99888 B 128 KB 76.21%
RAM: 32980 B 64 KB 50.32%
CODE_RAM: 375505 B 458688 B 81.87%
EXST_HASH: 64 B 64 B 100.00%
D2_RAM: 0 GB 256 KB 0.00%
MEMORY_B1: 0 GB 0 GB
QUADSPI: 0 GB 0 GB
text data bss dec hex filename
368633 6936 125992 501561 7a739 ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME.elf
Creating BIN (without checksum) ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME_UNPATCHED.bin
Creating EXST ./obj/betaflight_4.5.0_STM32H750_SPRACINGH7EXTREME.bin
...
make CONFIG=SPRACINGH7RF -EXTRA_FLAGS="-DCLOUD_BUILD"
make CONFIG=SPRACINGH7NANO -EXTRA_FLAGS="-DCLOUD_BUILD"
make CONFIG=SPRACINGH7ZERO -EXTRA_FLAGS="-DCLOUD_BUILD"
Normal builds are fine too:
make CONFIG=SPRACINGH7EXTREME
...
Linking STM32H750_SPRACINGH7EXTREME
Memory region Used Size Region Size %age Used
ITCM_RAM: 9568 B 64 KB 14.60%
DTCM_RAM: 99888 B 128 KB 76.21%
RAM: 32980 B 64 KB 50.32%
CODE_RAM: 375505 B 458688 B 81.87%
EXST_HASH: 64 B 64 B 100.00%
D2_RAM: 0 GB 256 KB 0.00%
MEMORY_B1: 0 GB 0 GB
QUADSPI: 0 GB 0 GB
text data bss dec hex filename
368633 6936 125992 501561 7a739 ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME.elf
Creating BIN (without checksum) ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME_UNPATCHED.bin
make CONFIG=SPRACINGH7RF
make CONFIG=SPRACINGH7NANO
make CONFIG=SPRACINGH7ZERO
As expected, LED strip feature is ALWAYS included, as it's a core feature for the hardware.
If my build commands are not correct please let me know, I used this as a reference: https://github.com/betaflight/betaflight.com/issues/389#issuecomment-1984064807
I also tried this:
make SPRACINGH7EXTREME EXTRA_FLAGS="-D'BUILD_KEY=aa84aea75431a2861320a2a9413fdb5f' -D'RELEASE_NAME=4.5.0-RC2' -DCLOUD_BUILD"
...
Linking STM32H750_SPRACINGH7EXTREME
Memory region Used Size Region Size %age Used
ITCM_RAM: 6968 B 64 KB 10.63%
DTCM_RAM: 74916 B 128 KB 57.16%
RAM: 18420 B 64 KB 28.11%
CODE_RAM: 260293 B 458688 B 56.75%
EXST_HASH: 64 B 64 B 100.00%
D2_RAM: 0 GB 256 KB 0.00%
MEMORY_B1: 0 GB 0 GB
QUADSPI: 0 GB 0 GB
text data bss dec hex filename
257045 3312 90076 350433 558e1 ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME.elf
Creating BIN (without checksum) ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME_UNPATCHED.bin
Creating EXST ./obj/betaflight_4.5.0_STM32H750_SPRACINGH7EXTREME.bin
I was surprised to see a MUCH smaller binary.
The instructions in https://github.com/betaflight/betaflight.com/issues/389#issuecomment-1984064807 are wrong, and there's an extra '-' in front of EXTRA_FLAGS which should not be there...
Repeating again now with out the '-' to check...
Repeating the builds results in the following:
spracingh7targets=("SPRACINGH7EXTREME" "SPRACINGH7RF" "SPRACINGH7NANO" "SPRACINGH7ZERO")
for target in "${spracingh7targets[@]}"; do echo $target; make CONFIG=${target} EXTRA_FLAGS="-DCLOUD_BUILD"; done
Linking STM32H750_SPRACINGH7EXTREME
Memory region Used Size Region Size %age Used
ITCM_RAM: 6968 B 64 KB 10.63%
DTCM_RAM: 74916 B 128 KB 57.16%
RAM: 18420 B 64 KB 28.11%
CODE_RAM: 260165 B 458688 B 56.72%
EXST_HASH: 64 B 64 B 100.00%
D2_RAM: 0 GB 256 KB 0.00%
MEMORY_B1: 0 GB 0 GB
QUADSPI: 0 GB 0 GB
text data bss dec hex filename
256917 3312 90076 350305 55861 ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME.elf
...
spracingh7targets=("SPRACINGH7EXTREME" "SPRACINGH7RF" "SPRACINGH7NANO" "SPRACINGH7ZERO")
for target in "${spracingh7targets[@]}"; do echo $target; make CONFIG=${target} EXTRA_FLAGS="-DCLOUD_BUILD -DUSE_LED_STRIP"; done
$ for target in "${spracingh7targets[@]}"; do echo $target; make CONFIG=${target} EXTRA_FLAGS="-DCLOUD_BUILD -DUSE_LED_STRIP"; done
SPRACINGH7EXTREME
make -j ./obj/betaflight_4.5.0_STM32H750_SPRACINGH7EXTREME.hex
make[1]: Entering directory '/cygdrive/d/Users/Hydra/Documents/dev/projects/betaflight/betaflight'
rm -f ./obj/main/STM32H750_SPRACINGH7EXTREME/.efhash_*
EF HASH -> ./obj/main/STM32H750_SPRACINGH7EXTREME/.efhash_ab4b9ff912e34805d4cdca8eeb250863
%% startup_stm32h743xx.s
%% (size optimised) ./src/main/drivers/bus_i2c_timing.c
%% (optimised) ./src/main/drivers/dshot_bitbang_decode.c
In file included from ./src/main/platform.h:30,
from ./src/main/drivers/bus_i2c_timing.c:23:
./src/config/configs/SPRACINGH7EXTREME/config.h:129: error: "USE_LED_STRIP" redefined [-Werror]
129 | #define USE_LED_STRIP
|
<command-line>: note: this is the location of the previous definition
...
So it seems that the config.h need an #ifdef
, however it turns out there's precedent for this as can be found in the SPRacingH7RF config,
here: https://github.com/betaflight/config/blob/master/configs/SPRACINGH7RF/config.h#L156-L158
and here: https://github.com/betaflight/config/blob/master/configs/SPRACINGH7RF/config.h#L307-L309
So I will update the PR to gate the #define USE_LED_STRIP
and re-test.
PR updated.
spracingh7targets=("SPRACINGH7EXTREME" "SPRACINGH7RF" "SPRACINGH7NANO" "SPRACINGH7ZERO")
cloud build with with led strip option
$ for target in "${spracingh7targets[@]}"; do echo $target; make CONFIG=${target} EXTRA_FLAGS="-DCLOUD_BUILD -DUSE_LED_STRIP"; done
SPRACINGH7EXTREME
Linking STM32H750_SPRACINGH7EXTREME
Memory region Used Size Region Size %age Used
ITCM_RAM: 6968 B 64 KB 10.63%
DTCM_RAM: 74916 B 128 KB 57.16%
RAM: 18420 B 64 KB 28.11%
CODE_RAM: 260165 B 458688 B 56.72%
EXST_HASH: 64 B 64 B 100.00%
D2_RAM: 0 GB 256 KB 0.00%
MEMORY_B1: 0 GB 0 GB
QUADSPI: 0 GB 0 GB
text data bss dec hex filename
256917 3312 90076 350305 55861 ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME.elf
...
normal build
$ for target in "${spracingh7targets[@]}"; do echo $target; make ${target}; done
SPRACINGH7EXTREME
Linking STM32H750_SPRACINGH7EXTREME
Memory region Used Size Region Size %age Used
ITCM_RAM: 9568 B 64 KB 14.60%
DTCM_RAM: 99888 B 128 KB 76.21%
RAM: 32980 B 64 KB 50.32%
CODE_RAM: 375505 B 458688 B 81.87%
EXST_HASH: 64 B 64 B 100.00%
D2_RAM: 0 GB 256 KB 0.00%
MEMORY_B1: 0 GB 0 GB
QUADSPI: 0 GB 0 GB
text data bss dec hex filename
368633 6936 125992 501561 7a739 ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME.elf
...
cloud build no additional features.
$ for target in "${spracingh7targets[@]}"; do echo $target; make CONFIG=${target} EXTRA_FLAGS="-DCLOUD_BUILD"; done
SPRACINGH7EXTREME
Linking STM32H750_SPRACINGH7EXTREME
Memory region Used Size Region Size %age Used
ITCM_RAM: 6968 B 64 KB 10.63%
DTCM_RAM: 74916 B 128 KB 57.16%
RAM: 18420 B 64 KB 28.11%
CODE_RAM: 260165 B 458688 B 56.72%
EXST_HASH: 64 B 64 B 100.00%
D2_RAM: 0 GB 256 KB 0.00%
MEMORY_B1: 0 GB 0 GB
QUADSPI: 0 GB 0 GB
text data bss dec hex filename
256917 3312 90076 350305 55861 ./obj/main/betaflight_STM32H750_SPRACINGH7EXTREME.elf
...
all modified targets built fine in all 12 cases, all looks good now.
Do not merge before https://github.com/betaflight/betaflight/pull/13439
The hardware has a pad specifically for LED strip.
Without this users will be confused when the LED strip feature cannot be enabled.
Requires the following issue to be resolved https://github.com/betaflight/betaflight/issues/13438 which is fixed by https://github.com/betaflight/betaflight/pull/13439