$(PLATFORMSRC) \\r
$(BOARDSRC) \\r
$(TESTSRC) \\r
+ $(CHIBIOS)/os/hal/lib/streams/memstreams.c \\r
+ $(CHIBIOS)/os/hal/lib/streams/chprintf.c \\r
$(filter-out interface_linux.c,$(wildcard *.c))\r
\r
# C++ sources that can be compiled in ARM or THUMB mode depending on the global\r
halInit();
chSysInit();
sdStart(&SD3, NULL);
+ sdStart(&SD1, NULL);
+
+
}
void debug(char *fmt, ...)
void write_byte(uint8_t b);
/* Analog and digital pins */
+#if HAVEDIO == 1
void write_dpin(uint8_t i, bool b);
bool read_dpin(uint8_t i);
+#endif
+#if HAVEAIO == 1
void write_apin(uint8_t i, uint8_t a);
uint8_t read_apin(uint8_t i);
+#endif
/* UserLED */
+#if HAVELED == 1
void led_on(uint8_t i);
void led_off(uint8_t i);
+#endif
/* Delay and communication */
long millis(void);
break;
case BCSERIALPARSEINT: trace("SerialParseInt()");
break;
+#if HAVEAIO == 1
case BCANALOGREAD: trace("AnalogRead(%d)", program[pc]);
stack[sp++] = read_apin(program[pc++]);
break;
write_apin(program[pc++], stack[sp-1]);
sp--;
break;
+#endif
+#if HAVEDIO == 1
case BCDIGITALREAD: trace("DigitalRead(%d)", program[pc]);
stack[sp++] = read_dpin(program[pc++]);
break;
write_dpin(program[pc++], stack[sp-1]);
sp--;
break;
+#endif
+#if HAVELED == 1
case BCLEDON: trace("LedOn(%d)", program[pc]);
led_on(stack[sp-1]);
sp--;
led_off(stack[sp-1]);
sp--;
break;
+#endif
default:
trace("unrecognized");
die("Unrecognized command: %d", program[pc-1]);
/*\r
* SERIAL driver system settings.\r
*/\r
-#define STM32_SERIAL_USE_USART1 FALSE\r
+#define STM32_SERIAL_USE_USART1 TRUE\r
#define STM32_SERIAL_USE_USART2 FALSE\r
#define STM32_SERIAL_USE_USART3 TRUE\r
#define STM32_SERIAL_USE_UART4 FALSE\r