Tag Archives: programming

ATmega168 documentation uses word addressing, avrdude uses byte addressing

I was programming USBaspBootloader into a metaboard with an Atmel AVR ATmega168 microcontroller. I always got this error: usb 6-2: device descriptor read/64, error -71 … usb 6-2: device not accepting address 21, error -71 1. USBaspBootloader’s Makefile specifies atmega168 and BOOTLOADER_ADDRESS=3800 by default. This is in hex addressing a byte, i.e. 0×3800. avrdude uses [...]

Common Lisp: how to split a program (project) into many files

This here is good if you move from other languages and wish to know fast.

Lousy jailed-lighttpd scripts

Now, jailed has its own automated scripts to generate its own proper fully-contained jails (as far as “jails” on GNU/Linux go, that is; they’re chroots, actually). The following scripts are leftovers from me trying to do the same, before finding out that the utilities are already there. They have been lying around for quite some [...]

Python and SWIG: local variable ‘_mod’ referenced before assignment

I was doing some stuff that requires importing C++ libraries to use in Python, and that error came up. I’m using Stackless, so I first thought that was the case. Eventually it turned out to be related to the build configuration of the program I was compiling, FIFE. The thing here is, SWIG generated a [...]

Simple script to see file sizes

#!/usr/bin/python # directory size – show it import os, sys if len(sys.argv) < 2: os.system("du -sh *") print "—–" os.system("du -sh .") else: for arg in sys.argv[1:]: cmd = "du -sh \"%s\"" % arg os.system(cmd)

Follow

Get every new post delivered to your Inbox.