The current software project doth progress... a couple of days ago I got "Hello, world!" working, and now the lights on the eval board are going blinky-blinky!
That's less trivial than it sounds, really. "Hello, world!" is of course a trivial program under UN*X, but I'm programming on the bare metal here, and not using cheap workarounds like having putchar() just do polled I/O on the console port. It's testing not only my printf() implementation (originally written for a 16-bit mini, then adapted to RISC targets using varargs, and now modified for an arbitrary target using stdarg), but also the I/O subsystem and the UART driver.
The current blinky function is exercising the system timer, the event notification subsystem, and task synchronization: there's a task waiting on a semaphore and then updating the lights, and a registered system-timer handler to poke the semaphore every 4 milliseconds.
(Helpful hint: a timer-event mask of 0x0FFFFFFC and match value of 0 gets the first four 1-millisecond timer ticks, and then a 268.4 kilosecond delay. A mask of 0x00000003 gets a tick every four milliseconds, which is more likely to be useful.)
Anyway: system timer, UART, and GPIO are working. Project for today: get I2C master support working (this means switching over to the business-card beetleweight battlebot brain board, which has an I2C EEPROM to talk to), and probably also basic SPI master support (that should be a trivial driver). Then worry about cooked-mode TTY support, and, after that, a little monitor (which can run as an independent task).
Oh, yes: and the embedded operating system (the part of the software project that I've been working on so far) has acquired a name! Every OS needs a name, right? Something cute? Well, since this one nominally ties in with my "Army of Giant Robots" project, it's now officially AGROS. (And, yes, there seems to have been a giant non-robot named Agros once upon a time. And AGROS could, in principle, be put to use in farm equipment... but then you'd need a protocol droid to talk to your moisture evaporators, wouldn't you?) While it was originally meant for the beetlebot board, the first actual use will be in a client project for a vaguely military application. The beetlebot board probably comes second, followed by some manner of modular test equipment.
Recent Comments