Using clobber in machine descriptions

April 23rd, 2009

‘clobber’ ensures that the register is free before entering and after exiting an instruction. Therefore you can’t use it to say a register is used then destoryed by an instruction such as LOADACC, (X+) on X.

Took a while to figure this out

Extreme optimisation

April 16th, 2009

GCC is crazy.  It recognises a printf(’foo\n’) and turns it into the equivalent puts(’foo’) instead.

builtins.c has all types of similar transformations including printf(’%c’, v) to a putch(v) and printf(’%s’, v) to fputs().

Canterbury innovation incubator

April 4th, 2009

The Cii seems interesting. It needs more publicity - this is the first time I’ve heard of it in my fifteen years in Christchurch.

Adding new relocation types

March 29th, 2009

For bfd, add them to the comment block in reloc.c then run ‘make headers’. One more make after that gets it through to bfd.h

binutils / bfd target magic

March 1st, 2009

So the BFD architectures listed in bfd.h are actually defined archures.c in a big comment block at the start of the file.  This is split out and fired into the documentation, many bfd-in-xx.h files, and finally into bfd.h.

Note that a ‘make headers’ doesn’t re-build it.  I found a ‘make distclean; ./configure’ was the most brute force way.

Python on an embedded system

February 18th, 2009

I like Python.  I want to use Python everywhere.  Hmm.  Sounds more like an addiction.  The question is, is Python suitable as a glue language on a embedded Linux system?

With a few hacks Python 1.5.2 cross compiles just fine.  The speed will be acceptable so it’s really only the size that matters.

A standard build under x86 is 12.6M. From there:

  • Stripping python saves 1.1M
  • Removing man and include saves 400k
  • Removing *.py and *.pyo saves 2.8M but still lets everything run
  • Removing Tk, Config, and stdwin saves 3.9M
  • Removing test saves 1.9M

This brings a fully working Python interpreter with all of the command line libraries down to 2.4M.  Quite respectable.

Naming

February 1st, 2009

For personal reference.  What happens when you follow too strict of a naming convention:

http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html?rel=html

Hmm

November 25th, 2008

http://www.ladyada.net/make/fuzebox/index.html

and

http://www.makershed.com/ProductDetails.asp?ProductCode=MKPO1

Anthony’s

September 29th, 2008

…fish grotto on the bay in San Diego is very good.

They also do seafood.

Richard Stallman

August 15th, 2008

Saw RMS at Canterbury University today.  He has an interesting point of view, very liberal, but also a point of view that is based on old technology.

He said that sites like Google Docs are a problem as you are running a program on their machine, a program that you don’t have control over.  The solution is to install your own version on your own machine.  I wonder how you can do this and still get the advantages of hosted software, such as lower cost, lower administration, and higher availability.  I don’t want to manage any of the software I use, and one solution is to let someone else do it.

He’s not concerned about embedded systems where a processor is used instead of a dedicated circuit, such as in a microwave.  However, my microwave gains time and I’d rather have it show time in 24 hours to match the stove.  Both I could fix with the source.  Then you have car computers such as the Nissan GT-R that changes the car response if it is on a race track.  I heard a rumor of the NSX requiring you to take the car to the dealer if it goes anywhere near a known track.

Hmm.  Perhaps the embedded/mechanical equivalent is the Maker Bill of Rights from Make Magazine.