First, please check "UseMicroLIB" in "Target"->"Code Generation" of MDK (keil) project properties.
Add Printf to your program
1,#include
2. Add
#ifdef __GNUC__
#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
#else
#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
#endif
PUTCHAR_PROTOTYPE
{
USART_SendData(USART1, (uint8_t) ch);
while (USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET)
{}
return ch;
}
3.
Add in Main()
USART_Configuration()
transfer
printf("The is an example!" );
Output functions like
Previous article:STM32L series MDK5 debugging
Next article:Cannot set breakpoints when using ST-LINK to debug the STM32 microcontroller
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- Why software-defined vehicles transform cars from tools into living spaces
- Darlington and MOS selection problem?
- 0.96 inch 7-pin oled in msp430 source program
- STM32 control servo motor
- How to reset the PIC18F66J60 chip using software using the C30 compiler?
- [Evaluation of domestic FPGA Gaoyun GW1N-4 series development board]——8. Using external JTAG downloader (Black Gold USB Cable)
- 【XMC4800 Relax EtherCAT Kit Review】+XMC4800+ unboxing and power on to start the journey of infineon
- Please advise on the pulse program of STC
- Test of a low-pass filter indicator posted before
- Redefining the retail experience: Four opportunities for RF technology
- Thank you for being here