diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-12-11 15:21:03 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-12-11 15:21:03 +0100 |
commit | e502c75971ddfd03864b12225bb5387afad6e36b (patch) | |
tree | 0ea7200f48d7ce0f95650e804a16bca23867ebdf /src/arch/msp430fr5994lp/Makefile.inc | |
parent | 3d3ce8f8a1e15c5555d7fd117d91b65cc08edb0a (diff) |
msp430fR5994lp: configurable uart baud rate
Diffstat (limited to 'src/arch/msp430fr5994lp/Makefile.inc')
-rw-r--r-- | src/arch/msp430fr5994lp/Makefile.inc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/arch/msp430fr5994lp/Makefile.inc b/src/arch/msp430fr5994lp/Makefile.inc index e7c652a..9bc7cfe 100644 --- a/src/arch/msp430fr5994lp/Makefile.inc +++ b/src/arch/msp430fr5994lp/Makefile.inc @@ -9,7 +9,7 @@ MCU = msp430fr5994 DEBUG_PORT ?= ttyACM0 SERIAL_PORT ?= ttyACM1 -BAUD ?= 115200 +uart_freq ?= 115200 cpu_freq ?= 16000000 @@ -142,7 +142,13 @@ else endif ifeq (${cpu_freq}, 32768) - BAUD=9600 + uart_freq=9600 +endif + +ifneq (${uart_freq}, ) + COMMON_FLAGS += -DF_UART=${uart_freq}UL +else + COMMON_FLAGS += -DF_UART=115200UL endif @@ -195,7 +201,7 @@ arch_info: @echo "I2C Freq: ${i2c_freq} Hz" @echo "Counter Overflow: 65536/65535" @echo "sleep_ms Overflow: 250 500" - @echo "Monitor: /dev/${SERIAL_PORT} ${BAUD}" + @echo "Monitor: /dev/${SERIAL_PORT} ${uart_freq}" gdb-server: ${GDBA} /opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/msp430.dat |