'board_android-IoT'에 해당되는 글 87건
- 2025.02.28 :: STM32 printf redirection to UART
- 2025.02.20 :: How to change the readout protection on STM32F4
- 2025.02.20 :: Keil compiler printf(with uart) 하기
- 2025.02.18 :: Keil compiler printf(with uart) 하기
- 2024.11.28 :: ESP32-S3-A7670E-4G , Developement environment
- 2024.11.16 :: Conditional compile for ESP32 and ESP32S3
//#ifdef __GNUC__
//#warning "__GNUC__ is defined ---------"
// // 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
//#warning "__GNUC__ is -------------- not !!!! defined --- keil "
// #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
//#endif /* __GNUC__ */
//
#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) // for keil
/**
* @brief Retargets the C library printf function to the USART.
* @param None
* @retval None
*/
PUTCHAR_PROTOTYPE
{
/* Place your implementation of fputc here */
/* e.g. write a character to the EVAL_COM1 and Loop until the end of transmission */
HAL_UART_Transmit(&huart2, (uint8_t *)&ch, 1, 0xFFFF);
return ch;
}
//int _write(int file, char *ptr, int len) {
// HAL_UART_Transmit(&huart2, (uint8_t *)ptr, len, HAL_MAX_DELAY);
// return len;
//}
/*
// UART2 리다이렉트 (printf 사용 가능)
int _write(int file, char *ptr, int len) {
HAL_UART_Transmit(&huart2, (uint8_t*) ptr, len, HAL_MAX_DELAY);
return len;
}
*/
'board_android-IoT > STM32F' 카테고리의 다른 글
| STM32F437VITx에서 TIM2를 0.1ms(100µs) 간격으로 인터럽트 발생시키는 설정 방법 (0) | 2025.03.07 |
|---|---|
| how to create a bin from axf file in Keil/uVision5 (0) | 2025.03.06 |
| How to change the readout protection on STM32F4 (0) | 2025.02.20 |
| Keil compiler printf(with uart) 하기 (0) | 2025.02.20 |
| Keil compiler printf(with uart) 하기 (0) | 2025.02.18 |
How to change the readout protection on STM32F4
How to change the readout protection on STM32F4? Introduction STM32F4 microcontrollers offer three levels of readout protection: level 0 (no protection), level 1 (Flash memory, backup SRAM, and backup registers protected), and level 2 (same as level 1, but
community.st.com
#printf_to_uart #printf_to_usart

'board_android-IoT > STM32F' 카테고리의 다른 글
| how to create a bin from axf file in Keil/uVision5 (0) | 2025.03.06 |
|---|---|
| STM32 printf redirection to UART (0) | 2025.02.28 |
| Keil compiler printf(with uart) 하기 (0) | 2025.02.20 |
| Keil compiler printf(with uart) 하기 (0) | 2025.02.18 |
| STM Flash loader (1) | 2024.10.29 |
Keil 컴파일러에서는 printf를 사용하기 위해서는 추가로 설정이 필요합니다.
아래 방법은 UART로 debug message를 보내기 위한 방법입니다 .
1. Header 추가
. String을 사용하기 위해서 #include"stdio.h" 을 추가합니다.
2.Option 변경
아래 그림 처럼 use MicroLIB를 check합니다.
3. UART로 데이터를 전송하기 위한 callback함수를 추가하셔야 합니다.
UART 2번으로 data를 전송하기 위해나 fputc()함수를 추가하였습니다.
그리고 조금 특이한 것은 ferror()함수를 추가 하지 않으면, Reset vector에서 Main()함수로 jmp를 못합니다. (아직 이유는 모름)
https://blog.naver.com/compass1111/221624747254
Keil compiler printf(with uart) 하기
STM32F1 시리즈와 goodisplay E-ink display장치를 개발하고 있습니다. Keil 컴파일러에서는 printf...
blog.naver.com
'board_android-IoT > STM32F' 카테고리의 다른 글
| STM32 printf redirection to UART (0) | 2025.02.28 |
|---|---|
| How to change the readout protection on STM32F4 (0) | 2025.02.20 |
| Keil compiler printf(with uart) 하기 (0) | 2025.02.18 |
| STM Flash loader (1) | 2024.10.29 |
| Keil, uVision , Compile size check (0) | 2024.10.12 |
Keil 컴파일러에서는 printf를 사용하기 위해서는 추가로 설정이 필요합니다.
아래 방법은 UART로 debug message를 보내기 위한 방법입니다 .
1. Header 추가
. String을 사용하기 위해서 #include"stdio.h" 을 추가합니다.
2.Option 변경
아래 그림 처럼 use MicroLIB를 check합니다.
3. UART로 데이터를 전송하기 위한 callback함수를 추가하셔야 합니다.
UART 2번으로 data를 전송하기 위해나 fputc()함수를 추가하였습니다.
그리고 조금 특이한 것은 ferror()함수를 추가 하지 않으면, Reset vector에서 Main()함수로 jmp를 못합니다. (아직 이유는 모름)
https://blog.naver.com/compass1111/221624747254
Keil compiler printf(with uart) 하기
STM32F1 시리즈와 goodisplay E-ink display장치를 개발하고 있습니다. Keil 컴파일러에서는 printf...
blog.naver.com
- 아래는 CubeIDE 환경용이나 잘 동작할지는 확인 필요
How to redirect the printf function to a UART for debug messages
Introduction It can be especially useful during code development to display messages in a terminal window about various system parameters to help with debugging. An easy way to do that is to use the printf function and redirect the output to a UART for dis
community.st.com
'board_android-IoT > STM32F' 카테고리의 다른 글
| How to change the readout protection on STM32F4 (0) | 2025.02.20 |
|---|---|
| Keil compiler printf(with uart) 하기 (0) | 2025.02.20 |
| STM Flash loader (1) | 2024.10.29 |
| Keil, uVision , Compile size check (0) | 2024.10.12 |
| LTE modem sample (0) | 2024.09.20 |
'board_android-IoT > ESP32' 카테고리의 다른 글
| ESP32 응용 제품 (0) | 2025.03.26 |
|---|---|
| Compile on both ESP32 and ESP8266 (0) | 2024.10.29 |
| ESP32 UDP SEND_RECV example (0) | 2024.09.10 |
| ESP32 UDP SEND_RECV example (0) | 2024.09.06 |
| ESP8266 , DB18B20 connection (0) | 2024.07.29 |
// Source code in Arduino IDE
#ifdef CONFIG_IDF_TARGET_ESP32
#warning "[ESP32]"
#elif CONFIG_IDF_TARGET_ESP32S3
#warning "[ESP32S3]"
#endif
1. if select ESP32
> compile result:
....: warning: #warning "[ESP32]" [-Wcpp]
#warning "[ESP32]"
^~~~~~~
2. if select ESP32S3
- In arduino IDE, Menu: Tools-> Board -> ESP32 -> ESP32S3
...warning: #warning "[ESP32S3]" [-Wcpp]
#warning "[ESP32S3]"
^~~~~~~
Reference:
What is the specific #if defined(ARDUINO_ARCH_ESP32) for ESP32-S2, ESP32-S3, ESP32-C3?
as title. what is the specific #if defined(ARDUINO_ARCH_ESP32) for ESP32-S2, ESP32-S3, ESP32-C3? I want to do something only if ESP32-S2 is used for example.
community.platformio.org
'board_android-IoT > arduino_esp8266_esp32' 카테고리의 다른 글
| Arduino - ADC voltage measurement using Aref (0) | 2023.06.15 |
|---|---|
| Arduino External Interrup + Button (0) | 2021.08.22 |
| STM32 CPU and 7Segment interface (0) | 2021.08.13 |
| ESP8266-weather(temperature_humidity) station (0) | 2021.05.14 |
| MINIDK, ESP8266-weather(temperature_humidity) station (0) | 2021.05.05 |
