- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
03-16-2015 09:16 AM
I'm trying to set up a basic project using I2C.
To save some time looking up the proper pin and port configurations I thought of using the configurator.
Now, without having anything enabled in the configurator yet, I only included the "enter_DefaultMode_from_RESET"-function in my main(), the compiler throws an error:
Debug/../src/InitDevice.c:41: undefined reference to `CMU_ClockSelectSet'
This happens despite the fact that "em_cmu.h" is included in the InitDevice.c
An additional "undefined reference"-error shows up when I try to include the I2C part.
I've looked through AN0823 but it didn't reveal anything helpful for this issue to me.
Any help how to resolve this is appreciated!
Solved! Go to Solution.
03-17-2015 06:12 AM
I suspect this is a linker error instead of a compiler error. Have you included the source file that implements CMU_ClockSelectSet() in your project?
03-18-2015 02:49 PM
Hi, You wrote: "I only included the "enter_DefaultMode_from_RESET"-function". Did You included other functions, that are called from function "enter_DefaultMode_from_RESET"-function"?
I suggest include whole file and header file InitDevice.c and InitDevice.h
Be aware from errors in Configurator. Some Clock initializations are missing in functions.
03-18-2015 06:25 PM
You're right, that was the issue.
Even though I don't understand, why it is neccessary to include the source files manually though.
If I use a configurator I'd expect it to take care of this, or at least show a message that it doesn't and I need to manually (!) copy (or copy by reference) the source files into the project each time!
Thanks for your help :-)