#include "platform.h"
#include "monitor.h"
#include "builddate.h"
+
+
#if (platform == tilaunchpad)
#include <setjmp.h>
extern jmp_buf warmstart;
-
#endif
+
#define MONITOR_APP
//! Handles a monitor command.
void monitor_handle_fn(uint8_t const app,
- uint8_t const verb,
- uint32_t const len);
+ uint8_t const verb,
+ uint32_t const len);
//! Overwrite all of RAM with 0xBEEF, then reboot.
void monitor_ram_pattern();
//! Call a function by address.
int fncall(unsigned int adr)
{
+ #ifdef MSP430
int (*machfn)() = 0;
machfn = (int (*)()) adr;
return machfn();
+ #else
+ debugstr("fncall() not supported on this platform.");
+ #endif
}
#ifdef __MSPGCC__
#include <msp430.h>
-#else
-#include <signal.h>
-#include <msp430.h>
-#include <iomacros.h>
+/* #else */
+/* #include <signal.h> */
+/* #include <msp430.h> */
+/* #include <iomacros.h> */
#endif
#include "spi.h"
config := monitor avr spi jscan
endif
+ifneq (,$(findstring $(board),zigduino))
+GCC := avr-gcc
+CC := avr-gcc
+mcu ?= atmega1284p
+platform = donbfet
+CFLAGS=$(DEBUG) -Iinclude -mmcu=$(mcu) -W -Os -mcall-prologues -Wall -Wextra -Wuninitialized -fpack-struct -fshort-enums -funsigned-bitfields
+config := monitor #avr spi
+endif
+
+
ifneq (,$(findstring $(board),arduino))
GCC := avr-gcc
mcu ?= atmega168
_delay_ms(500); //takes a bit to stabilize
}
-void
-led_on()
-{
+void led_init(){
+
+}
+
+void led_on() {
PLEDOUT |= (1 << PLEDPIN);
}
-void
-led_off()
-{
+void led_off() {
PLEDOUT &= ~(1 << PLEDPIN);
}
-void
-donbfet_init()
-{
+void donbfet_init(){
uint8_t x;
/* explicitly clear interrupts */