Dateien nach "/" hochladen

This commit is contained in:
2026-04-28 21:47:52 +00:00
commit 8e29901fd6
3 changed files with 73 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
stages:
- build
variables:
F_CPU: "8000000UL"
before_script:
# nur nötig bei Shell Runner → Tools müssen installiert sein
- avr-gcc --version
build_dev:
stage: build
tags:
- avr
script:
- VERSION=$(cat VERSION.txt)
- echo "Building version $VERSION"
- make MCU=atmega644pa BUILD_TYPE=dev VERSION=$VERSION
artifacts:
paths:
- build/dev/*.hex
rules:
- if: '$CI_COMMIT_BRANCH == "dev"'
build_prod:
stage: build
tags:
- avr
script:
- VERSION=$(cat VERSION.txt)
- echo "Building DEV-Version $VERSION"
- make MCU=atmega644pa BUILD_TYPE=prod VERSION=$VERSION
artifacts:
paths:
- build/prod/*.hex
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
+1
View File
@@ -0,0 +1 @@
0.1
+34
View File
@@ -0,0 +1,34 @@
MCU ?= atmega644pa
BUILD_TYPE ?= dev
VERSION ?= 0.1
F_CPU ?= 8000000UL
CC = avr-gcc
OBJCOPY = avr-objcopy
SRC = src/main.c
OUTDIR = build/$(BUILD_TYPE)
ifeq ($(BUILD_TYPE),dev)
PREFIX = DEV_ENO
else
PREFIX = ENO
endif
TARGET = $(OUTDIR)/$(PREFIX)_$(VERSION)
CFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU) -Os -DVERSION=\"$(VERSION)\"
all: $(TARGET).hex
$(TARGET).elf:
@mkdir -p $(OUTDIR)
$(CC) $(CFLAGS) $(SRC) -o $@
$(TARGET).hex: $(TARGET).elf
$(OBJCOPY) -O ihex -R .eeprom $< $@
clean:
rm -rf build