IAR for STM8 redirect printf

Publisher:collectorsLatest update time:2020-02-28 Source: eefocusKeywords:IAR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

#include
int fputc(int ch, FILE *f)//STM8S105,printf function redirection 

  while (!(UART2->SR&0x80)); 
  UART2->DR=ch;
  return ch; 


At the same time, you need to modify the Library item in IAR's Project->Options->General Options->Library Configuration from "Normal" to "Full".

Keywords:IAR Reference address:IAR for STM8 redirect printf

Previous article:About the problem of incorrect printing of IAR for stm8 printf
Next article:Solution to abnormal data reading of STM8 ADC

Recommended ReadingLatest update time:2024-11-17 03:52

Debugging STM8 with ST-LINK
Solved: What should I do when the error "The Flash Memory Read-out protection option must be disabled for debug. Disabling this option will first erase" appears when debugging STM8 with ST-LINK? (1) The prompt is very clear: you must disable the flash read protection option to debug, that is, you need to set it to r
[Microcontroller]
Debugging STM8 with ST-LINK
stm8 bit band operation
STM8 and STM32 are different here. I am used to using LED = !LED in 51. In STM32, there is an atom to get the position and add macros, which is also acceptable. But stm8 doesn't support bit-band operations, so I searched on Baidu. There are roughly two methods: 1. STVD environment volatile _Bool PA_ODR_0 @PA_O
[Microcontroller]
Notes on IAR debugging S3C6410 (Part 4)
    The bare metal environment has been built. How can bare metal debugging be done without interrupts? S3C6410 has a hardware interrupt controller. Unlike 2440, you need to calculate the offset address of the interrupt function yourself. It is very convenient. For specific operation methods, please refer to the hardw
[Microcontroller]
ADC0832 acquisition and Bluetooth communication system based on STM8
I recently found a single-chip microcomputer, STM8, while browsing Taobao. Compared with the 8-bit AVR I have been using before, STM8 feels more powerful. The chip features are as follows: Core: Harvard architecture with 3-stage pipeline, extended instruction set Program memory: 8K bytes Flash; RAM: 1K bytes Data me
[Microcontroller]
ADC0832 acquisition and Bluetooth communication system based on STM8
Some points to note in STM8 design
1 、The PC0 and PC1 pins of STM8 only have OD open-drain output and no PP output, as shown in the following figure: If you want to use PC0 and PC1 to output high level, you need to pull them up during hardware design. These two ports cannot be pulled up by software and can only be pulled up by hardware. 2 , When u
[Microcontroller]
Some points to note in STM8 design
Debugging STM32 in memory - IAR platform
  The STM32 Cortex-M3 controller, like many other ARMs, provides two pins, BOOT0 and BOOT1, for boot selection.  BOOT1=x BOOT0=0 Boot from user flash memory, which is the normal working mode.  BOOT1=0 BOOT0=1 Boot from system memory. The program function started in this mode is set by the manufacturer. (For serial por
[Microcontroller]
Detailed explanation of STM32 IAR project -> Keil MDK conversion
Introduction: I found that most of the STM32 sample programs are based on the IAR development environment when I was studying STM32, but I think it is more convenient to use the Keil MDK development environment, and I can use the powerful peripheral simulation function of RVMDK to accelerate the development of STM32. I
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号