Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 8 Replies) ld.exe: .elf section .text1 will not fit in region iram1_0_seg (Read 3822 times)
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Nov 26th, 2020 at 3:37pm
Print Post  
Not been working on a project for a couple of months, recently updated vMicro at least once.

What was compiling no longer compiles in VS. Here's what I get:

Code (C++)
Select All
Compiling 'UnitF_BathroomSensor_V2' for 'LOLIN(WEMOS) D1 R2 & mini'
Build Folder: "file:///D:/VMTemp/UnitF_BathroomSensor_V2/esp8266_d1_mini/Release"

UnitF_BathroomSensor_V2.ino:36: In file included from
FastLED.h:14: note  #pragma message  FastLED version 3.003.003
   #    pragma message "FastLED version 3.003.003"

FastLED.h:65: In file included from
UnitF_BathroomSensor_V2.ino:36: from
fastspi.h:130: note  #pragma message  No hardware SPI pins defined.  All SPI access will default to bitbanged output
   #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
ld.exe: 2.ino.elf section .text1 will not fit in region iram1_0_seg

Error linking for board LOLIN(WEMOS) D1 R2 & mini
Build failed for project 'UnitF_BathroomSensor_V2'

collect2.exe*: error: ld returned 1 exit status
 



Compiling this in Arduino IDE produces this:

Code (C++)
Select All
In file included from C:\Data\My nsor_V2.ino:36:0:
C:\Data\My Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003
 #    pragma message "FastLED version 3.003.003"
                     ^
In file included from C:\Data\My Documents\Arduino\libraries\FastLED/FastLED.h:65:0,
                 from C:\Data\My nsor_V2.ino:36:
C:\Data\My Documents\Arduino\libraries\FastLED/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                       ^
Executable segment sizes:
IROM   : 347876          - code in flash         (default or ICACHE_FLASH_ATTR)
IRAM   : 30204   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...)
DATA   : 1300  )         - initialized variables (global, static) in RAM/HEAP
RODATA : 3668  ) / 81920 - constants             (global, static) in RAM/HEAP
BSS    : 27392 )         - zeroed variables      (global, static) in RAM/HEAP
Sketch uses 383048 bytes (36%) of program storage space. Maximum is 1044464 bytes.
Global variables use 32360 bytes (39%) of dynamic memory, leaving 49560 bytes for local variables. Maximum is 81920 bytes.
 



What's happening please?
  
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #1 - Nov 26th, 2020 at 4:20pm
Print Post  
More information...

Including MAP files in case this helps.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #2 - Nov 26th, 2020 at 4:23pm
Print Post  
« Last Edit: Nov 26th, 2020 at 4:26pm by City Slicker »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #3 - Nov 26th, 2020 at 4:25pm
Print Post  
Thanks for the report, 

So we can understand further, could you attach the build output, with the Verbose and Show Build Properties set as shown at the top of this page?
  
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #4 - Nov 26th, 2020 at 4:33pm
Print Post  
Output from build as requested
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #5 - Nov 26th, 2020 at 6:04pm
Print Post  
Thanks for the detail, it appears there is an override in the VMicro > Project Properties > Configuration Extra Flags Project, set to -O0.

Does it improve if this is removed?
  
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #6 - Nov 27th, 2020 at 12:52am
Print Post  
Simon@Visual Micro wrote on Nov 26th, 2020 at 6:04pm:
VMicro > Project Properties > Configuration Extra Flags Project, set to -O0


Err, nothing set for this field in the IDE although I can see it in the output.

I tried 'Disable Optimization Project=True' and it compiles. See output.

Haven't really got a clue about these settings, never touch them. What have I done?
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #7 - Nov 27th, 2020 at 4:04am
Print Post  
Update:

While the code now compiles, it's banjaxed - I'm using RGB LEDs and they are not being controlled correctly. I'm compiling via Arduino IDE without any issues.

Project and IDE settings attached
« Last Edit: Nov 27th, 2020 at 4:12am by City Slicker »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #8 - Nov 27th, 2020 at 4:59pm
Print Post  
Would it be possible to attach the log from the Arduino IDE, with the verbose preference enabled?
  
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #9 - Dec 3rd, 2020 at 3:08am
Print Post  
Attached is output from the Arduino IDE
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #10 - Dec 3rd, 2020 at 3:37am
Print Post  
If this helps, I'm experiencing issues with other code as well.

