Tacoma, WA
Offline
Full Member
Karma: 3
Posts: 179
Arduino rocks
|
 |
« Reply #15 on: November 18, 2012, 05:47:30 pm » |
Check out this improved 1.0.2 IDE: http://arduino.cc/forum/index.php/topic,118440.0/topicseen.htmlYou'd think they'd roll those improvements into the new 1.5 IDE, but I guess not. Can lead a horse to water, can't make him drink....
|
|
|
|
|
Logged
|
Brian from Tacoma, WA Arduino evangelist - since Dec, 2010.
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4674
|
 |
« Reply #16 on: November 18, 2012, 05:51:48 pm » |
That's probably the IDE that was referred to in the post I saw, not the 1.5 IDE!
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Tacoma, WA
Offline
Full Member
Karma: 3
Posts: 179
Arduino rocks
|
 |
« Reply #17 on: November 18, 2012, 06:42:20 pm » |
Well if the improvements don't make it into the final 1.5, I'm sure those guys will apply them to 1.5 afterwards, like they did with 1.0.2..
|
|
|
|
|
Logged
|
Brian from Tacoma, WA Arduino evangelist - since Dec, 2010.
|
|
|
|
New York
Offline
Full Member
Karma: 2
Posts: 235
xronosclock.com
|
 |
