Set console baud to 1 MHz
This commit is contained in:
@ -1,9 +1,11 @@
|
|||||||
EC=atmega2560
|
EC=atmega2560
|
||||||
|
|
||||||
PORT=$(wildcard /dev/ttyACM*)
|
PORT=$(wildcard /dev/ttyACM*)
|
||||||
|
CONSOLE_BAUD=1000000
|
||||||
|
CFLAGS+=-D__CONSOLE_BAUD__=$(CONSOLE_BAUD)
|
||||||
|
|
||||||
console:
|
console:
|
||||||
sudo tio -b 9600 $(PORT)
|
sudo tio -b $(CONSOLE_BAUD) $(PORT)
|
||||||
|
|
||||||
flash: $(BUILD)/ec.ihx
|
flash: $(BUILD)/ec.ihx
|
||||||
sudo avrdude -v -v -p $(EC) -c wiring -P $(PORT) -b 115200 -D -U flash:w:$<:i
|
sudo avrdude -v -v -p $(EC) -c wiring -P $(PORT) -b 115200 -D -U flash:w:$<:i
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <arch/uart.h>
|
#include <arch/uart.h>
|
||||||
|
|
||||||
void init(void) {
|
void init(void) {
|
||||||
uart_stdio_init(0, 9600);
|
uart_stdio_init(0, __CONSOLE_BAUD__);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Gpio LED = GPIO(B, 7);
|
struct Gpio LED = GPIO(B, 7);
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
EC=atmega32u4
|
EC=atmega32u4
|
||||||
|
|
||||||
PORT=$(wildcard /dev/ttyACM*)
|
PORT=$(wildcard /dev/ttyACM*)
|
||||||
|
CONSOLE_BAUD=1000000
|
||||||
|
CFLAGS+=-D__CONSOLE_BAUD__=$(CONSOLE_BAUD)
|
||||||
|
|
||||||
console:
|
console:
|
||||||
sudo tio -b 9600 $(PORT)
|
sudo tio -b $(CONSOLE_BAUD) $(PORT)
|
||||||
|
|
||||||
flash: $(BUILD)/ec.ihx
|
flash: $(BUILD)/ec.ihx
|
||||||
sudo avrdude -v -v -p $(EC) -c avr109 -P $(PORT) -b 115200 -D -U flash:w:$<:i
|
sudo avrdude -v -v -p $(EC) -c avr109 -P $(PORT) -b 115200 -D -U flash:w:$<:i
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <arch/uart.h>
|
#include <arch/uart.h>
|
||||||
|
|
||||||
void init(void) {
|
void init(void) {
|
||||||
uart_stdio_init(0, 9600);
|
uart_stdio_init(0, __CONSOLE_BAUD__);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Gpio LED = GPIO(C, 7);
|
struct Gpio LED = GPIO(C, 7);
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
EC=atmega328p
|
EC=atmega328p
|
||||||
|
|
||||||
PORT=$(wildcard /dev/ttyACM*)
|
PORT=$(wildcard /dev/ttyACM*)
|
||||||
|
CONSOLE_BAUD=1000000
|
||||||
|
CFLAGS+=-D__CONSOLE_BAUD__=$(CONSOLE_BAUD)
|
||||||
|
|
||||||
console:
|
console:
|
||||||
sudo tio -b 9600 $(PORT)
|
sudo tio -b $(CONSOLE_BAUD) $(PORT)
|
||||||
|
|
||||||
flash: $(BUILD)/ec.ihx
|
flash: $(BUILD)/ec.ihx
|
||||||
sudo avrdude -v -v -p $(EC) -c arduino -P $(PORT) -b 115200 -D -U flash:w:$<:i
|
sudo avrdude -v -v -p $(EC) -c arduino -P $(PORT) -b 115200 -D -U flash:w:$<:i
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <arch/uart.h>
|
#include <arch/uart.h>
|
||||||
|
|
||||||
void init(void) {
|
void init(void) {
|
||||||
uart_stdio_init(0, 9600);
|
uart_stdio_init(0, __CONSOLE_BAUD__);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Gpio LED = GPIO(B, 5);
|
struct Gpio LED = GPIO(B, 5);
|
||||||
|
0
src/common/common.mk
Normal file
0
src/common/common.mk
Normal file
7
src/common/include/common/macro.h
Normal file
7
src/common/include/common/macro.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#ifndef _COMMON_MACRO_H
|
||||||
|
#define _COMMON_MACRO_H
|
||||||
|
|
||||||
|
#define xstr(s) str(s)
|
||||||
|
#define str(s) #s
|
||||||
|
|
||||||
|
#endif // _COMMON_MACRO_H
|
Reference in New Issue
Block a user