From owner-freebsd-questions@freebsd.org Tue Aug 24 16:35:53 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 0C89265B123 for ; Tue, 24 Aug 2021 16:35:53 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 4GvF941PqZz4Y9p for ; Tue, 24 Aug 2021 16:35:51 +0000 (UTC) (envelope-from tomek@cedro.info) Received: by mail-wr1-x432.google.com with SMTP id h13so32280948wrp.1 for ; Tue, 24 Aug 2021 09:35:51 -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=NvCtWVh+jsQHDNC7zYi/OUHrdRVioBXkLa0KTFdAjQw=; b=JHBwBBJmmHqFGVisq7Uo2AgKchQilZJei/Ha/kCrOCO9Bu4RpXtZuJ+OkpaBEmjfta Si+bNIYvUR33G1/hi6QjuUoCkinJHTKluMPWxPlAMbCirkziXDw3pUi+Bno0mO1/ltbb P4xFhuuSlUpHACTui66tColEyH4DmfpLkTaYSnVulE3lWVzRFKLBwWlMOmzuG8F3GeOr Q0wMWxSE5izAJ6HzxK5v4iPoAiOiandRz+7qqxzCu/Zx0Uoyg8/Brh1SKuRbN1+NcPh+ y719/lCxVJyAt7tDUYXP0SoT2QpU3ZHube7Eum6HSq7cMUnIcc2FoyAkJd84F4aMHr63 dyoQ== 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=NvCtWVh+jsQHDNC7zYi/OUHrdRVioBXkLa0KTFdAjQw=; b=HF/hEw2gAzoNXgp0Xr7cADN2ba6YH1qnkFNv2bSK9IB/5BEvMj9Rv0dSlnH7b8gugM zch7MfYh55YB238/zkNqKLFOv8DKEo4Orq6QxH15L9gWtTSXFatAX8OV6RL25+VrHODr FPB4zU7AprVBLoZuhMQ1E5FDyZ3JlrI7o6THZdFC1I3i6ZwI6QCUWH/bt+bu94MoRNeu uETAQnHMEaypk2pj1nuGtVDdIT309d0JdEl4FKC77loAIvDwsuJ7ZKvNFSE+PP+H7G89 OskepScUKix76Sbge9f0jzsaH9yViTdX6GR1U7z0v9hg7k831UFOSBBeRDBL7tJ4ASYL wY9w== X-Gm-Message-State: AOAM5336tSXq/sGy5GnhwwDDBVetX2byJ8KXwkChs6uwyLHD42Y0flHB 0MS6S1eRRhRT5qlUJIbZu4nRBDnZTJpYxWfJjGjR4GvQH0o= X-Google-Smtp-Source: ABdhPJz8IYSJPLF+yj328+avhpjrX0eu7c6wcwfhbhRxYk+5eyboph6zQWt2xa57M68HviMtZHU6y5KN2wH3fB6cH64= X-Received: by 2002:a5d:47a4:: with SMTP id 4mr12887345wrb.329.1629822945342; Tue, 24 Aug 2021 09:35:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tomasz CEDRO Date: Tue, 24 Aug 2021 18:35:16 +0200 Message-ID: Subject: Re: Arduino Development on aarch64? To: "Brian McGovern (bmcgover)" Cc: FreeBSD Questions Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4GvF941PqZz4Y9p X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cedro.info header.s=google header.b=JHBwBBJm; dmarc=none; spf=none (mx1.freebsd.org: domain of tomek@cedro.info has no SPF policy when checking 2a00:1450:4864:20::432) smtp.mailfrom=tomek@cedro.info X-Spamd-Result: default: False [-2.22 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[cedro.info:s=google]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.981]; 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)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[cedro.info:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::432:from]; NEURAL_HAM_SHORT(-0.94)[-0.942]; 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 16:35:53 -0000 On Tue, Aug 24, 2021 at 6:09 PM Brian McGovern (bmcgover) wrote: > > > 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 :-) > > Done. I suspect its a proportional issue - the smaller the RAM, the large= r the swap required. The flip side to this is that compile time goes WAY up= , and swap on some of the 64 bit arms is a bit unstable (leading to other c= rashes). Its one of the reasons I spent the extra $$ to get the 8GB variant= - almost makes it like a "real machine" =F0=9F=99=82 Yup :-) I also lack of more RAM in my AMD64 laptop and 8GB is really small in modern world.. but the RAM is soldered to the board.. I have IR Soldering Station and did some replacements of various components so I will try to perform RAM by hand hardware upgrade in my laptop to 16GB or 32GB I just need to find a replacement chips that will fit :-) This could be done also for ARM boards I guess :-) > > 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 :-) > > I don't have a ton of hardware variants, but this looks unique to FreeBSD= /aarch64. In /usr/include/machine/param.h, PAGE_SIZE_4K is defined thusly..= .. > > #define PAGE_SHIFT_4K 12 > #define PAGE_SIZE_4K (1 << PAGE_SHIFT_4K) > > It does not appear in FreeBSD/arm64, and unfortunately its not a "0". Mig= ht be worth making it a "#ifdef/#undef/#endif", but again, above my pay gra= de in the grand scheme to make that decision. > > I did not contact the openocd team, as I'm not sure they're the best "fir= st lookers", as its easy to simply state "Don't have your platform define t= hat value on this one platform variant..." > > I did send it to the openocd port maintainer, though, since I suspect tha= ts a better place to do the thinking as to whether this is more for FreeBSD= or openocd to fix. Ah, to its the OS specific not the MCU define, in that case the OpenOCD Port would be the best place to patch it conditionally on ARM build until a better solution is found :-) As far as I remember I have created initial OpenOCD port for FreeBSD.. and created initial generic SWD transport for OpenOCD :-) I was using it a lot with UrJTAG. But the upstream did not accept my LibSWD part as dedicated standalone module also I tried to make OpenOCD design more modular and coherent, proposed switch from TCL to Python, also some guys from Amontec just copied my work with no attribution, it was a bit mess back then, so I stopped using it at all circa 2013, not sure how it looks nowadays :-) Currently I am using pyOCD that is written as Python module so you can "just use it" on any platform with Python VirtualEnv and I really like that :-) Also Chris "flit" Reed the main developer and project owner is a very nice well organized open guy to work with when some tuning and/or platform specific and/or dependencies needs to be tuned/fixed so "thing just work out of the box"^TM on FreeBSD. It supports both SWD and JTAG transport, although focused on ARM, other targets/architectures may be added as well.. I guess that would be also good candidate to develop for RISC-V :-) --=20 CeDeROM, SQ7MHZ, http://www.tomek.cedro.info