Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- Contax G2
- Kodak 400TX
- FujiFilm GFX50s
- Kodak T-Max 100
- Kodak Ektar 100
- 2018 미국출장
- Minolta CLE
- fujifilm velvia 50
- ZeissIkon ZI
- 2019 유럽여행
- Kentmere 400
- GRD2
- Germany
- N80/4
- Kodak 5222
- Nikon 28Ti
- FujiFilm C200
- M-Rokkor 40/2
- Rollei35s
- cf50/4 fle
- G28/2.8
- cs50/2.5
- 4870
- Hasselblad 500cm
- Minolta TC-1
- SONY A7
- Mamiya 7
- cf80/2.8
- Leica M7
- kodak t-max 400
Archives
- Today
- Total
J 창고
[ARM] stm32f103c8 KEIL에서 printf 사용하기 본문
USART 를 뚫는 삽질을 시작한 계기도..
Printf 를 사용하려고 했던 것인데...
엌
진작에 좀 제대로 검색을 해 볼걸...
소스에
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #ifdef __GNUC__ /* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Small printf set to 'Yes') calls __io_putchar() */ #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) #else #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) #endif /* __GNUC__ */ PUTCHAR_PROTOTYPE { /* Place your implementation of fputc here */ /* e.g. write a character to the USART */ USART_SendData(USART1, (uint8_t) ch); /* Loop until the end of transmission */ while (USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET) {} return ch; } |
이렇게 코드를 넣으면 되고...
결정적으로
Use MicroLIB를 체크 해야함...... ㅠㅠ
그러니 바로 되네....... Orz
이 MicroLIB 체크 하나때문에 한참을 헤맸네...
Comments