Atmel START ADC and SDADC multiple definitions

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello everyone,

 

I have created a project for configuring the peripherals of the ATSAMC21G using Atmel START (https://start.atmel.com/). I saved the configuration and exported the project. The export works also great. With the help of the *.atzip I could import the project in IAR EWARM and Microchip Studion. But before I add programs to the project I wanted to build it on a trial basis. The compiler ran well, the linker generates errors due to duplicate definitions. On closer inspection I see that the functions of the ADC have the same name as the SDADC (Sigma-Delta ADC). This is somewhat disadvantageous, since I use both ADCs.

 

Does anyone have similar problems? I have seen several amounts in the forum with multiple definitions. For example when using multiple SERCOMs.

Does anyone know an elegant way. Other than renaming? Because then the problem reappears with a new configuration or configuration adjustment.

I wish you a nice day and hope this thread meets interest.

 

Here is an excerpt of my linker(IAR EWARM):

 

 Error[Li006]: duplicate definitions for "_adc_async_convert"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_deinit"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_disable_channel"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_enable_channel"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_get_data_size"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_get_threshold_state"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_init"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_is_channel_conversion_done"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_read_channel_data"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_set_channel_differential_mode"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_set_channel_gain"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_set_conversion_mode"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_set_inputs"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_set_irq_state"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_set_reference_source"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_set_resolution"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_set_thresholds"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   
 Error[Li006]: duplicate definitions for "_adc_async_set_window_mode"; in "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\adc\hpl_adc.o", and "***\06 Sourcecode\App\OM\Debug\Obj\src\hpl\sdadc\hpl_sdadc.o"   

 

 

Here is an excerpt of my linker(Microchip/Atmel Studio):

 

Severity    Code    Description    Project    File    Line
Error        ld returned 1 exit status    xxx    collect2.exe    0
Error        multiple definition of `_adc_async_deinit'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_enable_channel'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_disable_channel'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_get_data_size'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_is_channel_conversion_done'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_convert'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_read_channel_data'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_set_reference_source'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_set_resolution'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_set_inputs'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_set_thresholds'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_set_channel_gain'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_set_conversion_mode'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_set_channel_differential_mode'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_set_window_mode'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_get_threshold_state'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        multiple definition of `_adc_async_set_irq_state'    xxx    ***_ATSAMC21G_OM_Ver3\Debug\hpl_sdadc.c    1
Error        recipe for target 'xxx.elf' failed    xxx    ***_ATSAMC21G_OM_Ver3\Debug\Makefile    679
Error        multiple definition of `_adc_async_init'    xxx    ***_ATSAMC21G_OM_Ver3\hpl\sdadc\hpl_sdadc.c    142

 

 

Here is an example problem with FLEXCOM (START ASF4 multiple definitions for FLEXCOM Handler ATSAMG55)

 

Here are my technical constraints:

 

Microchip/Atmel Studio Version (7.0.2542)
IAR EWARM Arm 9.10.2
start.atmel.com configurator from 19.01.2022

 

And here is my configuration file for Atmel START: My Project.zip

Attachment(s): 

ATSAMC21
ATSAME51
ATMEGA

Last Edited: Thu. Jan 20, 2022 - 08:58 PM