VS Arduino
>> >> Option to disable --relax
https://www.visualmicro.com/forums/YaBB.pl?num=1369633167

Message started by swordfishBob on May 27th, 2013 at 5:39am

Title: Option to disable --relax
Post by swordfishBob on May 27th, 2013 at 5:39am
I'm having some problems that appear to relate to a linker bug involving --relax.  Can we have an option to disable use of --relax, or is there another way to do this?

Title: Re: Option to disable --relax
Post by Visual Micro on May 27th, 2013 at 4:26pm
I have just altered vm so the next release (week or so) will allow a board property of:-

[code]build.linker_relaxation=false[/code]

in the current build for arduino versions below 1.5 the relax is forced on for the 2560 chip or if build.linker_relaxation=true

so that doesn't help you right now, but you can try build 1305.21 from our beta channel along with arduino 1.5.2

I notice in 1.5.2 the relax option is not hard coded, it is set using the boards.txt and platforms.txt in the ide/hardware/arduino/... folder

1.5x is beta but I think it works okay for avr chips so you could give it a try and create your own custom board def. do you know how to do that?







Title: Re: Option to disable --relax
Post by swordfishBob on May 27th, 2013 at 9:44pm
Thanks for the advice, I can have a go. I'll be tied up for a few days and temporarily get around the problem by containing the total size of my code and progmem strings.

Title: Re: Option to disable --relax
Post by swordfishBob on Jun 7th, 2013 at 4:52am
Attempting.. I have 13.05.21 and Arduino 1.5.2
The VM/VS environment can't find the libraries (e.g. <Ethernet.h>). How do I resolve this?

Title: Re: Option to disable --relax
Post by Visual Micro on Jun 7th, 2013 at 11:21am
Yes the hardware libs will be supported in the next release of Visual Micro

For now you can move the subfolder in "[arduino-1.5.2]\hardware\arduino\avr\libraries" to "[arduino-1.5.2]\libraries"

Title: Re: Option to disable --relax
Post by swordfishBob on Jun 7th, 2013 at 9:56pm
Thanks.
I got it compiling with 1.5.2, without removing the relax flag, hopefully it means the bug in pointer relaxation (in the linker) has actually been fixed.
To compile, I had to edit the various .cpp's in the Ethernet lib so they would find w5100.h and socket.h as utility/w5100.h and utility/socket.h; or I probably could have copied socket and w5100 back a level into libraries/Ethernet. I guess you've encountered that..?

Title: Re: Option to disable --relax
Post by Visual Micro on Jun 8th, 2013 at 5:29pm
I think you can just grab the libs from an earlier arduino version such as 1.0.4

There will be a new Visual Micro version shortly.

Thanks

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.