Cross-compiler newbie stuck at square one

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
lfast
Posts: 8
Joined: Mon Jul 09, 2018 6:57 pm

Cross-compiler newbie stuck at square one

Post by lfast » Wed Sep 05, 2018 9:26 pm

I'm stuck at square one getting the cross compiler running under CentOS 7. I believe I followed the instructions correctly but I get permissions error from make on the first file. All the perms seem to be right. Three things seem suspicious:

- esp-idf hash is blank - but git log in that folder reports the correct value
- Unknown option: -C git --version => 1.8.3.1
- the last line has a very odd path starting with build/bootloader//home/...

> make
ESP IDF path: /home/lfast/Documents/IoT/micropython/esp-idf
Current git hash:
Supported git hash: 9a55b42f0841b3d38a61089b1dda4bf28135decd
Unknown option: -C
usage: git [--version] ...
CC /home/lfast/Documents/IoT/micropython/esp-idf/components/bootloader_support/src/bootloader_clock.c
make: execvp: /home/lfast/Documents/IoT/micropython/esp32-toolchain/xtensa-esp32-elf/lib/gcc: Permission denied
make: *** [build/bootloader//home/lfast/Documents/IoT/micropython/esp-idf/components/bootloader_support/src/bootloader_clock.o] Error 127

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: Cross-compiler newbie stuck at square one

Post by jickster » Thu Sep 06, 2018 2:24 am

Do you mean mpy-cross?


Sent from my iPhone using Tapatalk Pro

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: Cross-compiler newbie stuck at square one

Post by stijn » Thu Sep 06, 2018 6:54 am

If your git version doesn't know the -C switch it is many years old: better get the latest one. If there isn't a newer one for your system you'll have to find a workaround (using --git-dir and --work-tree combination).

Permission denied error could be because gcc isn't executable. Can you just run it from the commandline? What are the full permisions on it reported by ls?

lfast
Posts: 8
Joined: Mon Jul 09, 2018 6:57 pm

Re: Cross-compiler newbie stuck at square one

Post by lfast » Thu Sep 06, 2018 5:11 pm

Thanks you both. I'm over the first hump. gcc and all the extensa binaries are prefixed with xtensa-esp32-elf-xyz, so I created a symlink from gcc => xtensa-esp32-elf-gcc. ... and then did the same for g++, ld & size. After that it ran to completion. On to testing...

Regarding your other comments

1. Not mpy-cross. I'm trying to build my own micropython-esp32 installation package.

2. I upgraded git. FYI, the normal CentOS 7 repos don't have git 2.x. They stop at 1.8.3.1 Found the latest here: http://opensource.wandisco.com/centos/7 ... noarch.rpm

lfast
Posts: 8
Joined: Mon Jul 09, 2018 6:57 pm

Re: Cross-compiler newbie stuck at square one

Post by lfast » Thu Sep 06, 2018 6:09 pm

... and I now understand why the CROSS-COMPILER variable had that odd syntax: xtensa-esp32-elf-
Thanks again

Post Reply