Reply
Posts: 56
Registered: ‎03-22-2017

KEIL + USB_API.LIB = UNRESOLVED EXTERNAL SYMBOL

I started with an example project that make a single 16 bit PWM output using the PCA0 component.

I need to make two 16-bit PWM outputs, and I found AN107 that is supposed to do that.

 

I deleted everything in main.c, and copied in the code in AN107.

Then fixed a bunch of errors.

 

When I build, I get these errors. I have found several other posts about this error but I don’t understand any of the solutions.

 

Can someone help me get rid of this error? Thank you.

 

11:26:06 **** Incremental Build of configuration Keil 8051 v9.53 - Debug for project F50x-51x_PCA0_16Bit_PWM_Output ****
make all 
PATH=/c/SiliconLabs/SimplicityStudio/v4/developer/toolchains/keil_8051/9.53/BIN:/c/SiliconLabs/SimplicityStudio/v4/support/8051:/usr/bin:/c/SiliconLabs/SimplicityStudio/v4/features/com.silabs.external.java.windows.x86.feature_1.8.0.92/jre/bin/client:/c/SiliconLabs/SimplicityStudio/v4/features/com.silabs.external.java.windows.x86.feature_1.8.0.92/jre/bin:/c/SiliconLabs/SimplicityStudio/v4/features/com.silabs.external.java.windows.x86.feature_1.8.0.92/jre/lib/i386:/c/MentorGraphics/9.4PADS/SDD_HOME/common/win32/bin:/c/MentorGraphics/9.4PADS/SDD_HOME/common/win32/lib:/c/MentorGraphics/9.4PADS/MGC_HOME.ixn/bin:/c/MentorGraphics/9.4PADS/MGC_HOME.ixn/lib:/c/ProgramData/Oracle/Java/javapath:/c/Program Files/Common Files/Microsoft Shared/Windows Live:/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files (x86)/Windows Live/Shared:/c/Program Files/Intel/WiFi/bin/:/c/Program Files/Common Files/Intel/WirelessCommon/:/c/MentorGraphics/9.4PADS/SDD_HOME/CAMCAD:/c/Program Files (x86)/QuickTime/QTSystem/:/c/SiliconLabs/SimplicityStudio/v4
 
Building target: F50x-51x_PCA0_16Bit_PWM_Output.omf
Invoking: Keil 8051 Linker
LX51 "@F50x-51x_PCA0_16Bit_PWM_Output.lnp" || test $? -lt 2

LX51 LINKER/LOCATER V4.66.30.0 - SN: K1RLC-P06LJZ
COPYRIGHT ARM Germany GmbH 1995 - 2014
@F50x-51x_PCA0_16Bit_PWM_Output.lnp "./src/F500_PCA0_16Bit_PWM_Output.OBJ",
"./src/SILABS_STARTUP.OBJ"
TO "F50X-51X_PCA0_16BIT_PWM_OUTPUT.OMF.CRBUILD" REMOVEUNUSED PRINT(.\F50x-51x_PCA0_16Bit_PWM_Output.m51) PAGEWIDTH (120) PAGELENGTH (65) CLASSES( ECODE(C:0x0 - C:0xfdfe), HCONST(C:0x0 - C:0xfdfe), XDATA(X:0x0 - X:0xfff), HDATA(X:0x0 - X:0xfff))

*** ERROR L127: UNRESOLVED EXTERNAL SYMBOL
    SYMBOL:  SILABS_STARTUP
    MODULE:  ./src/SILABS_STARTUP.OBJ (?C_STARTUP)

*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL:  SILABS_STARTUP
    MODULE:  ./src/SILABS_STARTUP.OBJ (?C_STARTUP)
    ADDRESS: 1000004H

Program Size: data=11.0 xdata=0 const=0 code=196
LX51 RUN COMPLETE.  0 WARNING(S),  2 ERROR(S)
make: *** [F50x-51x_PCA0_16Bit_PWM_Output.omf] Error 1

11:26:06 Build Finished (took 637ms)

 

Posts: 233
Registered: ‎07-27-2016

Re: KEIL + USB_API.LIB = UNRESOLVED EXTERNAL SYMBOL

Hi @dan-meeks,

 

Our startup files have been modified to include a WDOG disable statement before the program execution. You can do one of two things here - 

 

1. If you want to disable the WDOG include the following code segment in the beginning of your code - 

//-----------------------------------------------------------------------------
// SiLabs_Startup() Routine
// ----------------------------------------------------------------------------
// This function is called immediately after reset, before the initialization
// code is run in SILABS_STARTUP.A51 (which runs before main() ). This is a
// useful place to disable the watchdog timer, which is enable by default
// and may trigger before main() in some instances.
//-----------------------------------------------------------------------------
void SiLabs_Startup (void)
{
   PCA0MD &= ~PCA0MD_WDTE__ENABLED;    // Disable the watchdog timer
}

2. Right-click on the project in Simplicity Studio. Go to Properties >> Keil 8051 Assembler >> Control Symbols. Delete the SILABS_STARTUP=1 symbol. This way your WDOG will not be disabled

 

Best,

 

Manasa