diff --git a/Makefile b/Makefile index 23268d8..f5a79a6 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ INCLUDE = $(addprefix -I, inc/) AS_FLAGS = # Compiler flags -CC_FLAGS = -mstm8 --out-fmt-elf -c --debug --opt-code-size --gas --function-sections --data-sections $(INCLUDE) +CC_FLAGS = -mstm8 --out-fmt-elf -c --debug --opt-code-size --asm=gas --function-sections --data-sections $(INCLUDE) # Path definitions PROJECT = STM8 @@ -27,9 +27,8 @@ VPATH += src OBJECTS = $(addprefix $(OBJ_DIR)/, main.o bar.o) # Linker flags -LD_FLAGS = -T./elf32stm8.x --print-memory-usage --gc-sections -Map $(OBJ_DIR)/map_$(PROJECT).map -LIB_DIRS = $(addprefix -L, /usr/local/share/sdcc/lib/stm8 lib) -LIBS = $(apprefix -l, stm8 stm8s) +LD_FLAGS = -T./elf32stm8s003f3.x --print-memory-usage --gc-sections -Map $(OBJ_DIR)/map_$(PROJECT).map +LIB_DIRS = $(addprefix -L, /usr/local/share/sdcc/lib/stm8) # Source dependencies: DEPS = $(OBJECTS:.o=.d) diff --git a/elf32stm8.x b/elf32stm8s003f3.x similarity index 99% rename from elf32stm8.x rename to elf32stm8s003f3.x index d57afbf..0bf4f7c 100644 --- a/elf32stm8.x +++ b/elf32stm8s003f3.x @@ -23,7 +23,7 @@ MEMORY eeprom (rw!x) : ORIGIN = 0x4000, LENGTH = __EEPROM_REGION_LENGTH__ fuse (rx) : ORIGIN = 0x4800, LENGTH = __FUSE_REGION_LENGTH__ lock (rw!x) : ORIGIN = 0x5100, LENGTH = __LOCK_REGION_LENGTH__ - ROM (rx) : ORIGIN = 0x8000 + __INTERRUPTS_REGION_LENGTH__, LENGTH = __FLASH_REGION_LENGTH__ + ROM (rx) : ORIGIN = 0x8000 + __INTERRUPTS_REGION_LENGTH__, LENGTH = __FLASH_REGION_LENGTH__ - __INTERRUPTS_REGION_LENGTH__ signature (rw!x) : ORIGIN = 0x840000, LENGTH = __SIGNATURE_REGION_LENGTH__ user_signatures (rw!x) : ORIGIN = 0x850000, LENGTH = __USER_SIGNATURE_REGION_LENGTH__ }