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
bel
bel4_ezb_public
Commits
72f8e020
Commit
72f8e020
authored
Feb 20, 2018
by
Martin Horauer
Browse files
modified Makefiles
parent
0c03bd8e
Changes
7
Hide whitespace changes
Inline
Side-by-side
XMC_MBED/APP_AnalogOut/Makefile
View file @
72f8e020
...
...
@@ -71,34 +71,40 @@ GDB_ARGS += -ex "monitor SWO EnableTarget 16000000 0 1 0"
################################################################################
# BUILD RULES
all
:
$(SRC)
all
:
$(SRC)
build
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex
:
$(SRC)
################################################################################
# CREATE A DEBUG VESRION
build
:
$(SRC)
@
echo
"----------------------------------------------------------------------"
@
echo
"Building"
@
echo
"Building with DEBUG Symbols"
@
echo
""
$(MBED)
compile
-m
$(BOARD)
-t
$(TOOLCHAIN)
-N
main
--profile
mbed-os/tools/profiles/debug.json
@
echo
""
################################################################################
# CREATE A RELEASE VESRION
release
:
$(SRC)
@
echo
"----------------------------------------------------------------------"
@
echo
"Build a RELEASE version"
@
echo
""
$(MBED)
compile
-m
$(BOARD)
-t
$(TOOLCHAIN)
-N
main
@
echo
""
################################################################################
# DEBUG RULES
debug
:
$(SRC)
debug
:
build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf
ifdef
SystemRoot
@
call start JLinkGDBServer
-Device
XMC4500-1024
-if
SWD
else
$(TERMINAL)
-e
"JLinkGDBServer -Device XMC4500-1024 -if SWD"
&
sleep
1
&&
$(TERMINAL)
-e
"telnet 127.0.0.1 2333"
&
endif
@
echo
"----------------------------------------------------------------------"
@
echo
"Building with DEBUG Symbols"
@
echo
""
$(MBED)
compile
-m
$(BOARD)
-t
$(TOOLCHAIN)
-N
main
--profile
mbed-os/tools/profiles/debug.json
@
echo
""
$(GDB)
-q
$(BUILDDIR)
/
$(BOARD)
/
$(TOOLCHAIN)
/
$(TARGET)
.elf
$(GDB_ARGS)
################################################################################
# FLASH RULES
flash
:
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex
flash
:
build
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex
echo
-e
'speed 4000\nconnect\nh\nloadbin
$(BUILDDIR)
/
$(BOARD)
/
$(TOOLCHAIN)
/
$(TARGET)
.hex,0xC000000\nr\ng\nq'
| JLinkExe
-Device
XMC4500-1024
-if
SWD
################################################################################
...
...
XMC_MBED/APP_AnalogOut/mbed_settings.py
View file @
72f8e020
...
...
@@ -15,7 +15,8 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
from
os.path
import
join
,
abspath
,
dirname
,
subprocess
import
subprocess
from
os.path
import
join
,
abspath
,
dirname
#ROOT = abspath(join(dirname(__file__), "."))
...
...
XMC_MBED/APP_BLINKY/Makefile
View file @
72f8e020
...
...
@@ -71,34 +71,40 @@ GDB_ARGS += -ex "monitor SWO EnableTarget 16000000 0 1 0"
################################################################################
# BUILD RULES
all
:
$(SRC)
all
:
$(SRC)
build
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex
:
$(SRC)
################################################################################
# CREATE A DEBUG VESRION
build
:
$(SRC)
@
echo
"----------------------------------------------------------------------"
@
echo
"Building"
@
echo
"Building with DEBUG Symbols"
@
echo
""
$(MBED)
compile
-m
$(BOARD)
-t
$(TOOLCHAIN)
-N
main
--profile
mbed-os/tools/profiles/debug.json
@
echo
""
################################################################################
# CREATE A RELEASE VESRION
release
:
$(SRC)
@
echo
"----------------------------------------------------------------------"
@
echo
"Build a RELEASE version"
@
echo
""
$(MBED)
compile
-m
$(BOARD)
-t
$(TOOLCHAIN)
-N
main
@
echo
""
################################################################################
# DEBUG RULES
debug
:
$(SRC)
debug
:
build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf
ifdef
SystemRoot
@
call start JLinkGDBServer
-Device
XMC4500-1024
-if
SWD
else
$(TERMINAL)
-e
"JLinkGDBServer -Device XMC4500-1024 -if SWD"
&
sleep
1
&&
$(TERMINAL)
-e
"telnet 127.0.0.1 2333"
&
endif
@
echo
"----------------------------------------------------------------------"
@
echo
"Building with DEBUG Symbols"
@
echo
""
$(MBED)
compile
-m
$(BOARD)
-t
$(TOOLCHAIN)
-N
main
--profile
mbed-os/tools/profiles/debug.json
@
echo
""
$(GDB)
-q
$(BUILDDIR)
/
$(BOARD)
/
$(TOOLCHAIN)
/
$(TARGET)
.elf
$(GDB_ARGS)
################################################################################
# FLASH RULES
flash
:
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex
flash
:
build
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex
echo
-e
'speed 4000\nconnect\nh\nloadbin
$(BUILDDIR)
/
$(BOARD)
/
$(TOOLCHAIN)
/
$(TARGET)
.hex,0xC000000\nr\ng\nq'
| JLinkExe
-Device
XMC4500-1024
-if
SWD
################################################################################
...
...
XMC_MBED/APP_BLINKY/mbed_settings.py
View file @
72f8e020
...
...
@@ -15,7 +15,8 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
from
os.path
import
join
,
abspath
,
dirname
,
subprocess
import
subprocess
from
os.path
import
join
,
abspath
,
dirname
#ROOT = abspath(join(dirname(__file__), "."))
...
...
XMC_MBED/APP_InterruptIn/Makefile
View file @
72f8e020
...
...
@@ -71,34 +71,40 @@ GDB_ARGS += -ex "monitor SWO EnableTarget 16000000 0 1 0"
################################################################################
# BUILD RULES
all
:
$(SRC)
all
:
$(SRC)
build
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex
:
$(SRC)
################################################################################
# CREATE A DEBUG VESRION
build
:
$(SRC)
@
echo
"----------------------------------------------------------------------"
@
echo
"Building"
@
echo
"Building with DEBUG Symbols"
@
echo
""
$(MBED)
compile
-m
$(BOARD)
-t
$(TOOLCHAIN)
-N
main
--profile
mbed-os/tools/profiles/debug.json
@
echo
""
################################################################################
# CREATE A RELEASE VESRION
release
:
$(SRC)
@
echo
"----------------------------------------------------------------------"
@
echo
"Build a RELEASE version"
@
echo
""
$(MBED)
compile
-m
$(BOARD)
-t
$(TOOLCHAIN)
-N
main
@
echo
""
################################################################################
# DEBUG RULES
debug
:
$(SRC)
debug
:
build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf
ifdef
SystemRoot
@
call start JLinkGDBServer
-Device
XMC4500-1024
-if
SWD
else
$(TERMINAL)
-e
"JLinkGDBServer -Device XMC4500-1024 -if SWD"
&
sleep
1
&&
$(TERMINAL)
-e
"telnet 127.0.0.1 2333"
&
endif
@
echo
"----------------------------------------------------------------------"
@
echo
"Building with DEBUG Symbols"
@
echo
""
$(MBED)
compile
-m
$(BOARD)
-t
$(TOOLCHAIN)
-N
main
--profile
mbed-os/tools/profiles/debug.json
@
echo
""
$(GDB)
-q
$(BUILDDIR)
/
$(BOARD)
/
$(TOOLCHAIN)
/
$(TARGET)
.elf
$(GDB_ARGS)
################################################################################
# FLASH RULES
flash
:
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex
flash
:
build
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex
echo
-e
'speed 4000\nconnect\nh\nloadbin
$(BUILDDIR)
/
$(BOARD)
/
$(TOOLCHAIN)
/
$(TARGET)
.hex,0xC000000\nr\ng\nq'
| JLinkExe
-Device
XMC4500-1024
-if
SWD
################################################################################
...
...
XMC_MBED/APP_InterruptIn/mbed_settings.py
View file @
72f8e020
...
...
@@ -15,7 +15,8 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
from
os.path
import
join
,
abspath
,
dirname
,
subprocess
import
subprocess
from
os.path
import
join
,
abspath
,
dirname
#ROOT = abspath(join(dirname(__file__), "."))
...
...
XMC_MBED/README.md
View file @
72f8e020
...
...
@@ -47,22 +47,29 @@ J-Link> g
## Debugging
To the debug the application
3
steps in sequence are necessary
:
To the debug the application
4
steps in sequence are necessary
.
(1) Start the
`JLinkGDEBServer`
, e.g.:
(1) You will need to create the executable with DEBUg symbols. To that end add
`--profile mbed-os/tools/profiles/debug.json`
to the build command.
```
mbed compile -m XMC_4500_RELAX_KIT -t GCC_ARM -N main --profile mbed-os/tools/profiles/debug.json
```
(2) Start the
`JLinkGDEBServer`
, e.g.:
```
JLinkGDBServer -Device XMC4500-1024 -if SWD
```
(
2
) In order to log messages printed to
`stdout`
we connect to port 2333 via
(
3
) In order to log messages printed to
`stdout`
we connect to port 2333 via
telnet.
```
telnet 127.0.0.1 2333
```
(
3
) We launch the debugger and control the debug session:
(
4
) We launch the debugger and control the debug session:
```
arm-none-eabi-gdb -q BUILD/XMC_4500_RELAX_KIT/GCC_ARM/main.elf
...
...
@@ -81,7 +88,9 @@ Using the prepared `Makefile` one can invoke trhe following actions in a more
convenient way:
```
make # build the application
make # build the application with debug symbols
make debug # -"-
make release # debug a release version of the project
make flash # flash the application
make debug # debug the application
make erase # erase the program memory
...
...
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