From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0832C35247 for ; Tue, 4 Feb 2020 22:58:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 51F5A2087E for ; Tue, 4 Feb 2020 22:58:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ijWeA1B7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 51F5A2087E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iz79l-0002Av-3X for qemu-devel@archiver.kernel.org; Tue, 04 Feb 2020 17:58:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57767) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iz798-0001jz-3y for qemu-devel@nongnu.org; Tue, 04 Feb 2020 17:58:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iz795-0001zT-Br for qemu-devel@nongnu.org; Tue, 04 Feb 2020 17:58:17 -0500 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:41985) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iz795-0001r9-4v for qemu-devel@nongnu.org; Tue, 04 Feb 2020 17:58:15 -0500 Received: by mail-ot1-x342.google.com with SMTP id 66so108296otd.9 for ; Tue, 04 Feb 2020 14:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MCbTWNgC8kFvpblyDHfdiG+QJfgOIZhT7bqC0WGWykg=; b=ijWeA1B7hxyCAs+TEE16RyMCmBdsKUb8/GbzjoVN5su8Q7GD3CSP/uiV3DBQrwwcOU /kM1gBMhJl2y96Trt0XWjka6ivRLrorY0QJXPap3Lkl0NdX1vSF2YLeIMSi8Ub7fl0F2 PjFicweVSrE9+YVt+ZRjvmDUjsAf7GF70SvAHunBpxbZIZx5C3bjLOjCD+Zq68f5lWbo rktbvUfOaoLEQwt8R0xfLygGb91wpC2BUSqZWZ7sKgA0oASWU9RyI6uqB1zRw4SJ+HDK NF5/RipT311glqtyADJz/Je3lwEEw5Kxj6BVDFxKvY1eLESqOBNgHJTOh1I/Ct3xO4hm DiTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MCbTWNgC8kFvpblyDHfdiG+QJfgOIZhT7bqC0WGWykg=; b=tPadDzrm9toPy1I8XVaQTBOJgcv8trZFm7lbWN3K/RIADdCbiRjzxBQQbzRRlzsHqi JJXgVmdgdihI68VMadRsMPSxZyHYPnPDgHrKqGeHoXTMFQPrExBCUqHdNnKGFZFlXOEF znUzBms/52E40uzDQPlYAffc4D3gMJrzKYt8PPEJn9J69DK5f75BZphu10DvTx4jkyCg lfj8R0gvGaAFC5dRO61+JOdh+qWFEcRvYrMnWhCmZgG4uzCilzx3PSBv4RrvtUOaUyPi PXnxhN0N/1hZuc9u5XAWwudDe0OsLNH501IqA3h4ieSAmAQqdmVZhjV57dpOUl+v61D9 +7dw== X-Gm-Message-State: APjAAAU7IsKKLFoz4FwbKN9RqLIIeU44cHYWiGJIS2qFrogbNtqoeZ29 p7o0pwEgEJi6nJKbwTlj6HcCnR/7FskcRLdn1ds= X-Google-Smtp-Source: APXvYqykui7wysVOJm3bhVVG6Sbf2PuE75FCYhmV+ZjXQC/JeRr6/RcvqyJmE8VPiwAVYART9rglf3rW8wC5N/rq70A= X-Received: by 2002:a9d:7305:: with SMTP id e5mr22631018otk.64.1580857094284; Tue, 04 Feb 2020 14:58:14 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a9d:d21:0:0:0:0:0 with HTTP; Tue, 4 Feb 2020 14:58:13 -0800 (PST) In-Reply-To: <1580428993-4767-27-git-send-email-aleksandar.markovic@rt-rk.com> References: <1580428993-4767-1-git-send-email-aleksandar.markovic@rt-rk.com> <1580428993-4767-27-git-send-email-aleksandar.markovic@rt-rk.com> From: Aleksandar Markovic Date: Tue, 4 Feb 2020 23:58:13 +0100 Message-ID: Subject: Re: [PATCH rc4 26/29] target/avr: Update build system To: Aleksandar Markovic Content-Type: multipart/alternative; boundary="0000000000008bac0f059dc7f9aa" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::342 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Michael Rolnik , "qemu-devel@nongnu.org" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000008bac0f059dc7f9aa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Friday, January 31, 2020, Aleksandar Markovic < aleksandar.markovic@rt-rk.com> wrote: > From: Michael Rolnik > > Make AVR support buildable. > > [AM: Remove word 'Atmel' from filenames and all elements of code] > Suggested-by: Aleksandar Markovic > > Signed-off-by: Michael Rolnik > Tested-by: Philippe Mathieu-Daud=C3=A9 > Reviewed-by: Aleksandar Markovic > Signed-off-by: Richard Henderson > Signed-off-by: Aleksandar Markovic > --- > configure | 7 +++++++ > default-configs/avr-softmmu.mak | 5 +++++ > target/avr/Makefile.objs | 34 ++++++++++++++++++++++++++++++++++ > 3 files changed, 46 insertions(+) > create mode 100644 default-configs/avr-softmmu.mak > create mode 100644 target/avr/Makefile.objs > > diff --git a/configure b/configure > index a72a5de..51f0b9e 100755 > --- a/configure > +++ b/configure > @@ -7640,6 +7640,10 @@ case "$target_name" in > mttcg=3D"yes" > gdb_xml_files=3D"aarch64-core.xml aarch64-fpu.xml arm-core.xml > arm-vfp.xml arm-vfp3.xml arm-neon.xml" > ;; > + avr) > + gdb_xml_files=3D"avr-cpu.xml" > + target_compiler=3D$cross_cc_avr > + ;; > cris) > ;; > hppa) > @@ -7859,6 +7863,9 @@ for i in $ARCH $TARGET_BASE_ARCH ; do > disas_config "ARM_A64" > fi > ;; > + avr) > + disas_config "AVR" > + ;; > cris) > disas_config "CRIS" > ;; > diff --git a/default-configs/avr-softmmu.mak > b/default-configs/avr-softmmu.mak > new file mode 100644 > index 0000000..80218ad > --- /dev/null > +++ b/default-configs/avr-softmmu.mak > @@ -0,0 +1,5 @@ > +# Default configuration for avr-softmmu > + > +# Boards: > +# > +CONFIG_ARDUINO=3Dy > diff --git a/target/avr/Makefile.objs b/target/avr/Makefile.objs > new file mode 100644 > index 0000000..7523e0c > --- /dev/null > +++ b/target/avr/Makefile.objs > @@ -0,0 +1,34 @@ > +# > +# QEMU AVR CPU > +# > +# Copyright (c) 2019 Michael Rolnik > +# > +# This library is free software; you can redistribute it and/or > +# modify it under the terms of the GNU Lesser General Public > +# License as published by the Free Software Foundation; either > +# version 2.1 of the License, or (at your option) any later version. > +# > +# This library is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +# Lesser General Public License for more details. > +# > +# You should have received a copy of the GNU Lesser General Public > +# License along with this library; if not, see > +# > +# > + > +DECODETREE =3D $(SRC_PATH)/scripts/decodetree.py > +decode-y =3D $(SRC_PATH)/target/avr/insn.decode > + > +target/avr/decode_insn.inc.c: $(decode-y) $(DECODETREE) > + $(call quiet-command, \ > + $(PYTHON) $(DECODETREE) -o $@ --decode decode_insn --insnwidth > 16 $<, \ > + "GEN", $(TARGET_DIR)$@) > + > +target/avr/translate.o: target/avr/decode_insn.inc.c > + > +obj-y +=3D translate.o cpu.o helper.o > +obj-y +=3D gdbstub.o > +obj-y +=3D disas.o > +obj-$(CONFIG_SOFTMMU) +=3D machine.o The last line should not contain "-$(CONFIG_SOFTMMU)", since there is only softmmu case for avr. I will remove it in rc5, unless somebody tell me not to do so. Aleksandar > -- > 2.7.4 > > --0000000000008bac0f059dc7f9aa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Friday, January 31, 2020, Aleksandar Markovic <aleksandar.markovic@rt-rk.com> wr= ote:
From: Michael Rolnik <mrolnik@gmail.com>

