Allow user to supply CFLAGS_DISABLED to Makefile.
Fix missing #if..endif for PINIO_COUNT in pinio.c.
Fix other strncpy build warning/errors for build with CFLAGS_DISABLED="-flto=auto".
* Adding picotool build recipe in makefiles.
* Use semaphore in directory for default goal recipe for target
* Suggestions from coderabbitai
* Further coderabbit suggestions
* Wrong case
* Minor change to improve logic
* Further improvements.
- submodules replaced with specific submodule for pico_sdk (to avoid all developers needing this)
* Removing need for remote on git submodule update for configs, as we have the commit occurring daily.
- made sure config also build uf2
* Simplified firmware output selection for target
* Moved UF2 outside of EXST
* Missed two remnants of HEX_TARGETS
* Adding check for target
* As target is known default output can be set in platform mk file or target mk file
- no need for file indicator (i.e. .exe or .uf2)
* Update config.mk for less verbosity
Add directories in $(SYS_INCLUDE_DIRS) to the search path via -isystem.
This allows a workaround for https://github.com/raspberrypi/pico-sdk/issues/2451 by
using system headers, which are more tolerant of macro redefinitions.
Co-authored-by: Matthew Selby <matthewjselby@aol.com>
* Fix SITL for MacOS M1
* move macos m1 SITL fix into SITL.mk and extract warnings flags from cflags into WARNING_FLAGS varible
* add back -Werror
* add warning about potencial issues with PG on SITL builds for MacOS apple silicon
* removed override and added CFLAGS_DISABLED and OPTIMISATION_DISABLED
* change OPTIMISATION_DISABLED to OPTIMISATIONS_DISABLED and also use it for CC_DEBUG_OPTIMISATION
* fix building useless hex
* copy instead of move
* clean new artifacts from SITL
* fix clean
* fix issue where in SITL_STATIC will build properly
* building static does not seem to work on macos
* building static does not seem to work on macos
* building static is not possible on macos
* fix issue where make TARGET=SITL still builds hex
* Move everything to CFLAGS_DISABLED and use else if chaning
* add SITL to CI_TARGETS
* add rev to SITL
* add changes suggested by ledvinap
* Update Makefile
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
* Update src/platform/SIMULATOR/mk/SITL.mk
* Add EXE_TARGET_REVISION
---------
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
* Adding check for speed optimised source validity
* Updated file location
* Common files to all HW
* Inadvertent inclusion
* VPATH reductions
- note simulator directory name change due to clash with MK file.
* Missed these MK files.
* Remove empty string
* Adding common source location in ./src/platform
To enable the continued clean up of multiple files still in ./src/main/driver (more PRs to follow) that are specifically for AT32, APM32 and STM32
Source will be moved to MCU_COMMON_SRC where it is specifically for that MCU (or variant). The test will be to ensure no files in the MCU_EXCLUDES for SITL.
* Use of +=
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 configs_all make target to build all FC configs
* Update Makefile
Change from `configs_all` to `all_configs`.
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
---------
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Makefile - use gddb2, not gddb3 due to issues with GDB crashing.
The cause seems to be the macro debugging information which when generated by the compiler, apparently incorrectly, causes GDB to use excessive amounts of CPU and crash.
Error:
"gdb/utils.c:717\
: internal-error: virtual memory exhausted: can't allocate 4064
bytes.\nA problem internal to GDB ha\
s been detected,\nfurther debugging may prove unreliable."
Reference:
* https://sourceware.org/bugzilla/show_bug.cgi?id=28219#c15
* https://github.com/microsoft/vscode-cpptools/issues/9219#issuecomment-1118034083
Note this crashing behavior is observed with `GCC > 9.3.1`, `9.3.1` itself is OK.
* Add SPRacingH7RF to CI targets.
* It uses memory-mapped flash.
* It uses OctoSPI.
* It uses EXST.
* Add SPRACINGH7EXTREME to CI targets.
* It uses QuadSPI.
* It uses EXST.
* implement dshot bitbang for AT32
* fix dshot bitbang bidirectional for AT32
* AT32 target features
* implement latest improvements from steve to at32
* generalize AT32 target.h
* Tri-state USART TX output if load due to powered down peripheral is detected
* enable LED STRIP for AT32
* at bitbang timer adjustments
* revert makefile changes
* revert target generalization
* Update src/main/drivers/at32/platform_mcu.h
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
---------
Co-authored-by: Steve Evans <Steve@SCEvans.com>
Co-authored-by: J Blackman <blckmn@users.noreply.github.com>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
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.
* Modification to allow src/config to be a repo within a repo.
* Moving config files to own repository, and including using make.
* Removing all old config files.
* Correct CI errors.
* Playing with pulling the configuration files from the API
* Attempt to get past github actions issue
* Adding additional assistance when configs not hydrated
* Move the workflow to support hydration before outputing target list.
* Correction for revision targets
* Requires additional config hydration
* Better messaging on what to do:
- when you have a local config.h for a new target, ignore hydration of target list if you are building the target config in question.
- when you are doing any activity that does not require hydration, e.g. printing out help or installing arm_sdk etc.
* Anything suffixed with clean should be allowed through
* Adjusting to simply use a copy of the repository. Noting we will need to decide whether or not to include MFTR name in the config directory or not.
* FIX: Several build issues following configuration changes
1. RX_SPI pins undefined
2. SDCARD enabled but no utilisation (i.e. no blackbox selected).
* Improved readability (readiness for "black" macro magic)
* Adding Makefile rule to enable CI targets to include Configured targets
* Makefile Cleanup - further simplification of local building
Can now use the commands:
make BETAFLIGHTF4
make BETAFLIGHTF4_clean
make configs
Target objects for config are now kept separate, so changing a config in use will rebuild as required.
* Minor correction for cummulative use in naming target
* STM32H730/STM32H750 - Fix use of USE_LP_UART1 instead of USE_LPUART1.
* STM32H723 - Prepare for being able to build for using non-internal-flash
config storage.
* STM32H723 - Prepare for using non-default strings.
* STM32H723 - Disable 'use custom defaults' when using USE_EXST.
* STM32H723 - Disable CUSTOM_DEFAULTS_EXTENDED when EXST is used.
* OCTOSPI - Add initialisation code.
* Add support for RAM_CODE.
* STM32H730 - Add support for RAM_CODE via the .ram_code attribute.
* OCTOSPI - Proof-of-concept for disabling/enabling memory mapped mode on
a running system.
NOTE: The HAL libs are compiled into a memory mapped region, and this cannot be used for OctoSPI access when memory mapped mode is disabled.
* OCTOSPI - Drop HAL support after determining that it's not suitable for
the memory mapped flash use-case.
* OCTOSPI - Sometimes, when disabling memory map mode, the abort fails.
Handle this by disabling the OSPI peripheral first and re-enabling it
afterwards.
* SD/FLASH - Update comments regarding possible solutions to the catch-22
issue with SD/SPI/QUADSPI/OCTOSPI pin configurations.
* OCTOSPI - Use device instance directly.
* OCTOSPI - Prepare W25Q flash driver for octospi support.
* OCTOSPI - Add octospi flash detection.
Note: The method to detect flash chips is similar to the method used for
QUADSPI and as such the code was used as a base. However the initial
OCTOSPI implementation doesn't support the non-memory-mapped use-case so
the un-tested code is gated with `USE_OCTOSPI_EXPERIMENTAL`.
The key differences are:
* uses octospi api not quadspi api.
* flash chip clock speeds should not be changed for memory-mapped flash
chips, bootloader already set it correctly.
* only certain flash chips are capable of memory mapped support.
* W25Q - Ensure w25q128fv_readRegister returns 0 if the receive fails.
* OCTOSPI - Implement octoSpiTransmit1LINE, octoSpiReceive1LINE and
octoSpiReceive4LINES.
* OCTOSPI - Specify device from init.
* OCTOSPI - More fixes and work on init.
Current status is that memory mapped mode is disabled and flash chip is
detected, but w25q128fv_detect should not be calling w25q128fv_reset.
* FLASH - Add comment regarding wasted flash space on targets that only
use one bus type for the flash chip.
* FLASH - Split `detect` into `identify` and `configure`.
* OCTOSPI - Extract flashMemoryMappedModeEnable/Disable to separate
methods.
* FLASH - Reduce size of targets that don't support the use of multiple
flash interfaces.
* Single-flash-chip targets usually only support one type of io
interface.
* Without this, compiler warnings are generated in `flashSpiInit` for
targets that only use flash chip drivers that support quadspi or octospi
that don't even use SPI for flash.
* FLASH - Use MMFLASH_CODE/DATA to conditionally move code/data to RAM.
Only targets compiled to support memory mapped flash chips need the some
specific code in RAM. Otherwise the code/data should be in the normal
linker section.
* FLASH - W25Q Prepare for memory mapped flash usage.
* Wait/Delay functions must work with interrupts disabled.
* Code used for reading/writing must run from RAM.
* OCTOSPI - Implement remaining required methods.
* OCTOSPI - Fixes for earlier code (not last commit).
* FLASH - W25Q update timeout values from Datasheet Rev L.
* FLASH - Prepare flash driver for use when memory mapped flash is
disabled.
* System - Prepare microsISR for use when memory mapped flash is disabled.
* FLASH - Add support for CONFIG_IN_MEMORY_MAPPED_FLASH.
* Flash - Fix incorrect gating on cli flash commands.
When compiling with USE_FLASH_CHIP and without USE_FLASHFS there were
compiler warnings.
* MMFLASH - Fix release-mode build.
* FLASH - Allow SPI pins to be reconfigured when using CONFIG_IN_MEMORY_MAPPED_FLASH.
MMFLASH only works via QuadSPI/OctoSPI peripherals.
* EXST - Disable the 2GB workaround which is now causing a different
error.
The error we get with 'remove-section' enabled is:
"error in private header data: sorry, cannot handle this file". The
cause of this new error in the objcopy codebase is an out of memory
condition, somehow the 2GB files and this error are related but the root
cause of both is still unknown.
* OCTOSPI - Add support for STM32H723.
* STM32H723 - Add linker scripts for EXST usage.
* NucleoH723ZG - Add build script to demonstrate OCTOSPI and Memory Mapped
flash support.
* FLASH - WUse the size in bits to set the size of the buffer.
* FLASH - Fix typo in W25N driver defines.
Was using W28N instead of W25N
* OCTOSPI - Fix missing semilcolon when compiling without
USE_FLASH_MEMORY_MAPPED.
* OCTPSPI - Fix missing call to 'memoryMappedModeInit'.
* SPRacingH7RF - Add example build script to allow for testing prior to
unified target / cloud-build support.
* AT32F435: new target (#12159)
* AT32F435: New target (WIP)
* IO and Timer Updates
* Adding pseudonyms for the STM TypeDef items.
- implementation to follow
* Adding config_streamer support for AT32
* Implementation for IO
* Adding in Peripheral mapping from emsr.
* Warnings cleanup for AT drivers
* Getting things to the linking stage
* Add AT-START-F435 LEDs as default in AT32F435 as a temporary measure to aid bringup
* Remove tabs
* Enable selection of serial port to use for MSP
* Setup defaults for AT-START-F435 to use MSP on UART1
* Fix for most recent 4.5.0 Makefile changes
* Solve for sanity check.
* Add AT32F435 MCU type
* Fix compilation issue with SITL
* Merge conflict resolution
* Minor cleanup
* Adding line feed.
---------
Co-authored-by: Steve Evans <Steve@SCEvans.com>
* Cleanup Makefiles
Given the targets are now simply the MCU, there is now a significant amount of duplication.
TODO:
- will possibly add STM32.mk for inclusion from STM32F4 etc to remove further duplication.
Noting it is now imperative that the gating is right.
* Removed the remnants of "features"
* Further clean up in preparation of new MCUs
* Typo for STM32F722xx
* Fix F411
* Last remnants of the _TARGETS lists.
- Including ability to define custom defaults as char[] that is baked into the build
- removed unnecessary size of custom defaults header parsing (defines provided by build process or in board.h for devs).