Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gene
xmc4500-relax-linux
Commits
34109dfb
Commit
34109dfb
authored
Jan 19, 2017
by
Christian Eichler
Browse files
Modify makefile to allow building with custom .o files
parent
7647dee8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
34109dfb
.PHONY
:
reset_%
.SECONDARY
:
$(bin/*.axf)
#### Setup ####
XMC
=
$(
shell
pwd
)
/XMC
...
...
@@ -16,16 +17,15 @@ LIBS = $(CMSIS)/Lib/GCC/libarm_cortexM4lf_math.a
LINKER_FILE
=
$(CMSIS)
/Infineon/
$(UC)
_series/Source/GCC/XMC4500x1024.ld
CMSIS_SRC
+=
$(CMSIS)
/Infineon/
$(UC)
_series/Source/System_
$(UC)
.c
JLINK
=
JLinkExe
SYSCC
=
$(TOOLCHAIN)
-gcc
CC
=
patmos-clang
CP
=
$(TOOLCHAIN)
-objcopy
OD
=
$(TOOLCHAIN)
-objdump
GDB
=
$(TOOLCHAIN)
-gdb
#STACK_SIZE?=2048
STACK_SIZE
?=
16384
JLINK
=
JLinkExe
JLFLAGS
=
-device
XMC4500-1024
-if
SWD
-speed
900
CFLAGS
=
-target
armv6m--none-eabi
-mcpu
=
cortex-m4
-mthumb
-integrated-as
-ccc-gcc-name
arm-none-eabi-gcc
...
...
@@ -60,7 +60,7 @@ OBJS += src/System_$(UC).o
OBJS_MAIN
=
$(OBJS)
$(SRC_MAIN:.c=.o)
#### Rules ####
all
:
$(OBJS)
bin/xmc.bin
all
:
$(OBJS)
src/System_$(UC).o
:
$(CMSIS_SRC)
$(CC)
-c
$(CFLAGS)
$<
-o
$@
...
...
@@ -88,10 +88,10 @@ bin/ids_%.axf: $(OBJS) bin/startup_XMC4500.o bin/ids_%.o
%.bin
:
%.axf
$(CP)
$(CPFLAGS)
$^
$@
bin/
xmc
.axf
:
$(OBJS_MAIN) bin/startup_XMC4500.o
gene
.o
bin/
system_%
.axf
:
$(OBJS_MAIN) bin/startup_XMC4500.o
%
.o
mkdir
-p
bin
@
echo
LD
$
<
@
$(CC)
-T
$(LINKER_FILE)
$(LFLAGS)
-o
bin/xmc.axf
$^
$(LIBS)
@
echo
LD
$
@
@
$(CC)
-T
$(LINKER_FILE)
$(LFLAGS)
-o
$@
$^
$(LIBS)
reset_%
:
echo
"connect
\n\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment