Page 1 of 1

[SOLVED]How can i get the crazyflie debug_print by the UART

Posted: Thu Jan 16, 2014 7:52 am
by baicker
I have seen some debug_print define in some files

Makefile:# CFLAGS += -DDEBUG_PRINT_ON_UART # Redirect the console output to the UART
utils/interface/debug.h:#ifdef DEBUG_PRINT_ON_UART
utils/interface/debug.h: #error "Need to define ENABLE_UART to use DEBUG_PRINT_ON_UART"

could you tell me how can i get the debug_print by the stm32 uart, should i modify the code ? and how to connect the chip ?

Re: How can i get the crazyflie debug_print by the stm32 UAR

Posted: Thu Jan 16, 2014 9:48 am
by tobias
Are you planning to use it for debugging? We use a 3.3V FTDI cable and solder it to the expansion port as shown in the picture.

Expansion pin - FTDI cable color
3 - Yellow (STM32 TX)
5 - Orange (STM32 RX)
18 - Black (GND)

What we have planned for a while is to use a virtual comport driver and use the USB for debugging but we have just not had the time to implement it. If you are up for it ST has code for it.

Re: How can i get the crazyflie debug_print by the stm32 UAR

Posted: Thu Jan 16, 2014 10:01 am
by baicker
tobias wrote:Are you planning to use it for debugging? We use a 3.3V FTDI cable and solder it to the expansion port as shown in the picture.

Expansion pin - FTDI cable color
3 - Yellow (STM32 TX)
5 - Orange (STM32 RX)
18 - Black (GND)

What we have planned for a while is to use a virtual comport driver and use the USB for debugging but we have just not had the time to implement it. If you are up for it ST has code for it.
thank you tobias, you are so warm-hearted

Do i have to remake the firmware with DEBUG=1 or other options?

Re: How can i get the crazyflie debug_print by the stm32 UAR

Posted: Thu Jan 16, 2014 12:12 pm
by tobias
It should be enough by setting

Code: Select all

CFLAGS += -DENABLE_UART          # To enable the uart
CFLAGS += -DDEBUG_PRINT_ON_UART  # Redirect the console output to the UART
DEBUG=1 is mainly to be used for JTAG debugging.

Re: How can i get the crazyflie debug_print by the stm32 UAR

Posted: Thu Jan 16, 2014 2:04 pm
by baicker
tobias wrote:It should be enough by setting

Code: Select all

CFLAGS += -DENABLE_UART          # To enable the uart
CFLAGS += -DDEBUG_PRINT_ON_UART  # Redirect the console output to the UART
DEBUG=1 is mainly to be used for JTAG debugging.
ok, thanks tobias. :P