1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00
betaflight/mk/mcu/SITL.mk
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

68 lines
1.7 KiB
Makefile

INCLUDE_DIRS := $(INCLUDE_DIRS) \
$(ROOT)/lib/main/dyad
MCU_COMMON_SRC := $(ROOT)/lib/main/dyad/dyad.c
#Flags
ARCH_FLAGS =
DEVICE_FLAGS =
LD_SCRIPT = src/main/target/SITL/pg.ld
STARTUP_SRC =
MCU_FLASH_SIZE := 2048
ARM_SDK_PREFIX =
MCU_EXCLUDES = \
drivers/adc.c \
drivers/bus_i2c.c \
drivers/bus_i2c_config.c \
drivers/bus_spi.c \
drivers/bus_spi_config.c \
drivers/bus_spi_pinconfig.c \
drivers/dma.c \
drivers/pwm_output.c \
drivers/timer.c \
drivers/system.c \
drivers/rcc.c \
drivers/serial_escserial.c \
drivers/serial_pinconfig.c \
drivers/serial_uart.c \
drivers/serial_uart_init.c \
drivers/serial_uart_pinconfig.c \
drivers/rx/rx_xn297.c \
drivers/display_ug2864hsweg01.c \
telemetry/crsf.c \
telemetry/ghst.c \
telemetry/srxl.c \
io/displayport_oled.c
TARGET_MAP = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET).map
LD_FLAGS := \
-lm \
-lpthread \
-lc \
-lrt \
$(ARCH_FLAGS) \
$(LTO_FLAGS) \
$(DEBUG_FLAGS) \
-Wl,-gc-sections,-Map,$(TARGET_MAP) \
-Wl,-L$(LINKER_DIR) \
-Wl,--cref \
-T$(LD_SCRIPT)
ifneq ($(filter SITL_STATIC,$(OPTIONS)),)
LD_FLAGS += \
-static \
-static-libgcc
endif
ifneq ($(DEBUG),GDB)
OPTIMISE_DEFAULT := -Ofast
OPTIMISE_SPEED := -Ofast
OPTIMISE_SIZE := -Os
LTO_FLAGS := $(OPTIMISATION_BASE) $(OPTIMISE_SPEED)
endif