Home Recent changes

Week 8

I have used following IDEs:

I decided to try:

First I downloaded Maple-IDE. For uploading the bootloader I used stm32flash utility (link) which is available at least for Linux.

The next IDE I tried was Energia. Since I have a LaunchPad board by TI it was quite interesting to run Arduino on it. All I made was simple blink test which is a hello - world for all Arduinos. Running Energia wasn't clean on 64 bits. Here is the link helped me: https://github.com/energia/Energia/issues/166 Also it must be run as root with the following command:

Patching Arduino IDE with core for support for ATTiny series was really simple, thanks to this MIT tutorial: Programming an ATtiny w/ Arduino 1.0. Using this I wrote firmware for this board:

tiny45_relay.png

And the most complicated was plain C programming. I used Kate editor, Yakuake terminal, Make and AVR-GCC compiler. Yakuake was needed as a plugin for Kate, to have console inside the "IDE". Here is the code I wrote (just blinks an LED):

#include <avr/io.h>

#define LED PD6

#define digitalWriteLOW(port,pin) port &= ~(1<<pin) #define digitalWriteHIGH(port,pin) port |= (1<<pin) #define pinModeOUTPUT(portdir,pin) portdir |= (1<<pin)

void delay_ms(uint8_t ms) {

	uint16_t delay_count = F_CPU / 17500;
	volatile uint16_t i;
	while (ms != 0)
	{
		for (i=0; i != delay_count; i++);
		ms--;
	}

}

int main(void) {

	pinModeOUTPUT(DDRD, LED);
	while (1) {
		digitalWriteHIGH(PORTD, LED);
		delay_ms(1000);
		digitalWriteLOW(PORTD, LED);
		delay_ms(1000);
	}

}

To upload it I used Arduino bootloader made for ATMega328P and FTDI cable. Bootloader was uploaded using FabISP programmer and AVRDUDE.

Here how this all looks (using Arduino for t45 was tested on my windows machine):

bunchof_ides.png