-
• #2
Compiling for ESP8266_4MB gives similiar error
In both cases I get ELF not foundOnly difference I found in installation is:
- ubuntu on shared server is V18
- on raspberry its V20
- ubuntu on shared server is V18
-
• #3
Ahh - the issue might be that
provision.sh
is installing the x86 build ofgcc-arm-none-eabi
?What happens if you just run:
/home/nodejs/efeu/tools/gcc-arm-none-eabi-8-2018-q4-major/bin/arm-none-eabi-gcc --version
It should display something like:
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2018-q4-major) 8.2.1 20181213 (release) [gcc-8-branch revision 267074] Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
But if it fails, it's probably because you need an arm compiler build.
There is an ARM64 (aarch64) build available at https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads but I think the standard Pi OS is still 32bit.
So you could try installing a 64 bit OS: https://www.raspberrypi.org/forums/viewtopic.php?t=275370 or it does seem possible to compile arm-none-eabi-gcc from scratch on the Pi.
Others suggested you could actually just use the Pi's own GCC (since it's ARM anyway) but I'm not sure if it's quite good enough for embedded.
-
• #4
Others suggested you could actually just use the Pi's own GCC (since it's ARM anyway) but I'm not sure if it's quite good enough for embedded.
debian on pi has gcc-arm-none-eabi which on latest buster version is this
gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] (15:7-2018-q2-6)
so is reasonably fresh (?), then provision says
pi@raspberrypi:~/Espruino $ scripts/provision.sh MDBT42Q Provision BOARDNAME = MDBT42Q Provision FAMILY = NRF52 ===== NRF52 ===== ARM arm-none-eabi-gcc installed
however when I just checked out Espruino and tried to build for MDBT42Q it breaks on
JSON PARSE FAILED for { "type" : "event", "class" : "E", "name" : "touch", "params" : [ ["x","int","X coordinate in display coordinates"], ["y","int","Y coordinate in display coordinates"], ["b","int","Touch count - 0 for released, 1 for pressed"], ] } - No JSON object could be decoded make: *** [Makefile:744: gen/jswrapper.c] Error 1 make: *** Waiting for unfinished jobs....
it always builds few files and then gives this but next time it is building another couple of sources and still gives this same error
now tried building for PICO_R1_3 = stm32 and having same json parsing error, so is the tree broken now or do I perhaps miss some json related package?
-
• #5
@gordon, @fanoush, thanks for quickly responding.
Let me give some more information- ubuntu version is for 64 bit
- raspberry is V4 with 8gb ram and booting from usb stick
- problem occurs with ARM and ESP8266 and ESP32
- checking version for arm gives an error: Exec format error
Wonder if my idea to use raspberry for compiling is doable.
Need of an arm compiler for Espressif boards (and others?) could be the showstopper - ubuntu version is for 64 bit
-
• #6
Wonder if my idea to use raspberry for compiling is doable.
for ARM definitely doable, for ESP maybe there won't be prebuilt gcc toolchain for xtensa?
exec format error is probably wrong binary type
try to run
file /home/nodejs/efeu/tools/gcc-arm-none-eabi-8-2018-q4-major/bin/arm-none-eabi-gcc
or
ldd /home/nodejs/efeu/tools/gcc-arm-none-eabi-8-2018-q4-major/bin/arm-none-eabi-gcc
-
• #7
Yes, ESP8266 toolchain could be the pain. I'd have thought you could compile your own, but it's not friendly! Either that or you could probably run x86 versions inside of QEmu, which would have the benefit of being completely sandboxed from your system
-
• #8
@fanoush
running file ... gives
/home/nodejs/efeu/tools/gcc-arm-none-eabi-8-2018-q4-major/bin/arm-none-eabi-gcc: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=9ac5427532642fef341e6e032eea16d7eb5fde4c, strippedldd ... gives not a dynamic executable
In my poor understanding this is the showstopper for my idea.
Anyway, for espressif I will ask in their forum. Based on my experience with them I don't expect too much -
• #10
Downloaded gcc-arm-none-eabi-9-2020-q2-update-aarch64-linux.tar.bz2 as suggested.
At least compilation for ESPRUINOBOARD runs fine. -
• #11
Great! Good to know for normal Espruino board builds anyway!
If you do want to go x86 then I found https://www.amazon.co.uk/gp/product/B0894T4J78 (or similar no-brand NUC PCs) to be surprisingly good. You get a lot (memory, PSU, case) for your money.
-
• #12
was checking this atom Atom X5-Z8350 vs Pi4 and found this
https://openbenchmarking.org/vs/Processor/ARMv7%20Cortex-A72,Intel%20Atom%20x5-Z8350
this is 1.5Ghz cortex-A72 vs 1.9Ghz Atom (Pi4 can be easily overclocked to 1.9GHz too, possibly even more)
I am surprised that cortex-A72 (=Pi 4) is not that bad compared with Atom Z8350, in average and in most benchmarks it is faster even on 1.5Ghz clock!
For creating firmware I would like to switch from my shared ubuntu to a raspberry pi V4
According to provision.sh everything is installed.
But after calling make like this
I get this
Doing the same on shared ubuntu host runs fine without warning and error
Any idea ?