Need Help for ESP32 PSRAM Msys2 IDE

temp4eb
Posts: 35
Joined: Tue Jun 06, 2017 8:59 am

Need Help for ESP32 PSRAM Msys2 IDE

Postby temp4eb » Wed Jul 26, 2017 3:47 am

I took the official Windows all-in-one toolchain & MSYS zip file from dl.espressif.com as the ESP32 IDE:
esp32_win32_msys2_environment_and_toolchain-20170330.zip
And I got the ESP32 WROVER KIT V3 board which had the ESP-WROVER with 4MB of psRAM.And I had git clone the feature/psram_malloc branch esf-idf code.The build failed when I open the ext PSRAM features.It seems need special xtensa-esp32-elf files .

Code: Select all

make
CC src/bootloader_random.o
xtensa-esp32-elf-gcc.exe: error: unrecognized command line option '-mfix-esp32-psram-cache-issue'
xtensa-esp32-elf-gcc.exe: error: unrecognized command line option '-mfix-esp32-psram-cache-issue'
make[2]: *** [/home/esp-idf/make/component_wrapper.mk:177:src/bootloader_random.o] Error 1
make[1]: *** [/home/esp-idf/make/project.mk:395:bootloader_support-build] Error 2
make: *** [/home/esp-idf/components/bootloader/Makefile.projbuild:31:/home/esp-idf/examples/protocols/https_request/build/bootloader/bootloader.bin] Error 2
Since I use the Win7 64bit ,so I take the Msys2 as the IDE,which need xtensa-esp32-elf-XX.exe to build the firmware.I tried to make and build xtensa-1.22.x-ext_ram_patch version crosstool-ng but failed.
I also tried xtensa-1.22.x-ext_ram_patch version exe files which were built from Cygwin(thanx rudi),it seems these files which were built in Cygwin could not be used in Msys2:

Code: Select all

$ make
      3 [main] xtensa-esp32-elf-gcc (9896) D:\msys32\opt\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe: *** fatal error - cygheap base mismatch detected - 0x612E4408/0x61304400.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
      1 [main] xtensa-esp32-elf-gcc (9996) D:\msys32\opt\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe: *** fatal error - cygheap base mismatch detected - 0x612E4408/0x61304400.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
WARNING: Failed to find Xtensa toolchain, may need to alter PATH or set one in the configuration menu
      1 [main] xtensa-esp32-elf-gcc (7904) D:\msys32\opt\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe: *** fatal error - cygheap base mismatch detected - 0x612E4408/0x61304400.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
      1 [main] xtensa-esp32-elf-gcc (9476) D:\msys32\opt\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe: *** fatal error - cygheap base mismatch detected - 0x612E4408/0x61304400.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
WARNING: Failed to find Xtensa toolchain, may need to alter PATH or set one in the configuration menu
CC src/bootloader_random.o
      1 [main] xtensa-esp32-elf-gcc (9144) D:\msys32\opt\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe: *** fatal error - cygheap base mismatch detected - 0x612E4408/0x61304400.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
make[2]: *** [/home/esp-idf/make/component_wrapper.mk:177: src/bootloader_random.o] Segmentation fault
make[1]: *** [/home/esp-idf/make/project.mk:395:bootloader_support-build] Error 2
make: *** [/home/esp-idf/components/bootloader/Makefile.projbuild:31:/home/esp-idf/examples/protocols/https_request/build/bootloader/bootloader.bin] Error 2
Since we are familier with Msys2 IDE for ESP32 development,I still want to get the Msys2 version xtensa-esp32-elf-gcc for ESP32 PSRAM modules.Could someone help me?Thanx!

User avatar
rudi ;-)
Posts: 1727
Joined: Fri Nov 13, 2015 3:25 pm

Re: Need Help for ESP32 PSRAM Msys2 IDE

Postby rudi ;-) » Wed Jul 26, 2017 4:58 am

temp4eb wrote:I took the official Windows all-in-one toolchain & MSYS zip file from dl.espressif.com as the ESP32 IDE:

...
The build failed when I open the ext PSRAM features.It seems need special xtensa-esp32-elf files .
this is the thinking problem.
this is only a "toolchain" - no developer system for making a toolchains.

yes - you need special xtensa-esp32-elf files

you must build by your own under Linux or Mac

