Question: Assembler messages memory exhausted

Mosbeard
Posts: 2
Joined: Thu Feb 13, 2020 12:55 pm

Question: Assembler messages memory exhausted

Postby Mosbeard » Thu Feb 13, 2020 1:28 pm

Hello,

i am trying to implement an OPC UA-Server on ESP32.
Here some info about my environment:
## Environment
- Module or chip used: ESP32-WROOM-32U
- IDF version : v4.1-dev-437-gd2ad0f077-dirty
- Build System: ninja|CMake|idf.py
- Compiler version (run ``xtensa-esp32-elf-gcc --version`` to find it): 8.2.0
- Operating System: Windows 10
- (Windows only) environment type: ESP Command Prompt
- Using an IDE?: No
- Power Supply: external 3.3V

Attached you find the output from idf.py build command. What does this exactly mean and what can i do? Are there some tricks to get more memory? I can't find a documentation for as.exe.
Does ESP32-WROOM-32U have too little flash?
Attachments
debug_output.txt
(7.56 KiB) Downloaded 9 times

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

Re: Question: Assembler messages memory exhausted

Postby ESP_Sprite » Sat Feb 15, 2020 1:17 pm

It looks like you ran out of memory on the computer esp-idf is running at; it doesn't have anything to do with any memory on the ESP32 side.

Mosbeard
Posts: 2
Joined: Thu Feb 13, 2020 12:55 pm

Re: Question: Assembler messages memory exhausted

Postby Mosbeard » Mon Feb 17, 2020 7:52 am

Okay, thanks for the hint. Attached you find the c source file I want to add to my esp-idf project. When I add this I get the memory exhausted error.
Now I watched the task manager while I run the ninja command in the build directory of my project with this results:
First cc1.exe is starting, raises up to about 900 MB and then it terminates.
After that as.exe is starting, raises up to about 1800 MB and then it terminates with memory exhausted error.
Are there any memory limits for this program or esp-idf which I can configure?
When this is not possible, what else can I try to compile this c source file in my project?
What is the memory limit of as.exe dependent on?
Attachments
open62541.zip
(888.33 KiB) Downloaded 5 times

ESP_Angus
Posts: 2011
Joined: Sun May 08, 2016 4:11 am

Re: Question: Assembler messages memory exhausted

Postby ESP_Angus » Tue Feb 18, 2020 4:43 am

Code: Select all

$ ls -lh open62541.c
-rw-r--r-- 1 gus gus 9.3M Feb 13 08:28 open62541.c
$ wc -l open62541.c
180301 open62541.c
Wow, 9.3 Megabytes and 180,000 lines. That is a large source file!

I notice that the comment at the top says "THIS IS A SINGLE-FILE DISTRIBUTION CONCATENATED FROM THE OPEN62541 SOURCE". You could perhaps try obtaining the non-single-file version and compile each file individually? That would probably solve the problem.
Are there any memory limits for this program or esp-idf which I can configure?
When this is not possible, what else can I try to compile this c source file in my project?
What is the memory limit of as.exe dependent on?
Fairly sure the only hard limit is the amount of RAM in your computer. You could try exiting other programs running in Windows, buying more RAM, or increasing the Windows page file size.

However I think the best option would be to seek out the not-single-file version of this project.

EDIT: My colleague reminded me the Windows toolchains are compiled as 32-bit binaries, so there is a limit of 2GB of RAM per executable. This is probably the limit reached by as.exe. There is apparently a "patcher" tool which can patch 32-bit Windows binaries so they can access 4GB of RAM when run under 64-bit Windows, maybe this would help. But finding smaller source files is probably the best solution!

Who is online

Users browsing this forum: Bing [Bot] and 20 guests