mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-04 22:17:31 +00:00
Github action build for embedded/ubuntu/windows
This commit is contained in:
parent
efcd5e8347
commit
e1dfa7ee55
12 changed files with 399 additions and 11 deletions
|
|
@ -55,9 +55,11 @@
|
|||
|
||||
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.1331315324" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.floatabi.hard" valueType="enumerated"/>
|
||||
|
||||
<option id="fr.ac6.managedbuild.option.gnu.cross.path.2023424783" name="Path" superClass="fr.ac6.managedbuild.option.gnu.cross.path" useByScannerDiscovery="false" value="/usr/bin" valueType="string"/>
|
||||
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.424800885" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
|
||||
|
||||
<builder arguments="-j5" buildPath="${workspace_loc:/VNA_embedded}/Debug" command="make" id="fr.ac6.managedbuild.builder.gnu.cross.1807206174" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross">
|
||||
<builder arguments="-j5" buildPath="${workspace_loc:/VNA_embedded}/" command="make" id="fr.ac6.managedbuild.builder.gnu.cross.1807206174" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross">
|
||||
|
||||
<outputEntries>
|
||||
|
||||
|
|
@ -69,7 +71,7 @@
|
|||
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1927263688" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
|
||||
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1492730557" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.debug" valueType="enumerated"/>
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1492730557" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.more" valueType="enumerated"/>
|
||||
|
||||
<option id="gnu.c.compiler.option.debugging.level.24507088" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
|
||||
|
|
@ -143,7 +145,7 @@
|
|||
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1186634618" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
|
||||
<option defaultValue="gnu.cpp.optimization.level.none" id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1296454962" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.debug" valueType="enumerated"/>
|
||||
<option defaultValue="gnu.cpp.optimization.level.none" id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1296454962" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.more" valueType="enumerated"/>
|
||||
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.1713488101" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
|
||||
|
|
@ -267,7 +269,7 @@
|
|||
|
||||
</option>
|
||||
|
||||
<option id="gnu.cpp.link.option.flags.1016696662" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-specs=nosys.specs -specs=nano.specs" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.flags.1016696662" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-specs=nosys.specs -specs=nano.specs " valueType="string"/>
|
||||
|
||||
<option id="gnu.cpp.link.option.other.1827976887" name="Other options (-Xlinker [option])" superClass="gnu.cpp.link.option.other" useByScannerDiscovery="false"/>
|
||||
|
||||
|
|
@ -783,7 +785,7 @@
|
|||
|
||||
<configuration configurationName="Debug">
|
||||
|
||||
<resource resourceType="PROJECT" workspacePath="VNA_embedded"/>
|
||||
<resource resourceType="PROJECT" workspacePath="/VNA_embedded"/>
|
||||
|
||||
</configuration>
|
||||
|
||||
|
|
|
|||
1
Software/VNA_embedded/.gitignore
vendored
1
Software/VNA_embedded/.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
/Debug/
|
||||
/build/
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="1307432939745961523" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1870342659776466326" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "Si5351C.hpp"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
|
||||
#define LOG_LEVEL LOG_LEVEL_INFO
|
||||
#define LOG_MODULE "SI5351"
|
||||
|
|
|
|||
216
Software/VNA_embedded/Makefile
Normal file
216
Software/VNA_embedded/Makefile
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
##########################################################################################################################
|
||||
# File automatically-generated by tool: [projectgenerator] version: [2.25.0] date: [Sat Sep 16 14:17:13 CEST 2017]
|
||||
##########################################################################################################################
|
||||
|
||||
# ------------------------------------------------
|
||||
# Generic Makefile (based on gcc)
|
||||
#
|
||||
# ChangeLog :
|
||||
# 2017-02-10 - Several enhancements + project update mode
|
||||
# 2015-07-22 - first version
|
||||
# ------------------------------------------------
|
||||
|
||||
######################################
|
||||
# target
|
||||
######################################
|
||||
TARGET = VNA_embedded
|
||||
|
||||
|
||||
######################################
|
||||
# building variables
|
||||
######################################
|
||||
# debug build?
|
||||
DEBUG = 0
|
||||
# optimization
|
||||
OPT = -O2
|
||||
|
||||
|
||||
#######################################
|
||||
# paths
|
||||
#######################################
|
||||
# source path
|
||||
SOURCES_DIR = \
|
||||
Application \
|
||||
Application/Communication \
|
||||
Application/Drivers \
|
||||
Application/Drivers/FPGA \
|
||||
Application/Drivers/USB \
|
||||
Application/Drivers/USB/Core/Src \
|
||||
Drivers/STM32G4xx_HAL_Driver/Src \
|
||||
Middlewares/Third_Party/FreeRTOS/Source \
|
||||
Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS \
|
||||
Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F \
|
||||
Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang \
|
||||
Middlewares/ST/STM32_USBPD_Library/Core/src \
|
||||
Middlewares/ST/STM32_USBPD_Library/Devices/STM32G4XX/src \
|
||||
Src
|
||||
|
||||
# Build path
|
||||
BUILD_DIR = build
|
||||
|
||||
######################################
|
||||
# source
|
||||
######################################
|
||||
# C sources
|
||||
C_SOURCES := $(foreach sdir,$(SOURCES_DIR),$(wildcard $(sdir)/*.c))
|
||||
CXX_SOURCES := $(foreach sdir,$(SOURCES_DIR),$(wildcard $(sdir)/*.cpp))
|
||||
|
||||
|
||||
# ASM sources
|
||||
ASM_SOURCES = \
|
||||
startup/startup_stm32g431xx.s
|
||||
|
||||
|
||||
######################################
|
||||
# firmware library
|
||||
######################################
|
||||
PERIFLIB_SOURCES =
|
||||
|
||||
|
||||
#######################################
|
||||
# binaries
|
||||
#######################################
|
||||
BINPATH = /usr/bin
|
||||
PREFIX = arm-none-eabi-
|
||||
CC = $(BINPATH)/$(PREFIX)gcc
|
||||
CXX = $(BINPATH)/$(PREFIX)g++
|
||||
AS = $(BINPATH)/$(PREFIX)as
|
||||
CP = $(BINPATH)/$(PREFIX)objcopy
|
||||
AR = $(BINPATH)/$(PREFIX)ar
|
||||
SZ = $(BINPATH)/$(PREFIX)size
|
||||
HEX = $(CP) -O ihex
|
||||
BIN = $(CP) -O binary
|
||||
|
||||
#######################################
|
||||
# CFLAGS
|
||||
#######################################
|
||||
# cpu
|
||||
CPU = -mcpu=cortex-m4
|
||||
|
||||
# fpu
|
||||
FPU = -mfpu=fpv4-sp-d16
|
||||
|
||||
# float-abi
|
||||
FLOAT-ABI = -mfloat-abi=hard
|
||||
|
||||
|
||||
# mcu
|
||||
MCU = $(CPU) -mthumb $(FLOAT-ABI) $(FPU)
|
||||
|
||||
# C defines
|
||||
C_DEFS = \
|
||||
-DFW_MAJOR=0 \
|
||||
-DFW_MINOR=1 \
|
||||
-DUSE_FULL_LL_DRIVER \
|
||||
-DHW_REVISION="'B'" \
|
||||
-D__weak="__attribute__((weak))" \
|
||||
-DUSBPD_PORT_COUNT=1 \
|
||||
-DUSBPDCORE_LIB_PD3_FULL \
|
||||
-D_RTOS \
|
||||
-D_SNK \
|
||||
-DUSE_HAL_DRIVER \
|
||||
-DSTM32G431xx \
|
||||
-D__packed="__attribute__((__packed__))"
|
||||
|
||||
# C includes
|
||||
C_INCLUDES = \
|
||||
-IInc \
|
||||
-IApplication/Communication \
|
||||
-IApplication \
|
||||
-IApplication/Drivers \
|
||||
-IApplication/Drivers/USB \
|
||||
-IApplication/Drivers/USB/Core/Inc \
|
||||
-IApplication/Drivers/FPGA \
|
||||
-IDrivers/STM32G4xx_HAL_Driver/Inc \
|
||||
-IDrivers/STM32G4xx_HAL_Driver/Inc/Legacy \
|
||||
-IMiddlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F \
|
||||
-IMiddlewares/ST/STM32_USB_Device_Library/Core/Inc \
|
||||
-IDrivers/CMSIS/Device/ST/STM32G4xx/Include \
|
||||
-IDrivers/CMSIS/Include \
|
||||
-IMiddlewares/Third_Party/FreeRTOS/Source/include \
|
||||
-IMiddlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS \
|
||||
-IMiddlewares/ST/STM32_USBPD_Library/Core/inc \
|
||||
-IMiddlewares/ST/STM32_USBPD_Library/Devices/STM32G4XX/inc
|
||||
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPT += -g3 #-gdwarf-2
|
||||
endif
|
||||
|
||||
# compile gcc flags
|
||||
ASFLAGS = $(MCU) -g
|
||||
|
||||
CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fmessage-length=0 -ffunction-sections -fdata-sections -c
|
||||
CXXFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fmessage-length=0 -ffunction-sections -fdata-sections -c -fno-exceptions -fno-rtti
|
||||
|
||||
|
||||
|
||||
|
||||
# Generate dependency information
|
||||
CFLAGS += -MMD -MP
|
||||
CXXFLAGS += -MMD -MP
|
||||
|
||||
|
||||
#######################################
|
||||
# LDFLAGS
|
||||
#######################################
|
||||
# link script
|
||||
LDSCRIPT = STM32G431CBUx_FLASH.ld
|
||||
|
||||
# libraries
|
||||
LIBS = -lm -l:USBPDCORE_PD3_FULL_CM4_wc32.a
|
||||
LIBDIR = -LMiddlewares/ST/STM32_USBPD_Library/Core/lib
|
||||
LDFLAGS = $(MCU) -specs=nosys.specs -specs=nano.specs $(LIBDIR) -T$(LDSCRIPT) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map -Wl,--gc-sections -fno-exceptions -fno-rtti
|
||||
|
||||
# default action: build all
|
||||
all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin
|
||||
|
||||
|
||||
#######################################
|
||||
# build the application
|
||||
#######################################
|
||||
# list of objects
|
||||
OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
|
||||
vpath %.c $(sort $(dir $(C_SOURCES)))
|
||||
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(CXX_SOURCES:.cpp=.o)))
|
||||
vpath %.cpp $(sort $(dir $(CXX_SOURCES)))
|
||||
# list of ASM program objects
|
||||
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
|
||||
vpath %.s $(sort $(dir $(ASM_SOURCES)))
|
||||
|
||||
$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/%.o: %.cpp Makefile | $(BUILD_DIR)
|
||||
$(CXX) $(CXXFLAGS) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
|
||||
$(AS) $(ASFLAGS) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
|
||||
$(CXX) $(OBJECTS) $(LDFLAGS) -o $@
|
||||
$(SZ) $@
|
||||
|
||||
$(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
|
||||
$(HEX) $< $@
|
||||
|
||||
$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
|
||||
$(BIN) $< $@
|
||||
|
||||
$(BUILD_DIR):
|
||||
mkdir $@
|
||||
|
||||
#######################################
|
||||
# clean up
|
||||
#######################################
|
||||
clean:
|
||||
-rm -fR $(BUILD_DIR)
|
||||
|
||||
#######################################
|
||||
# dependencies
|
||||
#######################################
|
||||
DEPS := $(OBJECTS:.o=.d)
|
||||
|
||||
-include $(DEPS)
|
||||
|
||||
# *** EOF ***
|
||||
Loading…
Add table
Add a link
Reference in a new issue