Skip to content

Commit

Permalink
Demo/CORTEX_MPS2_QEMU_IAR_GCC add path to IMAGE and remove mapfile (F…
Browse files Browse the repository at this point in the history
…reeRTOS#1223)

For Demo/CORTEX_MPS2_QEMU_IAR_GCC gcc Makefile:
- simplify IMAGE var to already include full path
- clean target also removes mapfile

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
  • Loading branch information
laroche and aggarg committed May 24, 2024
1 parent 8e54579 commit 49bbe71
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OUTPUT_DIR := ./output
IMAGE := RTOSDemo.out
IMAGE := $(OUTPUT_DIR)/RTOSDemo.out

# The directory that contains the /source and /demo sub directories.
FREERTOS_ROOT = ./../../../..
Expand Down Expand Up @@ -35,7 +35,7 @@ SOURCE_FILES += $(KERNEL_DIR)/portable/MemMang/heap_4.c
SOURCE_FILES += $(KERNEL_DIR)/portable/GCC/ARM_CM3/port.c

#
# Common demo files for the "full" build, as opposed to the "blinky" build -
# Common demo files for the "full" build, as opposed to the "blinky" build -
# these files are build by all the FreeRTOS kernel demos.
#
DEMO_ROOT = $(FREERTOS_ROOT)/Demo
Expand Down Expand Up @@ -95,27 +95,27 @@ DEP_FILES := $(SOURCE_FILES:%.c=$(OUTPUT_DIR)/%.d)
DEP_FILES_NO_PATH = $(notdir $(DEP_FILES))
DEP_OUTPUT = $(DEP_FILES_NO_PATH:%.d=$(OUTPUT_DIR)/%.d)

all: $(OUTPUT_DIR)/$(IMAGE)
all: $(IMAGE)

%.o : %.c
$(OUTPUT_DIR)/%.o : %.c $(OUTPUT_DIR)/%.d Makefile
$(CC) $(CFLAGS) -c $< -o $@

$(OUTPUT_DIR)/$(IMAGE): ./mps2_m3.ld $(OBJS_OUTPUT) Makefile
$(IMAGE): ./mps2_m3.ld $(OBJS_OUTPUT) Makefile
@echo ""
@echo ""
@echo "--- Final linking ---"
@echo ""
$(LD) $(OBJS_OUTPUT) $(CFLAGS) -Xlinker --gc-sections -Xlinker -T ./mps2_m3.ld \
-Xlinker -Map=$(OUTPUT_DIR)/RTOSDemo.map -specs=nano.specs \
-specs=nosys.specs -specs=rdimon.specs -o $(OUTPUT_DIR)/$(IMAGE)
$(SIZE) $(OUTPUT_DIR)/$(IMAGE)
-specs=nosys.specs -specs=rdimon.specs -o $(IMAGE)
$(SIZE) $(IMAGE)

$(DEP_OUTPUT):
include $(wildcard $(DEP_OUTPUT))

clean:
rm -f $(OUTPUT_DIR)/$(IMAGE) $(OUTPUT_DIR)/*.o $(OUTPUT_DIR)/*.d
rm -f $(IMAGE) $(OUTPUT_DIR)/RTOSDemo.map $(OUTPUT_DIR)/*.o $(OUTPUT_DIR)/*.d

#use "make print-[VARIABLE_NAME] to print the value of a variable generated by
#this makefile.
Expand Down

0 comments on commit 49bbe71

Please sign in to comment.