MCU = atxmega256a3
F_CPU = 32000000
AVRDUDE_PROGRAMMER = avrispmkii
USE_AVR1008_EEPROM = yes
USE_INTERRUPTS = yes
USE_WATCHDOG = yes
ENTER_BLINK_COUNT = 5
ENTER_BLINK_WAIT = 600000
WATCHDOG_TIMEOUT = WDT_PER_8KCLK_gc
LED_PORT_NAME = C
LED_PIN = 0
LED_INV = 1
UART_BAUD_RATE = 230400
UART_PORT_NAME = C
UART_NUMBER = 0
UART_RX_PUEN = yes
#elif (F_CPU == 32000000L) && (UART_BAUD_RATE == 230400)
#define UART_BSEL_VALUE 123
#define UART_BSCALE_VALUE -4
#define UART_CLK2X 0
When the code modifications are done, now just need to compile. To do this move or copy xmega256a3.conf.mk up a directory and then do:
make clean
make xmega256a3.conf.mk
then to program:
make program
in protocol.h there are a bunch of single character commands that you can enter while the LED is blinking and get response. Such as 'S' which will respond with "XBoot++".
If you want to use avrdude to program the application section of flash just do the following:
avrdude -p atxmega256a3 -P /dev/tty.usbserial-FTFXXXX -c avr109 -b 230400 -U flash:w:twig_xmega256a3.bin -e
with -P being the serial port, -b the baud rate and -e indicating to erase the chip (this is very important cause I have not been able to get it to work without this option).
No comments:
Post a Comment