Make AVR support buildable.

[AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com>

Signed-off-by: Michael Rolnik <mrol= nik@gmail.com>
Tested-by: Philippe Mathieu-Daud=C3=A9 <philmd@redhat.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
---
=C2=A0configure=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 7 +++++++
=C2=A0default-configs/avr-softmmu.mak |=C2=A0 5 +++++
=C2=A0target/avr/Makefile.objs=C2=A0 =C2=A0 =C2=A0 =C2=A0 | 34 ++++++++++++= ++++++++++++++++++++++
=C2=A03 files changed, 46 insertions(+)
=C2=A0create mode 100644 default-configs/avr-softmmu.mak
=C2=A0create mode 100644 target/avr/Makefile.objs

diff --git a/configure b/configure
index a72a5de..51f0b9e 100755
--- a/configure
+++ b/configure
@@ -7640,6 +7640,10 @@ case "$target_name" in
=C2=A0 =C2=A0 =C2=A0mttcg=3D"yes"
=C2=A0 =C2=A0 =C2=A0gdb_xml_files=3D"aarch64-core.xml aarch64-fpu= .xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
=C2=A0 =C2=A0;;
+=C2=A0 avr)
+=C2=A0 =C2=A0 gdb_xml_files=3D"avr-cpu.xml"
+=C2=A0 =C2=A0 target_compiler=3D$cross_cc_avr
+=C2=A0 ;;
=C2=A0 =C2=A0cris)
=C2=A0 =C2=A0;;
=C2=A0 =C2=A0hppa)
@@ -7859,6 +7863,9 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
=C2=A0 =C2=A0 =C2=A0 =C2=A0disas_config "ARM_A64"
=C2=A0 =C2=A0 =C2=A0fi
=C2=A0 =C2=A0;;
+=C2=A0 avr)
+=C2=A0 =C2=A0 disas_config "AVR"
+=C2=A0 ;;
=C2=A0 =C2=A0cris)
=C2=A0 =C2=A0 =C2=A0disas_config "CRIS"
=C2=A0 =C2=A0;;
diff --git a/default-configs/avr-softmmu.mak b/default-configs/avr-sof= tmmu.mak
new file mode 100644
index 0000000..80218ad
--- /dev/null
+++ b/default-configs/avr-softmmu.mak
@@ -0,0 +1,5 @@
+# Default configuration for avr-softmmu
+
+# Boards:
+#
+CONFIG_ARDUINO=3Dy
diff --git a/target/avr/Makefile.objs b/target/avr/Makefile.objs
new file mode 100644
index 0000000..7523e0c
--- /dev/null
+++ b/target/avr/Makefile.objs
@@ -0,0 +1,34 @@
+#
+#=C2=A0 QEMU AVR CPU
+#
+#=C2=A0 Copyright (c) 2019 Michael Rolnik
+#
+#=C2=A0 This library is free software; you can redistribute it and/or
+#=C2=A0 modify it under the terms of the GNU Lesser General Public
+#=C2=A0 License as published by the Free Software Foundation; either
+#=C2=A0 version 2.1 of the License, or (at your option) any later version.=
+#
+#=C2=A0 This library is distributed in the hope that it will be useful, +#=C2=A0 but WITHOUT ANY WARRANTY; without even the implied warranty of
+#=C2=A0 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=C2=A0 See the= GNU
+#=C2=A0 Lesser General Public License for more details.
+#
+#=C2=A0 You should have received a copy of the GNU Lesser General Public +#=C2=A0 License along with this library; if not, see
+#=C2=A0 <http://www.gnu.org/licenses/lgpl-2.1.html>
+#
+
+DECODETREE =3D $(SRC_PATH)/scripts/decodetree.py
+decode-y =3D $(SRC_PATH)/target/avr/insn.decode
+
+target/avr/decode_insn.inc.c: $(decode-y) $(DECODETREE)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0$(call quiet-command, \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$(PYTHON) $(DECODETREE) -o $@ --decode d= ecode_insn --insnwidth 16 $<, \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"GEN", $(TARGET_DIR)$@)
+
+target/avr/translate.o: target/avr/decode_insn.inc.c
+
+obj-y +=3D translate.o cpu.o helper.o
+obj-y +=3D gdbstub.o
+obj-y +=3D disas.o
+obj-$(CONFIG_SOFTMMU) +=3D machine.o

The l= ast line should not contain "-$(CONFIG_SOFTMMU)", since there is = only softmmu case for avr. I will remove it in rc5, unless somebody tell me= not to do so.

Aleksandar
=C2=A0
--
2.7.4

--0000000000008bac0f059dc7f9aa--