zephyr/make/target/run/rules.qemu.x86-linux2
Peter Mitsis 59cc26eb84 Remove Simics references from build system
Simics is not supported.

Change-Id: I73e791a75f6f6086669841dca2e8cf40e36dbbd2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:48 -05:00

72 lines
2.7 KiB
Plaintext

# rules.qemu.x86-linux2 - Linux specific rules for running on QEMU target
#
# Copyright (c) 2013-2014 Wind River Systems, Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1) Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2) Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3) Neither the name of Wind River Systems nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# depend on hidden timestamp since otherwise Makefile traverses link
# to determine the timestamp and $(HOME)/.socatPipeB doesnt exist yet
# this should update symbolic links to the virtual serial line in
# case they are changed
serialLink: ${iSIM_SERIAL_DEVICE}
# create host communication serial link
# - destroy existing .socatPipe<X> files
# - link host's end of host communication link to .socatPipeB
# (which doesn't yet exist)
#
# note:
# - VxMicro's end of the host link will be .socatPipeA
# - both .socatPipeA and .socatPipeB get created when "socat" is invoked
#
${iSIM_SERIAL_DEVICE}:
$q${HOS_DeleteFiles} $(HOME)/.socatPipe*
$q${HOS_Link} $(HOME)/.socatPipeB $@
$q${HOS_Touch} $@
.gdbinit:
$q${HOS_Echo} target remote localhost:1234 >.gdbinit
$q${HOS_Echo} dir $(VXMICRO_BASE_UNIX)/target/src/kernel >>.gdbinit
# run the target with GDB
define Qemu_debug
$(Qemu_stop)
@setsid ${HOS_Term} ${vQEMU_BIN} ${vQEMU_FLAGS} -kernel $1 -s -S -serial ${iQEMU_CONSOLE} &
$q${HOS_Sleep} 1
endef
%.qemu.gdb %.gdb: ${vOUT_DIR}/%.${elf} .gdbinit
$(call Qemu_debug,$<)
$q${GDB} -tui $<
%.qemu.ddd %.ddd: ${vOUT_DIR}/%.${elf} .gdbinit
$(call Qemu_debug,$<)
ddd --gdb --debugger "${GDB} $<" &