« Reply #18 on: November 20, 2012, 12:19:59 pm » |
I used FreeRam function to test how much RAM is being used. Running my clock sketch it shows from 1167 to 922 available (depending which menu I'm in). However as soon as I enable Waveutil.h library it jumps down to 110 bytes. I'm not even playing audio at this point. So I don't think there's anything I can do to optimize it (I don't want to mess with WaveHC library) other than upgrade RAM 
|
|
|
|
|
Logged
|
Xronos Clock - A talking arduino based alarm clock is now available. Check out xronosclock.com for pictures, source code, schematics, and purchasing info 
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4674
|
 |
« Reply #19 on: November 20, 2012, 12:23:32 pm » |
How about posting your clock sketch?
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
New York
Offline
Full Member
Karma: 2
Posts: 235
xronosclock.com
|
 |
« Reply #20 on: November 20, 2012, 02:38:25 pm » |
How about posting your clock sketch?
Ok 
|
|
|
|
|
Logged
|
Xronos Clock - A talking arduino based alarm clock is now available. Check out xronosclock.com for pictures, source code, schematics, and purchasing info 
|
|
|
|
Dallas, TX USA
Offline
Edison Member
Karma: 25
Posts: 1617
|
 |
« Reply #21 on: November 20, 2012, 04:07:24 pm » |
Look at the nm output. You can see what is eating up your space.
The wavehc stuff appears to be commented out however a a quick looks show two 512 byte buffers in wevehc.
Another big guy is a 256 byte shadow buffer for the graphics. That is quite a bit just right there. Total BSS without wavehc is currently 0x2c8 which is 35% of your total RAM. Add in 0x400 for the wavehc buffer1 and buffer2 buffers and you up to 0x6c8 which only leaves 0x138 for everything else including stack and I'm sure there are other variables in the library as well too.
There are several variables in the main sketch that look like they are not changing and could (should) be declared const to eliminate some storage there.
The wavehc does run on m168 and will automatically drop the buffers down to 256 if on that part. There are some other limitations that come with that (bit rate etc) but you may want look in the wavehc header and see if you can get away with using the smaller buffers by patching the defines like they are on a m168.
Best thing is to run nm and objdump to start looking at where the memory is going and see if there is anything easy (like putting the wavehc in m168 mode) that can be done to save RAM.
--- bill
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 248
Posts: 16535
Available for Design & Build services
|
 |
« Reply #22 on: November 20, 2012, 04:21:50 pm » |
Duemilanove-style 1284 is not hard to make. http://www.crossroadsfencing.com/BobuinoRev17/1284_thruhole2.JPGI sell bare boards for $5 shipped to US locations, scrounge the parts you need or pick up for ~$15 at mouser. On board (MIKROE483) or off board USB/Serial (FTDI Cable or similar) supported too. PL here www.crossroadsfencing.com/BobuinoRev17/
|
|
|
|
|
Logged
|
|
|
|
|
New York
Offline
Full Member
Karma: 2
Posts: 235
xronosclock.com
|
 |
« Reply #23 on: November 20, 2012, 05:02:02 pm » |
The wavehc stuff appears to be commented out however a a quick looks show two 512 byte buffers in wevehc.
Another big guy is a 256 byte shadow buffer for the graphics. That is quite a bit just right there. Total BSS without wavehc is currently 0x2c8 which is 35% of your total RAM. Add in 0x400 for the wavehc buffer1 and buffer2 buffers and you up to 0x6c8 which only leaves 0x138 for everything else including stack and I'm sure there are other variables in the library as well too.
There are several variables in the main sketch that look like they are not changing and could (should) be declared const to eliminate some storage there.
The wavehc does run on m168 and will automatically drop the buffers down to 256 if on that part. There are some other limitations that come with that (bit rate etc) but you may want look in the wavehc header and see if you can get away with using the smaller buffers by patching the defines like they are on a m168.
Best thing is to run nm and objdump to start looking at where the memory is going and see if there is anything easy (like putting the wavehc in m168 mode) that can be done to save RAM.
--- bill
Wow thank you! I'll give it a try. I also had no idea that declaring consts instead of variables will save ram. Duemilanove-style 1284 is not hard to make. I sell bare boards for $5 shipped to US locations, scrounge the parts you need or pick up for ~$15 at mouser. On board (MIKROE483) or off board USB/Serial (FTDI Cable or similar) supported too. PL here www.crossroadsfencing.com/BobuinoRev17/That's a beauty! I think I'll order a PCB from you. Will it work with 644p? I had hard time finding 1284, they seem to be out of stock almost everywhere. I did request 644p sample from Amtel and it's on it's way.
|
|
|
|
|
Logged
|
Xronos Clock - A talking arduino based alarm clock is now available. Check out xronosclock.com for pictures, source code, schematics, and purchasing info 
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #24 on: November 20, 2012, 06:23:43 pm » |
Will it work with 644p? Yes, 1284p and 644p in DIP at least have same pin out. Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Greenville, IL
Offline
Edison Member
Karma: 11
Posts: 1289
Warning Novice on board! 0 to 1 chance of errors!
|
 |
« Reply #25 on: November 20, 2012, 07:32:17 pm » |
@Bratan
CrossRoads could probably hook you up with a chip. I have purchased several of CrossRoads PCBs and one of his Bobuinos that is loaded with features! CrossRoads does some great work!
Also, on the subject of the 1284, I am using one of CrossRoads SMT 1284 boards to make a 20MHz version for fun. Someone recently made a bootloader so, that the chip will work properly at the higher frequency. I am considering putting a socket for the crystal to sit in so that I can try other frequencies. The socket will be easy to remove later if I do not like it.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 248
Posts: 16535
Available for Design & Build services
|
 |
« Reply #26 on: November 20, 2012, 08:52:23 pm » |
Thanks cyclegadget 
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4674
|
 |
« Reply #27 on: November 21, 2012, 02:57:41 am » |
I took a look at your sketch. Which DS1307 library are you using?
As well as changing the variables that represent unchanging data (e.g. pin numbers) to const, another easy win is to replace Serial.println("text") in setup() by Serial.println(F("text")).
I was unable to find monthShortStr(), but I suspect the month strings are another candidate for moving into PROGMEM.
Table divider[12] occupies RAM but appears to be unused.
Variable tempString should be local to the function in which it is used, like timeString. Similarly for tempChar.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
vermont
Offline
Full Member
Karma: 3
Posts: 120
|
 |
« Reply #28 on: November 21, 2012, 06:57:35 am » |
Duemilanove-style 1284 is not hard to make. I sell bare boards for $5 shipped to US locations, scrounge the parts you need or pick up for ~$15 at mouser. On board (MIKROE483) or off board USB/Serial (FTDI Cable or similar) supported too.
i had a similar requirement for large ram and was given one of your m1284 boards. im very impressed with the design. do you have a link to a bootloader? also can you tell me what avrdude command line would be used to load a small test program to that with a com5 dongle?
|
|
|
|
|
Logged
|
|
|
|
|
Greenville, IL
Offline
Edison Member
Karma: 11
Posts: 1289
Warning Novice on board! 0 to 1 chance of errors!
|
 |
« Reply #29 on: November 21, 2012, 09:20:56 am » |
Here is the thread about the 20MHz bootloader for the 1284P. I have not tested it yet. http://arduino.cc/forum/index.php/topic,128604.msg968632.html#msg968632Here is the bootloader I use for boards from CrossRoads https://github.com/maniacbug/mighty-1284pBy the way, the board has to be selected as Bobuino or your pins will not match. There are other 1284 variants that have different pin mapping. The problem may apply to the first link I gave you.
|
|
|
|
|
Logged
|
|
|
|
|
|