mirror of
https://github.com/rene-dev/stmbl.git
synced 2026-09-21 14:23:56 +08:00
moved shared stuff to shared, sections in linker script
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#ld gcollection
|
||||
#komische flags
|
||||
|
||||
SRCS = main.c stm32f4xx_it.c system_stm32f4xx.c printf.c scanf.c setup.c hal.c misc.c eeprom.c link.c crc.c stm32f103/src/common.c version.c syscalls.c
|
||||
SRCS = main.c stm32f4xx_it.c system_stm32f4xx.c printf.c scanf.c setup.c hal.c misc.c eeprom.c link.c version.c syscalls.c shared/crc.c shared/common.c
|
||||
#USB
|
||||
SRCS += ub_lib/stm32_ub_usb_cdc.c ub_lib/usb_cdc_lolevel/usb_core.c ub_lib/usb_cdc_lolevel/usb_dcd_int.c ub_lib/usb_cdc_lolevel/usbd_req.c ub_lib/usb_cdc_lolevel/usbd_cdc_core.c ub_lib/usb_cdc_lolevel/usbd_core.c ub_lib/usb_cdc_lolevel/usb_dcd.c ub_lib/usb_cdc_lolevel/usbd_cdc_vcp.c ub_lib/usb_cdc_lolevel/usbd_desc.c ub_lib/usb_cdc_lolevel/usbd_ioreq.c ub_lib/usb_cdc_lolevel/usb_bsp.c ub_lib/usb_cdc_lolevel/usbd_usr.c
|
||||
#SRCS = main.c system.c
|
||||
@@ -40,7 +40,7 @@ vpath %.a lib
|
||||
|
||||
ROOT=$(shell pwd)
|
||||
|
||||
CFLAGS += -Iinc -Ilib -Ilib/inc -Istm32f103/inc
|
||||
CFLAGS += -Iinc -Ilib -Ilib/inc -Ishared
|
||||
CFLAGS += -Ilib/inc/core -Ilib/inc/peripherals
|
||||
|
||||
SRCS += lib/startup_stm32f4xx.s # add startup file to build
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#include "stm32f4xx_conf.h"
|
||||
#include "misc.h"
|
||||
#include "version.h"
|
||||
#include "../../stm32f103/inc/common.h"
|
||||
#include "common.h"
|
||||
#include "defines_res.h"
|
||||
|
||||
#include "stm32_ub_usb_cdc.h"
|
||||
|
||||
+3
-2
@@ -38,7 +38,7 @@ GDB = $(SYSTEM)-gdb
|
||||
SIZE = $(SYSTEM)-size
|
||||
|
||||
# INCLUDES = -I$(SRCDIR) $(LIBINC)
|
||||
INCLUDES = $(LIBINC)
|
||||
INCLUDES = $(LIBINC) -I../shared
|
||||
CFLAGS = $(CPU) $(CMSIS_OPT) $(OTHER_OPT) -Wall -fno-common -fno-strict-aliasing -O2 $(INCLUDES) -g -Wfatal-errors -g -std=c99 -fdiagnostics-color=always
|
||||
ASFLAGS = $(CFLAGS) -x assembler-with-cpp
|
||||
LDFLAGS = -Wl,--gc-sections,-Map=$*.map,-cref -T $(LDSCRIPT) $(CPU)
|
||||
@@ -55,7 +55,8 @@ OBJS = $(sort \
|
||||
$(patsubst %.c,%.o,$(wildcard src/*.c)) \
|
||||
$(patsubst %.s,%.o,$(wildcard src/*.s)) \
|
||||
$(STARTUP_OBJ) \
|
||||
$(SYSTEM_OBJ))
|
||||
$(SYSTEM_OBJ) \
|
||||
../shared/common.o)
|
||||
|
||||
all: $(BIN)
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ _estack = 0x20002800; /* end of 4K RAM */
|
||||
/* Generate a link error if heap and stack don't fit into RAM */
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x100; /* required amount of stack */
|
||||
|
||||
/* STM32F103R6T Low-density performance line 32kb flash 10kb ram */
|
||||
/* flash layout: 32x1 */
|
||||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user