initial commit

This commit is contained in:
Ajit Ananthadevan 2025-08-03 01:39:20 +10:00
commit 7df819dfee
13 changed files with 1558 additions and 0 deletions

76
myapps/blinky-old/main.mk Normal file
View file

@ -0,0 +1,76 @@
CC = arm-none-eabi-gcc
SIZE = arm-none-eabi-size
OBJCOPY = arm-none-eabi-objcopy
COMMON_FLAGS = \
-mcpu=cortex-m33 \
-mthumb \
-mfpu=fpv5-sp-d16 \
-mfloat-abi=hard \
-std=c99 \
-Wall \
-Wextra \
-Os \
-fdata-sections \
-ffunction-sections \
-fomit-frame-pointer \
-imacros sl_gcc_preinclude.h \
-mcmse \
-g
DEFINES = -DEFR32BG22C224F512GM32
INCLUDE += -I include -I../../platform/CMSIS/Core/Include \
-I../../platform/Device/SiliconLabs/EFR32BG22/Include \
-I../../platform/common/inc \
-I ../../platform/common/toolchain/inc \
-I ../../platform/emlib/inc
CFLAGS := $(COMMON_FLAGS) $(INCLUDE) $(DEFINES)
SUBMAKEFILES := emlib.mk
SOURCES := ../../platform/Device/SiliconLabs/EFR32BG22/Source/system_efr32bg22.c \
src/main.c
BUILD_DIR := build
TARGET_DIR := build_output
#nosys.specs are required for printf
LDFLAGS = \
-mcpu=cortex-m33 \
-mthumb \
-mfpu=fpv5-sp-d16 \
-mfloat-abi=hard \
-T"../../platform/Device/SiliconLabs/EFR32BG22/Source/GCC/efr32bg22.ld" \
--specs=nano.specs \
--specs=nosys.specs \
-Xlinker -Map=$(TARGET_DIR)/main.map \
-Wl,--gc-sections
# Startup file
LDLIBS := ../../platform/Device/SiliconLabs/EFR32BG22/Source/GCC/startup_efr32bg22.S
###########
GROUP_START =-Wl,--start-group
GROUP_END =-Wl,--end-group
PROJECT_LIBS = \
-lgcc \
-lc \
-lm \
-lnosys
LIBS += $(GROUP_START) $(PROJECT_LIBS) $(GROUP_END)
TGT_LDFLAGS += $(LIBS)
##########
TARGET := main.elf
size: $(TARGET_DIR)/main.elf
$(SIZE) $(TARGET_DIR)/main.elf