Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to add another STM32 Board #45

Open
ghost opened this issue Apr 15, 2023 · 2 comments
Open

how to add another STM32 Board #45

ghost opened this issue Apr 15, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 15, 2023

#define STM32F3xx // Change for your device
#ifdef STM32F3xx
#include "stm32f3xx_hal.h"
#include "stm32f3xx_hal_uart.h"
#endif /* STM32F3xx /
#ifdef STM32F4xx
#include "stm32f4xx_hal.h"
#include "stm32f4xx_hal_uart.h"
#endif /
STM32F4xx /
#ifdef STM32F7xx
#include "stm32f7xx_hal.h"
#include "stm32f7xx_hal_uart.h"
#endif /
STM32F7xx */

This a piece of code from STM32Hardware header file, how to add stm32f103 microcontroller ? please guide

@ghost
Copy link
Author

ghost commented Apr 15, 2023

I am using CubeIDE

@mink007
Copy link

mink007 commented Mar 6, 2024

I am assuming you have generated the boiler plate code for your STM32 project in STM32CubeIDE.

In the STM32Hardware.h simply add these lines:

#ifdef STM32F1xx
#include "stm32f1xx_hal.h"
#include "stm32f1xx_hal_uart.h"
#endif

remove this line "#define STM32F3xx // Change for your device"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant