|
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONSNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Erik Zanen Posted 17-Oct-2005 03:53 Toolset ARM |  *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS Erik Zanen I am using the following code:
// Timer3 IRQ: Executed each 10ms void T3TIMI_IRQHandler (void) __irq {
GPIO_BitWrite(GPIO2, 15, ~GPIO_BitRead(GPIO2, 15));
TIM_FlagClear(TIM3, TIM_TO_IT);
EIC->IPR = 1 << T3TIMI_IRQChannel;
}
And I receive the following error:
Build target 'STR7 Eval Board RAM' assembling Startup.s... compiling Hello.c... compiling UART.c... compiling GPIO.c... linking... *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: GPIO_Config?T MODULE: C:\Keil\ARM\LIB\ST\STR71x.LIB (gpio) DEFINED: .\RAM\GPIO.obj (GPIO) *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: GPIO_BitWrite?T MODULE: C:\Keil\ARM\LIB\ST\STR71x.LIB (gpio) DEFINED: .\RAM\GPIO.obj (GPIO) *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: GPIO_ByteWrite?T MODULE: C:\Keil\ARM\LIB\ST\STR71x.LIB (gpio) DEFINED: .\RAM\GPIO.obj (GPIO) *** WARNING L23: UNRESOLVED EXTERNAL SYMBOLS Program Size: data=2074 const=0 code=242 Target not created
If I put the:
GPIO_BitWrite(GPIO2, 15, ~GPIO_BitRead(GPIO2, 15));
in the main function everything works just fine. If I put it in the ISR I get the above error. Why doesn't it work in an interrupt service routine?
regards,
Erik | | Read-Only Author Reinhard Keil Posted 17-Oct-2005 04:18 Toolset ARM |  RE: *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS Reinhard Keil We need a bit more information about the problem (processor, how is the function defined, ect.). However it looks similar to this:
http://www.keil.com/support/docs/2929.htm
Reinhard | | Read-Only Author Erik Zanen Posted 17-Oct-2005 05:57 Toolset ARM |  RE: *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS Erik Zanen My evalboard is: MCBSTR7 > STR710F2 microcontroller from ST microelectronics
my code:
HELLO.C: Hello World Example
<
// Timer3 IRQ: Executed each 10ms
void T3TIMI_IRQHandler (void) __irq
{
GPIO_BitWrite(GPIO2, 15, ~GPIO_BitRead(GPIO2, 15));
TIM_FlagClear(TIM3, TIM_TO_IT);
EIC->IPR = 1 << T3TIMI_IRQChannel;
}>
<
// Timer 3 Configuration: Periodic Interrupts at aprox. 10ms
TIM_Init (TIM3); // Initialization
TIM_PrescalerConfig (TIM3, 256); // Prescaler
TIM_ITConfig (TIM3, TIM_TO_IT, ENABLE); // Enable Overflow Interrupt
TIM_CounterConfig (TIM3,TIM_START); // Start Timer
// Configure and enable IRQ for Timer 3
EIC->IVR = (u32)T3TIMI_IRQHandler;
EIC->SIR[T3TIMI_IRQChannel] = ((u16)T3TIMI_IRQHandler << 16);
EIC_IRQChannelConfig(T3TIMI_IRQChannel, ENABLE);
EIC_IRQChannelPriorityConfig(T3TIMI_IRQChannel, 1);
>
UART.c
void UART_ByteSend(UART_TypeDef *UARTx, u8 *Data) { while (!(UARTx->SR & UART_TxEmpty)); // while the transmit shift register not empty UARTx->TxBUFR = *Data; }
GPIO.c
void GPIO_BitWrite(GPIO_TypeDef *GPIOx, u8 Port_Pin, u8 Port_Val) { if (Port_Val&0x01) GPIOx->PD |= 1<<Port_Pin; else GPIOx->PD &= ~(1<<Port_Pin); }
Include path is : C:\Keil\ARM\INC\ST
| | Read-Only Author Reinhard Keil Posted 17-Oct-2005 11:45 Toolset ARM |  RE: *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS Reinhard Keil I recommend that you directly access the peripherals (which is anyway more efficient than using the software wrappers provided by ST).
Reinhard | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|