I'm currently working on another project using FastLED library. It's used in the project already discussed - the project that built using vMicro when I tinkered with Disable Optimization Project but where the LED control was not working properly.

This compiles without error but the LED's it controls do not function correctly. As with the project already discussed, it compiles and operates as expected in Arduino IDE.

I'm going to try to roll back the vMicro extension and verify what works.
« Last Edit: Dec 3rd, 2020 at 3:41am by City Slicker »  
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #11 - Dec 3rd, 2020 at 6:12am
Print Post  
Update:

Installed the following in order...

Visual.Micro.Arduino.Studio_20_07_08_3
Visual.Micro.Arduino.Studio_20_06_30_0
Visual.Micro.Arduino.Studio_20_06_18_0
Visual.Micro.Arduino.Studio_1911_28_3

The last installed produced correct build - I picked it because this was around the last date I successfully revised the project. Happy to try later versions but can you give me a clue as to which I should try.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #12 - Dec 3rd, 2020 at 12:03pm
Print Post  
Thanks for the updates and detail here!

Would it be possible to attach the build log from the version which has worked, so we can compare with the others?
  
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #13 - Dec 4th, 2020 at 9:51am
Print Post  
See Project Build - VM Version 1911_28_3 attached
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #14 - Dec 4th, 2020 at 11:59am
Print Post  
Thanks for the log.

It appears this is for a different project to the initial report, and does not include the FastLED Library in the working compilation, but it does use the Time and ButtonInput Libraries.

Would it be possible to email us the project, or perform a clean on the "UnitF_BathroomSensor_V2" project and attach the full build log again on the older version?

  
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #15 - Dec 4th, 2020 at 3:25pm
Print Post  
Further information:

I've identified the latest version in which the project compiles a functional binary...

Visual Micro 2002.7.0

The later version produces screwy binary...

Visual Micro 20.02.16 sp1

I've attached logs for build from previous versions and the failing one so you can see what is different.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #16 - Dec 4th, 2020 at 3:25pm
Print Post  
The first version to fail is:
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #17 - Dec 5th, 2020 at 9:47am
Print Post  
Simon@Visual Micro wrote on Dec 4th, 2020 at 11:59am:
It appears this is for a different project to the initial report, and does not include the FastLED Library in the working compilation, but it does use the Time and ButtonInput Libraries.


Yes and no. Its a different project exhibiting the same symptoms. And it does include FastLED and ButtonInput in the project, but perhaps there is a bug there too if they do not appear in the output.

If it helps, the identifiable failure in compiling (if it does compile) is the functionality of FastLED which controls RGB LEDs. The data being sent to the LEDs is incorrect and the LEDs function erratically or with different colours. There may be other issues but this one was obvious.

Debugging the first project "UnitF_BathroomSensor_V2" is difficult because its installed remotely. But for you...


Simon@Visual Micro wrote on Dec 4th, 2020 at 11:59am:
Would it be possible to email us the project, or perform a clean on the "UnitF_BathroomSensor_V2" project and attach the full build log again on the older version?


I'll go thru the whole process again with the first project and send you logs for comparison.


« Last Edit: Dec 6th, 2020 at 10:37am by City Slicker »  
Back to top
 
IP Logged
 
City Slicker
Junior Member
**
Offline


Posts: 26
Joined: May 16th, 2018
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #18 - Dec 5th, 2020 at 10:17am
Print Post  
See logs attached
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2167
Joined: Feb 13th, 2019
Re: ld.exe: .elf section .text1 will not fit in region iram1_0_seg
Reply #19 - Dec 7th, 2020 at 8:51pm
Print Post  
Thanks again for the detail and diagnosis with this issue.

At present there is a vMicro > Debugger > Compiler Optimization, which is set to "No Project Optimization" from the output.

If this option is set back to "Default Optimization" then the project should build as it did previously.

(The reason this has changed is due to a fix to the optimization which ensured it was applied, which did not happen when it seemed to work previously)
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint