From 925e46da8ca645587febe7c1e15f49eeb82380cd Mon Sep 17 00:00:00 2001 From: geeksville Date: Thu, 21 May 2020 21:17:53 -0700 Subject: [PATCH] make serial console work on nrf52 --- docs/software/nrf52-TODO.md | 4 +++- src/configuration.h | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/software/nrf52-TODO.md b/docs/software/nrf52-TODO.md index 01fbefeb1..67c489fce 100644 --- a/docs/software/nrf52-TODO.md +++ b/docs/software/nrf52-TODO.md @@ -17,13 +17,13 @@ Minimum items needed to make sure hardware is good. Needed to be fully functional at least at the same level of the ESP32 boards. At this point users would probably want them. +- DONE get serial API working - get full BLE api working - make a file system implementation (preferably one that can see the files the bootloader also sees) - use https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_fds_usage.html?cp=7_5_0_3_55_3 - make power management/sleep work properly - make a settimeofday implementation - DONE increase preamble length? - will break other clients? so all devices must update - DONE enable BLE DFU somehow -- set appversion/hwversion - report appversion/hwversion in BLE - use new LCD driver from screen.cpp. Still need to hook it to a subclass of (poorly named) OLEDDisplay, and override display() to stream bytes out to the screen. - we need to enable the external xtal for the sx1262 (on dio3) @@ -84,6 +84,8 @@ Nice ideas worth considering someday... - Currently using Nordic PCA10059 Dongle hardware - https://community.platformio.org/t/same-bootloader-same-softdevice-different-board-different-pins/11411/9 +- To make Segger JLink more reliable, turn off its fake filesystem. "JLinkExe MSDDisable" per https://learn.adafruit.com/circuitpython-on-the-nrf52/nrf52840-bootloader + ## Done - DONE add "DFU trigger library" to application load diff --git a/src/configuration.h b/src/configuration.h index 04f9d26a1..bc64d3187 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -252,6 +252,10 @@ along with this program. If not, see . #define SERIAL_BAUD 921600 // Serial debug baud rate +#include "SerialConsole.h" + +#define DEBUG_PORT console // Serial debug port + #ifdef NO_ESP32 #define USE_SEGGER #endif @@ -259,10 +263,6 @@ along with this program. If not, see . #include "SEGGER_RTT.h" #define DEBUG_MSG(...) SEGGER_RTT_printf(0, __VA_ARGS__) #else -#include "SerialConsole.h" - -#define DEBUG_PORT console // Serial debug port - #ifdef DEBUG_PORT #define DEBUG_MSG(...) DEBUG_PORT.printf(__VA_ARGS__) #else