robin-raymond opened a new issue #475: up_mdelay multiple definitions
URL: https://github.com/apache/incubator-nuttx/issues/475
 
 
   In file: 
   `nuttx/arch/arm/src/common/up_mdelay.c`
   
   ````
   void up_mdelay(unsigned int milliseconds)
   {
     volatile unsigned int i;
     volatile unsigned int j;
   
     for (i = 0; i < milliseconds; i++)
       {
         for (j = 0; j < CONFIG_BOARD_LOOPSPERMSEC; j++)
           {
           }
       }
   }
   ````
   
   is defined. But if you enable the timer driver you get:
   
   ````
   void up_mdelay(unsigned int milliseconds)
   {
     up_udelay(USEC_PER_MSEC * milliseconds);
   }
   ````
   
   in file `nuttx/drivers/timers/arch_timer.c`
   
   
   And thus the compiler error becomes:
   ````
   nuttx/nuttx/staging/libdrivers.a(arch_timer.o): In function `up_mdelay':
   arch_timer.c:(.text+0x208): multiple definition of `up_mdelay'
   nuttx/nuttx/staging/libkarch.a(up_mdelay.o):up_mdelay.c:(.text+0x0): first 
defined here
   ````
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to