and you will get only a Linux or Mac build Toolchain - No windows exe files

you can only compile officially the future/psram_malloc for your pSRAM using in Wrover Kit V3
under Linux or Mac

.

please read careful the base in the psram thread!
it is the first posting if this thread!

it is not helpfull if you open now again the same problematic in a new post


take from this thread, jeroen has detailed described all fine what is to do:
----------------------------------------------------------------------------------------------

You can download the beta esp-idf and the toolchain from the usual spots

(https://github.com/espressif/esp-idf and https://github.com/espressif/crosstool-NG)

but be sure to switch to the psram-compatible branches.

For esp-idf, the branch is called 'feature/psram_malloc', for the toolchain it is called 'xtensa-1.22.x-ext_ram_patch'.

Note that there are no binaries available for the toolchain, you will need to build it from source.

For the different OSses, this is documented here:
Linux Mac

(Sorry, no Windows support for this yet.).

Note: In order to get the psram version, in the instructions at the 'git clone' command, replace 'xtensa-1.22.x' with 'xtensa-1.22.x-ext_ram_patch'.

For esp-idf, just clone esp-idf as usual, then do 'git checkout feature/psram_malloc'.

----------------------
temp4eb wrote: I still want to get the Msys2 version xtensa-esp32-elf-gcc for ESP32 PSRAM modules.Could someone help me?Thanx!
....
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

temp4eb
Posts: 35
Joined: Tue Jun 06, 2017 8:59 am

Re: Need Help for ESP32 PSRAM Msys2 IDE

Postby temp4eb » Wed Jul 26, 2017 5:55 am

In fact, what I need is the updated version of :
xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip
which could support the ESP32 PSRAM build.Thanx!

temp4eb
Posts: 35
Joined: Tue Jun 06, 2017 8:59 am

Re: Need Help for ESP32 PSRAM Msys2 IDE

Postby temp4eb » Wed Jul 26, 2017 6:06 am

rudi ;-) wrote:
temp4eb wrote:I took the official Windows all-in-one toolchain & MSYS zip file from dl.espressif.com as the ESP32 IDE:

...
The build failed when I open the ext PSRAM features.It seems need special xtensa-esp32-elf files .
this is the thinking problem.
this is only a "toolchain" - no developer system for making a toolchains.

yes - you need special xtensa-esp32-elf files

you must build by your own under Linux or Mac

and you will get only a Linux or Mac build Toolchain - No windows exe files

you can only compile officially the future/psram_malloc for your pSRAM using in Wrover Kit V3
under Linux or Mac

.

please read careful the base in the psram thread!
it is the first posting if this thread!

it is not helpfull if you open now again the same problematic in a new post


take from this thread, jeroen has detailed described all fine what is to do:
----------------------------------------------------------------------------------------------

You can download the beta esp-idf and the toolchain from the usual spots

(https://github.com/espressif/esp-idf and https://github.com/espressif/crosstool-NG)

but be sure to switch to the psram-compatible branches.

For esp-idf, the branch is called 'feature/psram_malloc', for the toolchain it is called 'xtensa-1.22.x-ext_ram_patch'.

Note that there are no binaries available for the toolchain, you will need to build it from source.

For the different OSses, this is documented here:
Linux Mac

(Sorry, no Windows support for this yet.).

Note: In order to get the psram version, in the instructions at the 'git clone' command, replace 'xtensa-1.22.x' with 'xtensa-1.22.x-ext_ram_patch'.

For esp-idf, just clone esp-idf as usual, then do 'git checkout feature/psram_malloc'.

----------------------
temp4eb wrote: I still want to get the Msys2 version xtensa-esp32-elf-gcc for ESP32 PSRAM modules.Could someone help me?Thanx!
....
Hi Rudi,
Thanx for your reply again!I wonder if the cygwin could build the 'xtensa-1.22.x-ext_ram_patch' successfully,why I could not build it under Msys2? It seems the crosstool-ng not support Msys2?http://crosstool-ng.github.io/docs/os-setup/
Since the xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip was from the official site, hope there updated version could come up soon.

User avatar
rudi ;-)
Posts: 1727
Joined: Fri Nov 13, 2015 3:25 pm

Re: Need Help for ESP32 PSRAM Msys2 IDE

Postby rudi ;-) » Wed Jul 26, 2017 6:32 am

