Arduino Development on aarch64?

Tomasz CEDRO tomek at cedro.info
Tue Aug 24 15:16:43 UTC 2021


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 figured I'd share it here as a reference to others, and that someone might pick 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. This does not appear to be the case in the hardware configuration above. Commenting 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 redefinition 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 port, and I'm cc'ing the maintainer, hopefully one of you can either incorporate 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 = 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. There 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 :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


More information about the freebsd-questions mailing list