Closed Joypacharya closed 4 years ago
It looks like your source code contains cpp files: mcu_api.cpp, protocol.cpp and system.cpp. SDCC is a plain C compiler, cpp language elements don't work. The build script wrapper/sdcc.sh simply renames cpp file to c and inserts a refence to dummy_variable in order to pull in the default main() from the the sduino library.
Using dummy_variable is a workaround to simulate weak linking in order to supply a default main() from the sduino libraries. It is supposed to be added automatically to the main sketch file (typ. the ino file), which is supposed to be the only file in the build process with a cpp file ending.
Since your cpp files compile ok, they seem to be pure C. So there is an easy fix: Rename them to *.c and it should work out.
I am developing code for temp checking the tuya interface with the board STM8S103F3. I select the appropriate board onboard menu. So, I correct all the required changes into code. Then after I was getting this kind of error,
I think these errors generate because of some problem in the library. I hope you will help me. Thank you.