temp4eb wrote: Hi Rudi,
Thanx for your reply again!I wonder if the cygwin could build the 'xtensa-1.22.x-ext_ram_patch' successfully,why I could not build it under Msys2?
ok. one time again -

please look in your c:\msys32\opt
there is
- > your toolchain for esp32 as mingw32 ( 260 MB? )
and the rest in your msys32 folder is mingw32 tools for make and build firmware for ESP32
not sure how much the msys32 folder is total.

now look in my cygwin folder, ( see the pic attached )
it contains few sourcen and tools for can build a toolchain
that you can then use for build a firmware by the toolchain
what you find in your msys32\opt folder 260 MB .

and my cygwin contains some different versions for Linux, Mac, Windows
for build make tools then that can used by the "HOST" pc
you know what is your "HOST" pc?
cyg_developer.png
cyg_developer.png (12.26 KiB) Viewed 13702 times
...
this was cygwin32, my cywin64 is near double

temp4eb wrote: It seems the crosstool-ng not support Msys2?http://crosstool-ng.github.io/docs/os-setup/
Msys32 is only the OS you use then
but you can build in Linux for your Host PC "each" build with crosstool-ng
cause like the name say - it is a crosstool
same machine : you build on linux for linux a toolchain example xtensa-esp-elf
different machine : you build on linux for windows example a gcc for windows
or canadian cross - you build on linux for windows a toolchain example xtensa-esp-elf
temp4eb wrote: Since the xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip was from the official site,
hope there updated version could come up soon.
i think it comes earliest with V3 - September? Dezember? not sure - perhabs 2018?
this future/psram_malloc is very young - don't forget, the hardware comes in end august/sept
on market or mid Sept -

suggest to you:
wait for the weekend, i will finnish the steps in detail
you will never use mingw32 in windows if you onetime worked with cygwin
it is faster and it is posix and it is linux near ;-)

which IDE you use for developing?
i suggest you: take eclipse - the newest Oxygen
there is example cygwin support .. and there are basicaly make tools possible
...

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

temp4eb
Posts: 35
Joined: Tue Jun 06, 2017 8:59 am

Re: Need Help for ESP32 PSRAM Msys2 IDE

Postby temp4eb » Wed Jul 26, 2017 7:42 am

rudi ;-) wrote: but you can build in Linux for your Host PC "each" build with crosstool-ng
cause like the name say - it is a crosstool
same machine : you build on linux for linux a toolchain example xtensa-esp-elf
different machine : you build on linux for windows example a gcc for windows
or canadian cross - you build on linux for windows a toolchain example xtensa-esp-elf
Hi Rudi,
You said the Windows exe could be built on Linux,if it is possible to build the exe files for Msys2 by set:
host = i686-pc-mingw32
in cygwin build settings?
Thanx!

User avatar
rudi ;-)
Posts: 1727
Joined: Fri Nov 13, 2015 3:25 pm

Re: Need Help for ESP32 PSRAM Msys2 IDE

Postby rudi ;-) » Wed Jul 26, 2017 8:09 am

temp4eb wrote: Hi Rudi,
You said the Windows exe could be built on Linux,if it is possible to build the exe files for Msys2 by set:
host = i686-pc-mingw32
in cygwin build settings?
Thanx!
yes - now you have understand!
but be sure that you have then mingw32 gcc on linux for build the exe file for the host

this becomes then the Type: canadian cross build
like i posted you the original

Code: Select all

[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = x86_64-pc-linux-gnu
[EXTRA]      host   = i686-pc-mingw32
[EXTRA]      target = xtensa-esp32-elf
and then you do the same like the officially is done.
you need all sourcen - so check it by self :)
you will learn many things :mrgreen:
and your folder in linux will go greate for the build 2-3 GB more ?

FYI:
say not Msys2 -
better say what you use on the host: mingw32
Msys2 is only the Os

you build then toolchain for the host pc : mingw32

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

temp4eb
Posts: 35
Joined: Tue Jun 06, 2017 8:59 am

Re: Need Help for ESP32 PSRAM Msys2 IDE

Postby temp4eb » Wed Jul 26, 2017 9:04 am

rudi ;-) wrote: this becomes then the Type: canadian cross build
LOL,The term Canadian Cross was coined because at the time that these issues were all being hashed out, Canada had three national political parties. :lol:

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 130 guests