Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - RT-Thread floating point printing and 64-bit long integer printing
RT-Thread floating point printing and 64-bit long integer printing

The official RT-Thread (hereinafter referred to as RTT) does not support floating-point printing. After all, quite a few MCUs do not even support floating-point instructions. If you need to use floating-point printing during debugging, you can pass The following steps are implemented:

Step1: Switch libc from the nano version to the standard version:

Step2: Use the sprintf function to output the floating point to a string, and then print it through rtprintf:

p>

? The official RTT supports 64-bit long integer printing, but this function is not turned on by default and can be enabled as follows: