Use the 1.5.8 tool chain with 1.0.5 or 1.0.6 IDE?

Is it possible to use the 1.5.8 AVR tool chain with the 1.0.5/1.0.6 IDE?

I have a sketch that is too big for a 328P with Optiboot when built using 1.0.5/1.0.6 (actually bigger than 32K, so not having a bootloader either wouldn't help).
When I built it under 1.5.8, it fits nicely with around 100 bytes to spare with Optiboot.

Ideally I wouldn't run two versions side-by-side, and I can't just move to 1.5.8 since I also have Teensy++ 3.1 boards, and that is not supported for 1.5.x.

So, is it possible to replace the tool chain in the 1.0.x versions with the one supplied by 1.5.8?
I am running Windows7 x86.

(Still very impressed that uIP Ethernet stack plus web control application including serial configuration processing fits in under 32KB of code and uses ~1.5KB RAM)

Thanks in advance

It is possible to use different toochain in IDE. I am using 1.0.5 with replaced toolchain to 3.4.2 (gcc v 4.7.2, LibC v1.8.0, binutils v2.23.1) downloaded from Atmel. It is the same as AS 6.1 uses. Just the only thing which I had to keep is the original avrdude.exe. But I don't know which version of toolchain v1.5.8 uses.
Another thing is how to save some bytes in program. I'm sure that if you will go throughout the code carefully you will find out many places which can be written more efficiently.

How? I have copied over what I believed to be the relevant files and folders.
Initially I had issues with the cygwin dll, but resolved those, but I now get errors when gcc is run where it tells me something about being unable to spawn something (part of the compiler, I guess), so I suspect that the PATH isn't entirely correct.

I understand your comments about improving the code, but... with 1.5.8, when I build the code, it comes out at 32214 bytes.
With optiboot (field upgrades!) taking 512 bytes, that leaves me around 40 bytes. So it is all a bit tight.
Understandable, because I have the uIP networking, EEPROM library, the LCD library variant that supports 3 wire via a latching shift register, as well as my code - which consists of a serial and web UI, plus from RF code.
That isn't to say it can't be made a little smaller, but with 1.0.6 it is too big even without a bootloader.

For now, I guess I will have to continue along with two versions of the IDE, since the Teensy 3.1 support isn't going to be coming along any time soon.

SteveS

Sounds like you need a bigger chip - with that much program, you are likely to have SRAM problems when it actually runs.
Could look into 1284P: 128K flash, 16K SRAM.
I offer 1284P boards in several form factors, files to set up the IDE for it are here
http://forum.arduino.cc/index.php?topic=235521
and more directly here

http://www.crossroadsfencing.com/BobuinoRev17/

Robert

I considered it, but I was trying to avoid it. I have some bare 1284P chips, and have breadboarded a couple of layouts for them, but the Pro Mini board I have used for this project is not much larger than the 40-pin DIP on it's own, and has all the supporting stuff (voltage regulator, crystal, caps) on there already. So form-factor is also a consideration. Bigger boards mean larger cases :frowning:

The Bobweeny looks very interesting though, similar to what I'm using, but without power regulator, from the schematic. That wouldn't be a problem, because I'm using a regulated supply anyway.
Are these available assembled but without the 1284P? (I have quite a few of these already)
How much would shipping to the UK be for single/multiple ones?

As far as my project goes, SRAM doesn't give me an issue, but I have worked on very small systems before :slight_smile:
My global variables (and those used by the libraries) amount to 70% of RAM, so I still have at least 512 bytes working space.

I did trim out some things that were only used while I was debugging some of the network code (I do need DHCP and UDP support, so that's not an option), and was able to trim down the FLASH used to store a favicon, since my transparency mask is all zero.
It does what it's supposed to, and after the last trim, I have a little space for changes, so I won't swap just yet for this project.

However, my next project will need more FLASH space for a "richer" web UI, so it probably will be a 1248P based one. I also have some WizNet modules (WIZ820io and some W5500 based ones), which will reduce the FLASH requirements by around 7K.
It may also need more RAM, though, so the 1284P will be a better bet.

However, this doesn't move me further forward with my quest to use the same toolchain in 1.0.6 :frowning:

I know most of the effort on Arduino is going into 1.5.x, which I'm quite happy about.
Are there published guidelines for 1.0.x/1.5.x on library formats (file layouts) and tool-chains?

SteveS

Substitute this directory, arduino-1.5.8/hardware/tools/avr/, for this directory, arduino-1.0.6/hardware/tools/avr/. Tested (on Linux) and worked without any issues.

Steve,
They are available assembled but without the 1284P (we made 20 with all the surface mount parts installed). Card with no 1284P is $15.25 each.
Shipping would be $6.55 for a single card in padded envelope, guess at 2oz weight. Not insured, or tracked supposedly.
Price with online USPS.com calculator seems to increase $3 for every 2 oz after that. Can give a better price with a firm # of cards. I have 9 left.
Paypal fee added to the total of cards + shipping, works to 5% for international orders.
Thanks
Robert

With a straight copy of the avr folder, I get "Error compiling" because avr-g++ cannot find cygwin1.dll
(I'm Windows). If I copy the 1.5.8 one into the tools\avr\bin folder, I then get

avr-g++: error: spawn: No such file or directory

after some other warnings about MS-DOS style paths. I can suppress these by setting CYGWIN=nodosfilewarnings, but to no avail.

SteveS

PS: Robert - I have PM'd you. No point in continuing in the forum and boring everyone else.

Similar to the Bobweeny, if you want to build your own, is the Mighty Stick V2

http://www.firebirduino.com/mighty_stick/

Roger