Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Aug 2021 17:16:06 +0200
From:      Tomasz CEDRO <tomek@cedro.info>
To:        "Brian McGovern (bmcgover)" <bmcgover@cisco.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>,  "skreuzer@freebsd.orig" <skreuzer@freebsd.orig>
Subject:   Re: Arduino Development on aarch64?
Message-ID:  <CAM8r67BNehyMExr=TTqnuUZLg%2BNTyYn7RpRgSwyPAOZ3t8%2BZhg@mail.gmail.com>
In-Reply-To: <BN6PR11MB16501D4CDD82BE1B7C64D574C5C59@BN6PR11MB1650.namprd11.prod.outlook.com>
References:  <BN6PR11MB1650A23D206F5DA52E7B4013C5FA9@BN6PR11MB1650.namprd11.prod.outlook.com> <CAM8r67CT_5KcB8dGufNXNLGkahY3=iV%2Bk2SB1QsUFFs7xyWxuw@mail.gmail.com> <BN6PR11MB16501D4CDD82BE1B7C64D574C5C59@BN6PR11MB1650.namprd11.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM8r67BNehyMExr=TTqnuUZLg%2BNTyYn7RpRgSwyPAOZ3t8%2BZhg>