SERIAL2; failure to compile [solved]

Post here first, or if you can't find a relevant section!
Post Reply
OldManNoob
Posts: 12
Joined: Sat Oct 09, 2021 5:09 pm
Answers: 2

SERIAL2; failure to compile [solved]

Post by OldManNoob »

Hi
I have been using the STM32F103C8 on the Arduino IDE for some time with the following setup:

Code: Select all

#define       HC12      Serial1               // TX-PA9/RX-PA10
#define       MATRIXSER Serial2                // TX-PA2/(RX-PA3 - NOT IN USE)
#define       BAUD      9600
and all worked fine until this week. Without any changes from me (that I'm aware of) I now get a compile failure:
collect2.exe: fatal error: cannot find 'ld'
compilation terminated.
exit status 1
Error compiling for board Generic STM32F103C series.


If I remove the reference to Serial2 I can compile without issue - so it seems that Serial2 has changed somehow...

Attempting to understand why, I have updated A_IDE to 1.8.16, uninstalled deprecated Core files and changed my Additional Board Manager URLs to the latest I can find:
https://github.com/stm32duino/BoardMana ... index.json, http://dan.drown.org/stm32duino/package ... index.json

I am stumped; can anyone shed any light on, and proffer a solution to this issue?
by OldManNoob » Sun Oct 10, 2021 9:08 pm
Ok.
I added one line before the defines

Code: Select all

HardwareSerial Serial2 (PA2, PA3);
which was not needed before last week - and hey, presto!

Thank you for your input.
Go to full post
Last edited by OldManNoob on Sun Oct 10, 2021 9:12 pm, edited 1 time in total.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: SERIAL2; failure to compile

Post by fpiSTM »

Error compiling for board Generic STM32F103C series.
Indicates that you used Rogers's core.
Dan drown package is not official. Try the repo as described in the wiki of Rogers's core.
https://github.com/rogerclarkmelbourne/ ... stallation
OldManNoob
Posts: 12
Joined: Sat Oct 09, 2021 5:09 pm
Answers: 2

Re: SERIAL2; failure to compile

Post by OldManNoob »

Ok.
I added one line before the defines

Code: Select all

HardwareSerial Serial2 (PA2, PA3);
which was not needed before last week - and hey, presto!

Thank you for your input.
Post Reply

Return to “General discussion”