Fix UC3 support in the BUILD build system module. Fix bug in the EVK1101 board button...
[pub/lufa.git] / LUFA / Build / lufa.build.in
index d1b82d8..c845376 100644 (file)
@@ -114,8 +114,10 @@ endif
 C_FLAGS   += -Wstrict-prototypes\r
 \r
 # Create a list of flags to pass to the linker\r
-LD_FLAGS += -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections -lm\r
-ifneq ($(F_CPU), UC3)\r
+LD_FLAGS += -lm -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections \r
+ifeq ($(ARCH), UC3)\r
+   LD_FLAGS += --rodata-writable -Wl,--direct-data   \r
+else\r
    LD_FLAGS += -Wl,--relax\r
 endif\r
 \r
@@ -126,8 +128,8 @@ ifneq ($(UNKNOWN_SOURCE),)
 endif\r
 \r
 # Determine flags to pass to the size utility based on its reported features\r
-SIZE_MCU_FLAG    = $(shell avr-size --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
-SIZE_FORMAT_FLAG = $(shell avr-size --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
+SIZE_MCU_FLAG    = $(shell $(CROSS)size --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )\r
+SIZE_FORMAT_FLAG = $(shell $(CROSS)size --help | grep -- --format=.*avr > /dev/null && echo --format=avr )\r
 \r
 \r
 begin:\r
@@ -150,7 +152,7 @@ checksource:
 size:\r
        @echo $(MSG_SIZE_CMD) Determining size of \"$(TARGET).elf\"\r
        @if test -f $(TARGET).elf; then \\r
-           avr-size $(SIZE_MCU_FLAG) $(SIZE_FORMAT_FLAG) $(TARGET).elf ; 2>/dev/null; \\r
+           $(CROSS)size $(SIZE_MCU_FLAG) $(SIZE_FORMAT_FLAG) $(TARGET).elf ; 2>/dev/null; \\r
         fi\r
 \r
 .PHONY: begin elf hex lss size end\r