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 Send TopicPrint
Hot Topic (More than 8 Replies) Fix: Vm Version Was 2 Years Old - core.a(HardwareSerial.cpp.o)* : out of range error (Read 13770 times)
Pedro Ferrer
Junior Member
**
Offline


Posts: 13
Location: Portugal
Joined: Jul 20th, 2010
Fix: Vm Version Was 2 Years Old - core.a(HardwareSerial.cpp.o)* : out of range error
Oct 26th, 2012 at 7:38pm
Print Post  
Hello

During the day, I've converted my project from Arduino 0023 to Arduino 1.0.1. because, even use Arduino Mega 2560 board I had an error 'out of range error'.
After update to Arduino 1.0.1 this problem it was solved on Arduino IDE.
It happens that even after installed the latest Visual Micro, on VS2008 I still have the old errors:

Code
Select All
Compiling 'Codino1' for 'Arduino Mega 2560 or Mega ADK'
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(main.cpp.o)* : In function `main'
main.cpp : out of range error
main.cpp : out of range error
Binary sketch size: 140084 bytes (of a 258048 byte maximum) (5,4288095 secs)
Uploading to I/O board using 'COM3'
The port 'COM3' does not exist.
 



Please let me know how is possible to fix it
Thanks on advance
Pedro Ferrer
« Last Edit: Oct 31st, 2012 at 3:33pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #1 - Oct 26th, 2012 at 7:58pm
Print Post  
Did you change the #include<WProgram.h> to #include<Arduino.h> in your sketch? Also if you use older libraries, you have to fix them as well.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #2 - Oct 26th, 2012 at 8:09pm
Print Post  
Hello, please click "Build>Clean Solution" menu item and tell me if that fixes the problem

Thanks
  
Back to top
WWW  
IP Logged
 
Pedro Ferrer
Junior Member
**
Offline


Posts: 13
Location: Portugal
Joined: Jul 20th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #3 - Oct 26th, 2012 at 8:26pm
Print Post  
Hello

Marius wrote on Oct 26th, 2012 at 7:58pm:
Did you change the #include<WProgram.h> to #include<Arduino.h> in your sketch? Also if you use older libraries, you have to fix them as well. 


Yes, beside that, the Arduino IDE accept without any error...

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

Tim@Visual Micro wrote on Oct 26th, 2012 at 8:09pm:
Hello, please click "Build>Clean Solution" menu item and tell me if that fixes the problem


Also tried, but problem remains
Please let me know

Thanks on advance
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #4 - Oct 26th, 2012 at 9:00pm
Print Post  
Please delete the VMicro temp build folder manually to see if that fixes it. The temp builder folder is "C:\Users\[yourName]\AppData\Local\VMicro"

If that doesn't fix the problem please confirm that when you installed the new arduino ide you altered your "Tools>Visual Micro>Options>Arduino>Arduino Application" to the location of your arduino 1.0.1 exe.
« Last Edit: Oct 26th, 2012 at 9:01pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Pedro Ferrer
Junior Member
**
Offline


Posts: 13
Location: Portugal
Joined: Jul 20th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #5 - Oct 26th, 2012 at 9:43pm
Print Post  
Hello

Tim@Visual Micro wrote on Oct 26th, 2012 at 9:00pm:
Please delete the VMicro temp build folder manually to see if that fixes it. The temp builder folder is "C:\Users\[yourName]\AppData\Local\VMicro"


Erased!

Tim@Visual Micro wrote on Oct 26th, 2012 at 9:00pm:

If that doesn't fix the problem please confirm that when you installed the new arduino ide you altered your "Tools>Visual Micro>Options>Arduino>Arduino Application" to the location of your arduino 1.0.1 exe. 


The folder is the same of the old one.
C:\arduino\arduinoIDE

Code
Select All
C:\arduino\arduinoIDE\hardware\tools\avr\bin\avr-gcc -Os -Wl,--gc-sections -mmcu=atmega2560 -o "C:\Users\Pedro Ferrer\AppData\Local\VMicro\Arduino\Builds\Codino1\mega2560\Codino1.elf" "C:\Users\Pedro Ferrer\AppData\Local\VMicro\Arduino\Builds\Codino1\mega2560\Codino1.cpp.o" "C:\Users\Pedro  "C:\Users\Pedro Ferrer\AppData\Local\VMicro\Arduino\Builds\Codino1\mega2560\Wire\Wire.cpp.o" "C:\Users\Pedro " "C:\Users\Pedro Ferrer\AppData\Local\VMicro\Arduino\Builds\Codino1\mega2560\core.a" -L"C:\Users\Pedro Ferrer\AppData\Local\VMicro\Arduino\Builds\Codino1\mega2560" -lm
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(main.cpp.o)* : In function `main'
main.cpp : out of range error
main.cpp : out of range error
C:\arduino\arduinoIDE\hardware\tools\avr\bin\avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\Users\Pedro Ferrer\AppData\Local\VMicro\Arduino\Builds\Codino1\mega2560\Codino1.elf" "C:\Users\Pedro Ferrer\AppData\Local\VMicro\Arduino\Builds\Codino1\mega2560\Codino1.eep"
C:\arduino\arduinoIDE\hardware\tools\avr\bin\avr-objcopy -O ihex -R .eeprom "C:\Users\Pedro Ferrer\AppData\Local\VMicro\Arduino\Builds\Codino1\mega2560\Codino1.elf" "C:\Users\Pedro Ferrer\AppData\Local\VMicro\Arduino\Builds\Codino1\mega2560\Codino1.hex"
Binary sketch size: 140202 bytes (of a 258048 byte maximum) (9,6584163 secs)
Uploading to I/O board using 'arduinoisp'
avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\arduino\arduinoIDE\hardware\tools\avr\etc\avrdude.conf"

         Using Port                    : \\.\COM3
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
 



