Show Posts
Pages: 1 ... 22 23 [24] 25 26 ... 41
346  Development / Suggestions for the Arduino Project / Re: Compile Speed - testing & feedback needed! on: June 04, 2012, 07:01:42 am
When you compile, all the  generated files are placed in a temporary directory.  With the verbose info, you can see the full pathname.  If you look in that directory, are there .o and .d files for each source?  Are the timestamps ok?

Could you please post one of the .d files, perhaps wiring_digital.d ?
347  Development / Suggestions for the Arduino Project / Re: Compile Speed - testing & feedback needed! on: June 03, 2012, 02:40:17 pm
This feature works by comparing timestamps on the files.

Maybe the files in your arduino directory have timestamps in the future?  Perhaps if you extracted the zip file, then set your clock back?  For example, take a look at the file:

C:\Program Files\arduino-1.0.1\hardware\arduino\cores\arduino\wiring.c

If it's timestamp is in the future, then it will still be considered newer than the .o file.

The easiest solution might be to extract a fresh copy of Arduino 1.0.1.
348  Development / Suggestions for the Arduino Project / Re: Compile Speed - testing & feedback needed! on: June 03, 2012, 01:20:13 pm
It's always enabled.

I used .build.dependency=true in Teensyduino's pre-1.0 patch, so it wouldn't change Arduino's behavior without explicitly being enabled.  Arduino 1.0.1 does not have that option, so it's always enabled.  There is no option to disable it.  But if you select another board from Tools > Boards, even temporarily, the next Verify or Upload will recompile everything.  So if you want to compare the speed, just change the board and then set it back, to do a test where all files are recompiled.

If File > Preferences you can activate verbose messages while compiling.  Those messages should indicate if the compiler is being run, or the already-compiled file is being reused.
349  Development / Suggestions for the Arduino Project / Re: arduino and rasberry pi on: May 14, 2012, 05:44:31 pm
Indeed, so sad, but true. ( 20+ years is exaggerated IMHO)

Exaggerated?  Really?

The Intel 80286 was introduced in 1982, slightly over 30 years ago.  Of course, the '286 didn't really become affordable (and widespread) until about 1988.  Likewise, the '386 was introduced in 1985, but really started to sell well by around 1990, and the '486 was introduced in 1989, and certainly by 1992 was displacing many '386 machines.

Windows 3.0, the first Windows version to become widely used, was released in 1990 and gained popularity around 1991.  Version 3.1 was released in 1992.

Even through DOS programs had been growing in capability (and bloat) for many years, as had Macintosh software since the mid-80s, certainly the transition from Windows 3.0 to 3.1 and mainstream PCs hardware from 16-bit '286 to 32-bit 386 and 486 chips could be considered the time when software bloat really began increasing dramatically.

That was 1992, exactly 20 years ago!
350  Development / Suggestions for the Arduino Project / Re: Arduino 1.0 IDE Compatibility with previous versions on: May 14, 2012, 04:24:40 am
I actually tried ArdOSC recently.  It works fine on Arduino 1.0.

On Linux, there are many compile errors, but I spent a few minutes investigating.  They are all due to sloppy use of capitalization in the filenames, particularly "OSCCommon" vs "OSCcommon" (the same mistake duplicated many times throughout the many files).  Clearly it's only ever been tested on Mac and Windows.  That's not any fault of Arduino 1.0.
351  Development / Other Software Development / Re: SoftwareSerial affects Time on: May 13, 2012, 07:25:07 pm
They add up.....
352  Development / Suggestions for the Arduino Project / Re: arduino and rasberry pi on: May 13, 2012, 06:52:16 pm
Here is a project to implement an Arduino IDE in Python.

http://freecode.com/projects/gnoduino

I've heard talk about a not-yet-mature project to do the same in C++ using wxWidgets.  I can't find a link.

But speaking of C++ and wxWidgets, here's info about using Arduino on Code::Blocks.

http://www.johnhenryshammer.com/WOW2/pagesHowTo/atmelPage.php#index

Here's info about using Qt Creator:

http://www.meegoexperts.com/2011/09/qtcreator-arduino-development/

