I'm using STM32 core V1.9.0 and am getting the following error when compiling:
Code snippet:Arduino: 1.8.13 (Windows 10), Board: "Generic STM32F0 series, STM32F030C8, STM32CubeProgrammer (SWD), Enabled (generic 'Serial'), Smallest (-Os default), Newlib Nano (default)"
c:/users/chris/appdata/local/arduino15/packages/stm32/tools/xpack-arm-none-eabi-gcc/9.2.1-1.1/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\Chris\AppData\Local\Temp\arduino_cache_819828\core\core_26975acf160c245a48c4a5d077fe08fa.a(HardwareSerial.cpp.o):(.bss.Serial1+0x0): multiple definition of `Serial1'; sketch\washer.ino.cpp.o:(.bss.Serial1+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Generic STM32F0 series.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Code: Select all
HardwareSerial Serial1(PB7, PB6);
void setup() {
Serial1.begin(57600, SERIAL_8N1); //Open serial port
}
void loop() {
if (Serial1.available() > 0) { //If RS485 data available
RS485_Data = Serial1.read(); //Read RS485 data into buffer
}
}
Thank you!