Please let me know




« Last Edit: Oct 31st, 2012 at 3:31pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Pedro Ferrer
Junior Member
**
Offline


Posts: 13
Location: Portugal
Joined: Jul 20th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #6 - Oct 26th, 2012 at 11:25pm
Print Post  
My AddIn (Visual.Micro.Visual.Studio.Arduino.2008.AddIn) it's located on "C:\Users\Pedro Ferrer\AppData\Local\Microsoft\VisualStudio\9.0" like as before
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #7 - Oct 26th, 2012 at 11:26pm
Print Post  
This error is a problem in older versions of arduino that were unable to support program sizes > 128kb. Your program is 140,000 bytes so is blowing the limit.

It sounds like you still have arduino 0023 in the C:\arduino\arduinoIDE folder. Please update to arduino 1.0.1

To prove this please open "C:\arduino\arduinoIDE\lib\version.txt" with notepad and tell me what you see in it.

Thanks
« Last Edit: Oct 26th, 2012 at 11:27pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #8 - Oct 26th, 2012 at 11:31pm
Print Post  
Quote:
My AddIn (Visual.Micro.Visual.Studio.Arduino.2008.AddIn) it's located on "C:\Users\Pedro Ferrer\AppData\Local\Microsoft\VisualStudio\9.0" like as before


The .addin file has not been located there for a long time (2 years). Please delete that .addin and then open Tools>Options>Visual Micro>Version to see what version of the addin you have installed.

The current system installs the .addin files into the "c:\program files\visual micro\visual micro for arduino" and then points to the path in "Tools>Options>Enviroment>Addin/Macro Security>Locations". The installer does all of this automatically so removing the old .addins from VisualStudio\9.0 will remove some confusion.
  
Back to top
WWW  
IP Logged
 
Pedro Ferrer
Junior Member
**
Offline


