works with TTN and cheap STM32F103C8T6 boards
Dependencies: LMiC_CFG_eu868 SX1276Lib mbed-STM32F103C8T6 mbed
Fork of LoRaWAN-lmic-app by
STM32F103C8T6 + RFM95 LoRa Node
flash board wirh STLink
openocd -f interface/stlink-v2.cfg -f target/stm32f1x_stlink.cfg \ -c "program STM32F103C8T6_LoRaWAN-lmic-app_NUCLEO_F103RB.bin exit verify reset 0x08000000"
Diff: debug.cpp
- Revision:
- 6:b2e833061c1f
- Parent:
- 1:60184eda0066
--- a/debug.cpp Thu Nov 26 17:20:53 2015 +0000 +++ b/debug.cpp Thu Nov 10 23:14:53 2016 +0000 @@ -10,10 +10,15 @@ * Semtech Apps Team - Adapted for MBED *******************************************************************************/ #include <stdio.h> +#include "mbed.h" +#include "stm32f103c8t6.h" #include "lmic.h" #include "debug.h" +Serial pc(PA_2, PA_3); + void debug_init () { + pc.baud(57600); // print banner debug_str("\r\n============== DEBUG STARTED ==============\r\n"); } @@ -23,11 +28,11 @@ } void debug_char (u1_t c) { - fprintf(stderr, "%c", c ); + pc.printf("%c", c); } void debug_hex (u1_t b) { - fprintf(stderr, "%02X", b ); + pc.printf("%02X", b ); } void debug_buf (const u1_t* buf, u2_t len) {