Late last year, at or shortly after Maker Faire in September, the Arduino Team showed a screenshot of an experiment to use Arduino with QT Designer, or maybe it was QT creator?  I've not seen anything on that since then.

So far, I've not heard from many people actually using these.  How useful they really are is a good question.

The 2 alternate IDE projects I have heard people actually using are based on Eclipse and Microsoft's Visual Studio.  Obviously VS is closed source and Windows-only.  Eclipse is still java based, and even far more resource intensive than Arduino!

The sad truth is the most usable and most widely used versions are suitable only for modern PCs with at least a gigabyte of RAM and fast processors.

How well any of this will work on a Raspberry Pi, even the Python version, is a very good question.

The RPi, I've recently learned, it ARMv6 instruction set, not the more modern (and more widely supported) ARMv7.  The proprietary GPU is expected to perform quite well, but the ARM processor is very slow.

For example, from this article:

http://www.pcpro.co.uk/reviews/desktops/374290/raspberry-pi-model-b

Quote
The CPU meter in the corner of the Debian screen is frequently maxed out for even the most conservative of applications, such as multitabbed web browsing. CPU-intensive applications are almost off limits: the GIMP art package took 1min 27secs just to load.  In the SysBench CPU benchmark, the Model B took 107ms to complete one calculation of the purely synthetic prime number test; a mid-range desktop Core 2 Duo E8400 took only 0.85ms.

The sad truth is modern software development trades inefficient runtime for ease-of-programming.  That trend has been with us for 20+ years as desktop computers have increased in performance.  I really don't think the Raspberry Pi is going to reverse that trend.

When all the hype fades, much like OLPC, I believe RPi will find some nice uses... particularly for streaming HD video, and probably some projects were Arduino boards find uses today, but RPi's tremendously underpowered processor and limited memory are very likely to be a terrible disappointment for anyone hoping to run conventional desktop software.
353  Development / Other Software Development / Re: SoftwareSerial affects Time on: May 12, 2012, 06:45:01 am
You could use my AltSoftSerial library.  It's designed to minimize interrupt latency, so it plays nicely with other interrupt-based functions.

http://www.pjrc.com/teensy/td_libs_AltSoftSerial.html

Sadly, very few people know about AltSoftSerial.  If it solves your problems, please help spread the word.....
354  Development / Other Software Development / Re: Wire library enables internal pull-ups -> bad for 3.3V I2C devices. on: May 11, 2012, 12:53:59 pm
I edited the playground page, to add a "Outside specs, (usually) works anyway" section.

Language like "level shifting to be able to use 3.3V I2C components" implies that level shifting is required.  It certainly is required to meet all the specifications, but it is not usually necessary to simply get a chip to work.

Many Arduino users are very casual hobbyists.  Vast numbers of them have indeed connected I2C parts directly with success.  Advising them of the official specs is great.  I just don't like directing novices to add extra (error-prone) complexity without mentioning a direct non-compliant connection usually works just fine.
355  Development / Other Software Development / Re: Wire library enables internal pull-ups -> bad for 3.3V I2C devices. on: May 11, 2012, 04:23:42 am
So far, no one knows about a chip that got damaged.

How about any confirmed case where a chip merely didn't work properly (but no actual damage to the chip once connected properly), or even a confirmed case where a chip worked but with reduced performance or some other undesirable effect?

Really, if this is such a big deal, one which merits a page with such strong warnings and which proposes numerous "solutions", where is the actual problem?
356  Development / Other Software Development / Re: Wire library enables internal pull-ups -> bad for 3.3V I2C devices. on: May 10, 2012, 12:12:21 pm
Are there any 3V I2C chips that are actually confirmed to be unable to handle this very tiny current through their ESD protection diodes?

I'm not asking for what the datasheets specs say.  I'm not asking for a theoretical argument.  I want to know if ANYONE has even one confirmed case where this causes actual problems.
357  Using Arduino / Networking, Protocols, and Devices / Re: Mega Baud rate Error on: May 08, 2012, 08:06:11 pm
The bug might be in the RXTX library?

Some serial drivers also don't support 14400 and 28800, particularly the cdc_acm driver on Linux.