Posts: 13
Location: Portugal
Joined: Jul 20th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #9 - Oct 29th, 2012 at 8:27am
Print Post  
Hello

Quote:

The current system installs the .addin files...


"c:\program files\visual micro\visual micro for arduino"

Checked! It's true

Quote:

see what version of the addin you have installed


AppVersion:        25
Assembly Location: C:\Program Files\Visual Micro\Visual Micro for Arduino\Visual.Micro.Visual.Studio.Arduino.08.dll

(...)

My problem remains

On Arduino IDE 1.0.1 my sketch runs sucessfully.

Quote:

Done compiling
Binary sketch size: 139.812 bytes (of a 258.048 byte maximum)



While on VS2008 with last version of Visual Micro I have:

Quote:

Compiling 'Codino1' for 'Arduino Mega 2560 or Mega ADK'
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(HardwareSerial.cpp.o)* : out of range error
core.a(main.cpp.o)* : In function `main'
main.cpp : out of range error
main.cpp : out of range error
Binary sketch size: 140692 bytes (of a 258048 byte maximum) (5,7063264 secs)
Uploading to I/O board using 'arduinoisp'
avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\arduino\arduinoIDE\hardware\tools\avr\etc\avrdude.conf"

         Using Port                    : \\.\COM3
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: ser_open(): can't open device "\\.\COM3": O sistema não conseguiu localizar o ficheiro especificado.



avrdude done.  Thank you.


My programmer is
Tools -> Arduino -> Programmers -> Arduino as ISP

Please let me know
« Last Edit: Oct 29th, 2012 at 8:43am by Pedro Ferrer »  
Back to top
 
IP Logged
 
Pedro Ferrer
Junior Member
**
Offline


Posts: 13
Location: Portugal
Joined: Jul 20th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #10 - Oct 29th, 2012 at 1:08pm
Print Post  
Hello

What can I do more to find the solution?

Thanks on advance
Pedro Ferrer
  
Back to top
 
IP Logged
 
Pedro Ferrer
Junior Member
**
Offline


Posts: 13
Location: Portugal
Joined: Jul 20th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #11 - Oct 29th, 2012 at 2:14pm
Print Post  
#SOLVED#

Using ArduinoForVisualStudio.msi, I've removed and installed it again. Nothing else.
Now it works!!!

Now my...

Quote:

Assembly location: C:\Program Files\Visual Micro\Visual Micro for Arduino\Visual.Micro.Visual.Studio.Arduino.08.dll
Version: 1.1210.24.1


But now each time I start VS2008, when I build for the 1st time, shows me the following:

Quote:

Compiling 'Codino1' for 'Arduino Mega 2560 or Mega ADK'
Couldn't determine program size:    text         data          bss          dec          hex      filename


What can I do to fix it?

Thanks on advance
Pedro Ferrer
  
Back to top
 
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #12 - Oct 29th, 2012 at 2:43pm
Print Post  
I get this error as well from time to time. I would seem to get sorted out if you do a Build Clean and the rebuild the solution.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #13 - Oct 29th, 2012 at 7:21pm
Print Post  
@Pedro, good that the version is correct now. You were using a very old version of Visual Micro which was released prior to Arduino 1.0

@Both

Quote:
Compiling 'Codino1' for 'Arduino Mega 2560 or Mega ADK'
Couldn't determine program size:    text         data          bss          dec          hex      filename


1)
I will look into this. It sounds like it is hitting a non-arduino error due to the compiler cache but not showing the error. 

So when it comes to check the size of the resulting arduino program it fails because the program was never created.

2)
The arduino getProgramSize() function has also changed recently with a speed improvement that appears to have caused the error message to become unclear!

Test Please

Please switch on "Tools>Options>Visual Micro>Compile>Verbose" and try to cause the error to repeat. this might provide some helpful information.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: core.a(HardwareSerial.cpp.o)* : out of range error
Reply #14 - Oct 31st, 2012 at 9:21pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint