PSRAM cache - how/when to update toolchain?

jcsbanks
Posts: 289
Joined: Tue Mar 28, 2017 8:03 pm

PSRAM cache - how/when to update toolchain?

Postby jcsbanks » Fri Sep 20, 2019 9:43 am

https://github.com/espressif/esp-idf/issues/2892

Thought I might be better asking here my question about when/how to update the toolchain on Windows as it might be too basic for the GitHub issue.

Any advice appreciated, was waiting for ESP IDF 3.3 to release our product, but I am confused what to do about this PSRAM issue. I don't want a time bomb in the field.

jcsbanks
Posts: 289
Joined: Tue Mar 28, 2017 8:03 pm

Re: PSRAM cache - how/when to update toolchain?

Postby jcsbanks » Fri Oct 04, 2019 6:46 am

Any advice appreciated. Want to start beta testing our new product.

ESP_Sprite
Posts: 2930
Joined: Thu Nov 26, 2015 4:08 am

Re: PSRAM cache - how/when to update toolchain?

Postby ESP_Sprite » Fri Oct 04, 2019 8:06 am

We should start integrating this into mainline next week (it's a holiday in China now).

jcsbanks
Posts: 289
Joined: Tue Mar 28, 2017 8:03 pm

Re: PSRAM cache - how/when to update toolchain?

Postby jcsbanks » Wed Oct 16, 2019 12:07 pm

Thanks, I'd really like to install the updated toolchain on windows, but I cannot work out how to do it. I can manage to add the volatiles and change the binaries in newlib.

I can extract xtensa-esp32-elf-win32-1.22.0-98-g4638c4f-5.2.0-20190827.tar but the contents are smaller than the original toolchain and there is a problem with symbolic links (see next post for permissions).

It looks like it belong in C:\msys32\opt

Looking at https://docs.espressif.com/projects/esp ... nvironment
Last edited by jcsbanks on Wed Oct 16, 2019 12:24 pm, edited 1 time in total.

jcsbanks
Posts: 289
Joined: Tue Mar 28, 2017 8:03 pm

Re: PSRAM cache - how/when to update toolchain?

Postby jcsbanks » Wed Oct 16, 2019 12:22 pm

I used 7zip in administrator mode (so it was able to create symbolic links) to unpack the tar in a new directory.

jcsbanks
Posts: 289
Joined: Tue Mar 28, 2017 8:03 pm

Re: PSRAM cache - how/when to update toolchain?

Postby jcsbanks » Wed Oct 16, 2019 12:36 pm

Code: Select all

# Automatically download precompiled toolchain, unpack at /opt/xtensa-esp32-elf/
TOOLCHAIN_ZIP=xtensa-esp32-elf-win32-1.22.0-80-g6c4433a-5.2.0.zip
echo "Downloading precompiled toolchain ${TOOLCHAIN_ZIP}..."
cd ~
curl -LO --retry 10 http://dl.espressif.com/dl/${TOOLCHAIN_ZIP}
cd /opt
rm -rf /opt/xtensa-esp32-elf  # for upgrades
unzip ~/${TOOLCHAIN_ZIP}
rm ~/${TOOLCHAIN_ZIP}

cat > /etc/profile.d/esp32_toolchain.sh << EOF
# This file was created by ESP-IDF windows_install_prerequisites.sh
# and will be overwritten if that script is run again.
export PATH="/opt/xtensa-esp32-elf/bin:\$PATH"
EOF

# clean up pacman package cache to save some disk space
pacman --noconfirm -Scc

cat << EOF
************************************************
MSYS2 environment is now ready to use ESP-IDF.

1) Run 'source /etc/profile' to add the toolchain to
your path in this terminal. This command produces no output.
You only need to do this once, future terminals do this
automatically when opened.
Trying to work out the new toolchain here which has symbolic links to the old one and how that works with PATH?

Is there some unzip I can do with the new toolchain that merges it with the old one to get it up to size or am I completely missing the point?

jcsbanks
Posts: 289
Joined: Tue Mar 28, 2017 8:03 pm

Re: PSRAM cache - how/when to update toolchain?

Postby jcsbanks » Wed Oct 16, 2019 12:54 pm

Code: Select all

Toolchain path: /opt/xtensa-esp32-elf-new/bin/xtensa-esp32-elf-gcc
WARNING: Toolchain version is not supported: crosstool-ng-1.22.0-98-g4638c4f6
Expected to see version: crosstool-ng-1.22.0-80-g6c4433a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
Compiler version: 5.2.0
Python requirements from C:/msys32/home/jcsba/esp/esp-idf/requirements.txt are satisfied.
.
.
.
WARNING: Toolchain version is not supported: crosstool-ng-1.22.0-98-g4638c4f6
Expected to see version: crosstool-ng-1.22.0-80-g6c4433a
Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.
By unpacking the toolchain in xtensa-esp32-elf-new directory next to xtensa-esp-32-elf and changing esp32_toolchain.sh to

Code: Select all

export PATH="$PATH:/opt/xtensa-esp32-elf-new/bin"
it was able to compile, so guess this is a reasonable way to do it.

Comments on anything I'm doing wrong here please.

jcsbanks
Posts: 289
Joined: Tue Mar 28, 2017 8:03 pm

Re: PSRAM cache - how/when to update toolchain?

Postby jcsbanks » Wed Oct 16, 2019 12:59 pm

Even if I rename the original toolchain, builds still work, but the new toolchain is 300MB smaller!!?? I guess I just don't understand these symbolic links and where they point to.

jcsbanks
Posts: 289
Joined: Tue Mar 28, 2017 8:03 pm

Re: PSRAM cache - how/when to update toolchain?

Postby jcsbanks » Mon Oct 21, 2019 7:24 am

Update: despite the smaller size, the toolchain and applications built with it do work.

Who is online

Users browsing this forum: MSN [Bot] and 23 guests