Glad you're enjoying the compile speedup.  smiley  I also recently fixed the bugs in error reporting to multi-tab projects, but it looks it might have been too late to make the 1.0.1 release....
358  Development / Other Software Development / Re: New Library for Arduino on: May 07, 2012, 07:12:25 am
When performing a "read-modify-write" operation, you really must be cautious to make it an atomic operation if the same register might ever be manipulated within an interrupt context.  Failing to do so leads to infrequent but extremely difficult to diagnose problems.  For example:

http://code.google.com/p/arduino/issues/detail?id=146
http://forums.adafruit.com/viewtopic.php?f=31&t=7594

I looked briefly at your pin.cpp.  My first impression is it also has issue 146.


On the library design as a whole, I have 3 general comments.  This may sound a bit harsh, but hopefully it helps...

First, passing register addresses as parameters to the constructors is going to lead to inefficient code.  It might even end up even slower than Arduino's functions?  You should really consider using templates, especially if your API is already exposing C++ syntax.  Oleg's USB Host Shield library has a hardware abstraction layer that would be one good example.  It's possible, with proper use of templates, to get the compiler to optimize the pin usage instances to single instructions (which are automatically atomic operations), and similarly impressive gains could be made with the timers and other peripherals.

Second, passing numerous related registers to a constructor seems unnecessarily complex.  You may feel it's hardware agnostic to do so, but it's not.  Even the register set is absolutely AVR-8 specific, not to mention the implementation within the class.  Even 8-bit AVR XMEGA has a different (larger) set of registers, as does 32 bit AVR.  By publishing an API consisting of hardware specific registers tied to exactly one platform, you'll never be (easily) portable to any other hardware platform.  It's also error-prone to require more parameters than necessary, especially multiple consecutive parameters of the same type (at least if the types differ, getting them mixed up results in a compile error instead of wrong runtime behavior).

Third, why go to so much trouble to build classes around hardware access, but tie the API so closely to exactly one architecture?  Especially if your implementation doesn't strive for good performance, why would anyone want to use it?  What's the advantage?

If your goal is a clean API,  I think you'd do much better to get a ChipKit or Maple board and think carefully about how your API can work across dramatically different hardware.

If your goal is performance, at the very least look at Oleg's code and as you develop yours, use avr-objdump to view a disassembly of the generated assembly to make sure the compiler really is optimizing at compile time.

If you're really good, you might try for both some degree of cross platform support (or at least an API capable of it) and good performance.  But that's very hard.....

359  Development / Suggestions for the Arduino Project / Re: Arduino 1.0 string changes require changes to examples on: May 07, 2012, 06:17:55 am
I'm the guy who rewrote String, to fix the many bugs it had in 0019 to 0023.  I make the Teensy boards.  When I put String into Teensyduino, people were having all sorts of problems.  It was incredibly buggy.  I put a LOT of work into fixing the many problems, and carefully analyzing and optimizing memory allocation patterns.

The String I contributed had trim(), toUpperCase() and toLowerCase() return a reference to the original string, so these very common usage cases would be backwards compatible.  In fact, the version of String currently in Teensyduino still has these, so the examples work properly on Teensy boards.  smiley

Sadly, many changes were made to my code.  Much of the careful work I did, especially on optimizing memory allocation, just doesn't apply on Arduino's version.  Many usages of String that should work simply do not on Arduino's version.  Some even crash.  There's nothing I can do now about Arduino.  I tried very hard to make String work as well as possible (and it does on Teensy), and I tried to share that with all Arduino users.  I really wish it had turned out better.
360  Development / Other Software Development / Re: Arduino Library downloader on: May 05, 2012, 01:37:37 pm
I've added an image tag in my XML, for the libraries where I have a photo of the hardware or screenshot of the library example actually running.  The intention is to allow Ardulibrary or any other library browsing tool to give the user nice visual impressions of the libraries, especially what hardware they actually use, which often can't be communicated well in short descriptions.

Here's the XML again:

http://www.pjrc.com/teensy/td_libs.xml

I've pretty much just made up a few tags... feedback is most welcome.  If you need me to adapt my XML for Adulibrary, just let me know what you need and I'll try to incorporate it.  Or if anyone else wants to use the XML and needs the format altered, just let me know and I'll do what I can.
Pages: 1 ... 22 23 [24] 25 26 ... 41