mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-21 22:20:57 +00:00
stm32-l053r8-em9304: support ENABLE_SEGGER_RTT
This commit is contained in:
parent
f50ef7dd1f
commit
387b0525e9
@ -16,6 +16,7 @@
|
|||||||
#define ENABLE_LE_DATA_LENGTH_EXTENSION
|
#define ENABLE_LE_DATA_LENGTH_EXTENSION
|
||||||
#define ENABLE_LOG_INFO
|
#define ENABLE_LOG_INFO
|
||||||
#define ENABLE_LOG_ERROR
|
#define ENABLE_LOG_ERROR
|
||||||
|
// #define ENABLE_SEGGER_RTT
|
||||||
|
|
||||||
// BTstack configuration. buffers, sizes, ...
|
// BTstack configuration. buffers, sizes, ...
|
||||||
#define HCI_ACL_PAYLOAD_SIZE 100
|
#define HCI_ACL_PAYLOAD_SIZE 100
|
||||||
|
@ -51,6 +51,7 @@ VPATH += ${BTSTACK_ROOT}/src/classic
|
|||||||
VPATH += ${BTSTACK_ROOT}/platform/embedded
|
VPATH += ${BTSTACK_ROOT}/platform/embedded
|
||||||
VPATH += ${BTSTACK_ROOT}/example
|
VPATH += ${BTSTACK_ROOT}/example
|
||||||
VPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
|
VPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
|
||||||
|
VPATH += ${BTSTACK_ROOT}/3rd-party/segger-rtt
|
||||||
VPATH += ${BTSTACK_ROOT}/chipset/em9301
|
VPATH += ${BTSTACK_ROOT}/chipset/em9301
|
||||||
|
|
||||||
######################################
|
######################################
|
||||||
@ -109,6 +110,8 @@ Src/stm32l0xx_it.c \
|
|||||||
sm.c \
|
sm.c \
|
||||||
uECC.c \
|
uECC.c \
|
||||||
0000000_META_hci_patches_v5_iram.c \
|
0000000_META_hci_patches_v5_iram.c \
|
||||||
|
SEGGER_RTT.c \
|
||||||
|
SEGGER_RTT_Syscalls_GCC.c \
|
||||||
|
|
||||||
# ASM sources
|
# ASM sources
|
||||||
ASM_SOURCES = \
|
ASM_SOURCES = \
|
||||||
@ -178,6 +181,7 @@ C_INCLUDES += -I${BTSTACK_ROOT}/src/ble/gatt-service
|
|||||||
C_INCLUDES += -I${BTSTACK_ROOT}/src/classic
|
C_INCLUDES += -I${BTSTACK_ROOT}/src/classic
|
||||||
C_INCLUDES += -I${BTSTACK_ROOT}/src
|
C_INCLUDES += -I${BTSTACK_ROOT}/src
|
||||||
C_INCLUDES += -I${BTSTACK_ROOT}/3rd-party/micro-ecc
|
C_INCLUDES += -I${BTSTACK_ROOT}/3rd-party/micro-ecc
|
||||||
|
C_INCLUDES += -I${BTSTACK_ROOT}/3rd-party/segger-rtt
|
||||||
C_INCLUDES += -I${BTSTACK_ROOT}/platform/embedded
|
C_INCLUDES += -I${BTSTACK_ROOT}/platform/embedded
|
||||||
|
|
||||||
# compile gcc flags
|
# compile gcc flags
|
||||||
|
@ -59,11 +59,17 @@
|
|||||||
#include "hci_dump.h"
|
#include "hci_dump.h"
|
||||||
#include "btstack_debug.h"
|
#include "btstack_debug.h"
|
||||||
|
|
||||||
|
#ifdef ENABLE_SEGGER_RTT
|
||||||
|
#include "SEGGER_RTT.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// retarget printf
|
// retarget printf
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#ifndef ENABLE_SEGGER_RTT
|
||||||
|
|
||||||
int _write(int file, char *ptr, int len){
|
int _write(int file, char *ptr, int len){
|
||||||
uint8_t cr = '\r';
|
uint8_t cr = '\r';
|
||||||
if (file == STDOUT_FILENO || file == STDERR_FILENO) {
|
if (file == STDOUT_FILENO || file == STDERR_FILENO) {
|
||||||
@ -80,6 +86,8 @@ int _write(int file, char *ptr, int len){
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
int _read(int file, char * ptr, int len){
|
int _read(int file, char * ptr, int len){
|
||||||
(void)(file);
|
(void)(file);
|
||||||
(void)(ptr);
|
(void)(ptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user