Build firmware for external spiram

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
davidbogatec
Posts: 9
Joined: Tue Feb 04, 2020 3:23 pm

Build firmware for external spiram

Post by davidbogatec » Thu Feb 27, 2020 9:58 am

I have a problem with building the micropython firmware for generic spiram.
I need to build it for ESP32 VROVER module that has 4 MB of additional spiram and have also to integrate custom C-User module.
How to do? thanks

User avatar
jimmo
Posts: 1465
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Build firmware for external spiram

Post by jimmo » Thu Feb 27, 2020 10:11 am

Hi,
What's the issue you're seeing? What have you tried so far?

davidbogatec
Posts: 9
Joined: Tue Feb 04, 2020 3:23 pm

Re: Build firmware for external spiram

Post by davidbogatec » Thu Feb 27, 2020 10:36 am

Hi Jimmo,
when I try to build it with

Code: Select all

make BOARD=GENERIC_SPIRAM
the build stops with the following output.


Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Building with ESP IDF v3
GEN build-GENERIC_SPIRAM/sdkconfig.h
mkdir -p build-GENERIC_SPIRAM/bootloader//home/bogatec/esp32/esp-idf/components/bootloader/subproject/main/
mkdir -p build-GENERIC_SPIRAM/bootloader//home/bogatec/esp32/esp-idf/components/bootloader_support/src/
mkdir -p build-GENERIC_SPIRAM/bootloader//home/bogatec/esp32/esp-idf/components/log/
mkdir -p build-GENERIC_SPIRAM/bootloader//home/bogatec/esp32/esp-idf/components/micro-ecc/micro-ecc/
mkdir -p build-GENERIC_SPIRAM/bootloader//home/bogatec/esp32/esp-idf/components/soc/esp32/
mkdir -p build-GENERIC_SPIRAM/bootloader//home/bogatec/esp32/esp-idf/components/soc/src/
mkdir -p build-GENERIC_SPIRAM/bootloader//home/bogatec/esp32/esp-idf/components/spi_flash/
CC /home/bogatec/esp32/esp-idf/components/bootloader_support/src/bootloader_clock.c
xtensa-esp32-elf-gcc: error: unrecognized command line option '-mfix-esp32-psram-cache-issue'
make: *** [Makefile:954: build-GENERIC_SPIRAM/bootloader//home/bogatec/esp32/esp-idf/components/bootloader_support/src/bootloader_clock.o] Error 1

any idea?
thanks for your support

User avatar
jimmo
Posts: 1465
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Build firmware for external spiram

Post by jimmo » Thu Feb 27, 2020 12:42 pm

Which toolchain are you using? How did you set it up?

davidbogatec
Posts: 9
Joined: Tue Feb 04, 2020 3:23 pm

Re: Build firmware for external spiram

Post by davidbogatec » Thu Feb 27, 2020 1:24 pm

Here the info you've requested

I am working in linux environment.
I am using the same setup, toolchain, to build normal or spiram enabled firmware. I succeed to build the generic firmware but not the spiram.

What I do:
1) Download and extract xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz
wget https://dl.espressif.com/dl/xtensa-esp3 ... 2.0.tar.gz
tar -xzf xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz
export PATH=$PATH:$HOME/esp32/xtensa-esp32-elf/bin
echo "export PATH=\$PATH:$HOME/esp32/xtensa-esp32-elf/bin" >> ~/.bashrc

2) micropython$ make -C mpy-cross
3) create makefile in ports/esp32

ESPIDF = /home/sviluppo/Micropython/esp32/esp-idf
#PORT = /dev/ttyUSB0
#FLASH_MODE = qio
#FLASH_SIZE = 4MB
#CROSS_COMPILE = xtensa-esp32-elf-
include Makefile

davidbogatec
Posts: 9
Joined: Tue Feb 04, 2020 3:23 pm

Re: Build firmware for external spiram

Post by davidbogatec » Mon Mar 02, 2020 11:19 am

What is wrong in your opinion?

Thank Jimmo
David

User avatar
jimmo
Posts: 1465
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Build firmware for external spiram

Post by jimmo » Mon Mar 02, 2020 11:51 am

Hi,
davidbogatec wrote:
Mon Mar 02, 2020 11:19 am
What is wrong in your opinion?
Sorry about the delay... I was hoping someone else would know because I'm a bit stumped ...

I mostly use IDF 4.0 and the new 8.2 toolchain, but I went back and did a test build with the old 5.2 toolchain and IDF 3.3.1. (Building at the current micropython master --1993c8cf9af930cd6ff2f28390ac3a8a09d5b297 ).

Code: Select all

$ export PATH=/home/jimmo/src/github.com/espressif/toolchain/xtensa-esp32-elf/bin:$PATH

$ (cd /home/jimmo/src/github.com/espressif/esp-idf3 && git describe && git rev-parse HEAD)
v3.3.1
143d26aa49df524e10fb8e41a71d12e731b9b71d

$ xtensa-esp32-elf-gcc --version
xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 5.2.0

$ blaze BOARD=GENERIC_SPIRAM clean
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Building with ESP IDF v3
rm -rf build-GENERIC_SPIRAM

$ blaze BOARD=GENERIC_SPIRAM
(success)
So I guess the first thing to check is that you have the same xtensa-esp32-elf-gcc --version and IDF commit hash.

Then then next thing might be to try using the new toolchain (8.2.0) which you can install using the IDF 4.0 (I just updated the instructions for this today -- see https://github.com/micropython/micropyt ... 5713/files )

Post Reply