Hello, Im looking for help related to getting any output to show in serial output. Im flashing ExpressLRS firmware from there last supported STM32 release (version 3.4). They use DBGLN and my program keeps getting stuck or halted here. Im trying to test tx functionality but im not sure how packets are being sent or what im supposed to be seeing in serial output. Building and uploading are succesful when I use platform io and upload through st link.
Board:
Here is a screenshot of me in debug mode halted at DBGLN and the terminal is using minicom but serial output on pio shows nothing as well:
And heres my ini :
[env:DIY_900_TX_STM32_LR1121_via_STLINK]
extends = env_common_stm32, radio_LR1121
upload_protocol = stlink
platform = ststm32
framework = arduino
board = nucleo_l476rg
build_flags =
${env_common_stm32.build_flags}
${radio_LR1121.build_flags}
${common_env_data.build_flags_tx}
-include target/DIY_900_TX_STM32_LR1121.h
-flto
-DDEBUG_LOG
board_build.ldscript = variants/stm32_test.ld # Custom linker script (controls memory layout).
board_build.mcu = stm32l476rgt6
board_build.f_cpu = 80000000L
#monitor_port = /dev/ttyACM0
upload_speed = 460800
monitor_speed = 460800
build_src_filter = ${env_common_stm32.build_src_filter} -<rx_*.cpp>
and they have a logging.h that defines DEBUG_LOG as DBGLN here:
#if defined(DEBUG_LOG) && !defined(CRITICAL_FLASH)
#define DBGCR LOGGING_UART.println()
#define DBGW(c) LOGGING_UART.write(c)
#ifndef LOG_USE_PROGMEM
#define DBG(msg, ...) debugPrintf(msg, ##__VA_ARGS__)
#define DBGLN(msg, ...) do { \
debugPrintf(msg, ##__VA_ARGS__); \
LOGGING_UART.println(); \
} while(0)
#else
#define DBG(msg, ...) debugPrintf(PSTR(msg), ##__VA_ARGS__)
#define DBGLN(msg, ...) { \
debugPrintf(PSTR(msg), ##__VA_ARGS__); \
LOGGING_UART.println(); \
}
#endif
So when I try anything like DBGLN(“ExpressLRS TX Setup”); it just halts.
So if its building and uploading I think my linker script is fine. The header file I include is for pin layout and macro defines.Overall, Im not sure If its something as simply as i need to restart my board each time I upload or open serial port right after upload Im still learning about mcus. Or if I need to look over the logging.h file.
Any advice would be helpful thanks
