Sunday, March 3, 2019

Ikea Ansluta Hacking - bang on the pipes (or...LED)

After achieving target control and reverse engineering the original firmware, the next step was to test development abilities: code, build, flash, debug.

Bang

The 'bang on the pipes' or 'flash LED'.

while(1)
{
LED(1);
DELAYLOOP(0xFFFF)
LED(0);
DELAYLOOP(0xFFFF)
}

Well, that's simple, eh? There some more code in main.c up front to setup the MPU. The Ansluta's specific definitions are all in ansluta.h.

The project is in github (later it may move beyond just flashing the LED).
https://github.com/michkrom/msp430-ansluta


The project builds from CLI on Linux (I now use Mint) but also contains VSCode workspace, intellisense and task definitions.

On VSCode

I have abandoned Geany for VSCode for several reasons (it's shiny, integrates with git, it's used everywhere, it's good at at-hoc projects).  Yes, VSCode is a bit "fatter", being an Electron app, but it still works on my old-but-good 10yr laptop w/ 2GB of RAM with Mint x64.

Next Steps

Two "targets" (pun intended): get timer to flash led, get key press to work - all with interrupts. Then,  talk to CC2500 radio.

No comments: