From owner-freebsd-questions@freebsd.org Tue Aug 24 15:16:43 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02373659C6C for ; Tue, 24 Aug 2021 15:16:43 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GvCPk0nD4z3QRs for ; Tue, 24 Aug 2021 15:16:42 +0000 (UTC) (envelope-from tomek@cedro.info) Received: by mail-wm1-x32a.google.com with SMTP id k20-20020a05600c0b5400b002e87ad6956eso900301wmr.1 for ; Tue, 24 Aug 2021 08:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ctL6+1EjwuA+p7sNv5+eFQU3eChZP86zy6seD/pj/VM=; b=OaSPJr9AV0IlAeCYiYTPrrvXoC6IQr2wRTjSzb923qw9BBFmwKO7zyRChhIfxsa9eH OuolQAKjCb8u6XzqNiatjahwJIRJ7xIz3bBOqXU4VJOtUYjbn/oT8WwW5jiQEQ2XdkAN JrqLrsqMayGzCaFEE3n1G/xSLw8xG6iX+IuKS/91myU0LUK4IJHM0sDEnvyEPtoHwylx U1dcBQe0XC7qLpeV1mpd1MBs3fsyhe8MBQSvUclhqOdxnJUTpXkckkHmsY4XowWaynty bRwo76D8nol0e2ydmpBvB6hTAEGBAGx1AIM9BeWG0i7bf++leW12IIJc8xN0SoP2HC02 0rCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ctL6+1EjwuA+p7sNv5+eFQU3eChZP86zy6seD/pj/VM=; b=Qbs/R/3XHPc3Dwpt0u63UoFJM34wuww50uD+dJX3X8IzsBNjw901ZXhenYm2pZ8EB7 Tc6pifOBaMfSVEcpzdzafJx9qafRqqksJxlRYg8aKcnck2j5OFWH9xa63ZvB47MSTdgx mT4t935hhVsGOT3gog1Hx5iLPVFaz6JQ31xK/5j+RJNrSNp6HE04aa/uUIQCCYpQjiai 8ZadEGtheGVYQS75C9gvW2gfDfykWeZrW6Pkw4W17Ay8KKrTPmZEnHLZCJUHXXL1Cw4x 2cfAGkO+O4ZxCCj+AA1/WU/IwdfHrXa+GjNdUJlqjTTNBKgA2ViWWuFAEzwil6yYRoEH iBCQ== X-Gm-Message-State: AOAM5329akJpL2ZYWlkegN+TGlRN4CeHxRzDRFomAyYvURlHwvf8H4tF 6Ol+ZnMrLC31go1MqyQHb+hrt+l7NW5hZ3ebRwq5KQ== X-Google-Smtp-Source: ABdhPJxMqb6mBNOlXG33jPrmJIpUAcwurvDwmcjFetREgPcRUhoZzo12tLnw+MyStyJE9e2LE0qADelm2vVViSjpIlI= X-Received: by 2002:a7b:cb02:: with SMTP id u2mr4591913wmj.103.1629818194801; Tue, 24 Aug 2021 08:16:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tomasz CEDRO Date: Tue, 24 Aug 2021 17:16:06 +0200 Message-ID: Subject: Re: Arduino Development on aarch64? To: "Brian McGovern (bmcgover)" Cc: "freebsd-questions@freebsd.org" , "skreuzer@freebsd.orig" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4GvCPk0nD4z3QRs X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cedro.info header.s=google header.b=OaSPJr9A; dmarc=none; spf=none (mx1.freebsd.org: domain of tomek@cedro.info has no SPF policy when checking 2a00:1450:4864:20::32a) smtp.mailfrom=tomek@cedro.info X-Spamd-Result: default: False [-2.29 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[cedro.info:s=google]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.991]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[cedro.info]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cedro.info:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::32a:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2021 15:16:43 -0000 On Tue, Aug 24, 2021 at 3:47 PM Brian McGovern (bmcgover) wrote: > I've had some good luck. I'm not sure its the right way forward, but I fi= gured I'd share it here as a reference to others, and that someone might pi= ck up my changes. Congratulations! :-) > My environment: RPI4 w/8GB, FreeBSD 13.0 Release, X running at 1920x1280 = per various documentation. I have some BananaPi and whole bunch of other boards but did not try FreeBSD + embedded development on them yet :-) > 1.) /usr/ports/devel/gcc-arm-embedded is marked as broken for aarch64. Th= is does not appear to be the case in the hardware configuration above. Comm= enting out the "BROKEN_aarch64" line had it building fine as near as I can = tell. Maybe this is related to my memory/swap note, below? Please report that on https://bugs.freebsd.org/bugzilla/ maybe someone with proper hardware and some time may verify. I wonder if adding big swap (i.e. 8GB+) will fix the problem :-) > 2.) There appears to be a name space conflict in /usr/ports/openocd/work/= openocd-0.10.0/src/target/nds32_tlb.h over PAGE_SIZE_4K, and the redefiniti= on breaks the build. Since the definition is fairly local, it looks fairly = safe to use this patch to undefine the system definition before redefining = and using it where needed. Since it looks like you created the original por= t, and I'm cc'ing the maintainer, hopefully one of you can either incorpora= te this, or re-think the solution (e.g. maybe use "PAGE_SIZE_IS_4K" instead= to avoid the namespace problem here). > > *** nds32_tlb.h.orig Tue Aug 3 05:26:01 2021 > --- nds32_tlb.h Tue Aug 3 05:25:29 2021 > *************** > *** 20,25 **** > --- 20,26 ---- > #define OPENOCD_TARGET_NDS32_TLB_H > > #include "nds32.h" > + #undef PAGE_SIZE_4K > enum { > PAGE_SIZE_4K =3D 0, > PAGE_SIZE_8K, This seems upstream issue with the specific Target MCU and/or its particular variant? Can you please contact the OpenOCD mailing list to verify? Maybe you will fix the upstream :-) > With those two changes, I was able to get the arduinio18 port built. I've= tested several of the basic examples available with my UNO locally, and I = didn't have any issues with the code compiling, downloading, or running. Th= ere may be some more complicated cases that I haven't hit yet, but if I hit= anything, I'll let you know. Super cool :-) If we have those two above fixes in the upstream so its "fire-and-forget" for everyone we will put that info on the WiKi :-) --=20 CeDeROM, SQ7MHZ, http://www.tomek.cedro.info