/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Linking problem for 3ADCs_DMA project withPprimer II

Username:     
Password:     
             

Forum

# 1   2011-04-21 09:55:15 Linking problem for 3ADCs_DMA project withPprimer II

ludovicbaron
New member
Registered: 2011-04-18
Posts: 2

Linking problem for 3ADCs_DMA project withPprimer II

Dear all,

The example is located in:
Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA

As I am trying to compile and link the example project 3ADCs_DMA using RIDE7 for my Primer II, I was first forced to add the following include at the top of the main file to performe the compilation.

Code:

#include "stm32f10x_adc.h"
#include "stm32f10x_dma.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"
#include "misc.h"

This is strange as these include appear also in the related individual *.c file included in my project and adding these header was not mandotory based on the readme file of this project.

Anyway, now I have some problem with the linking process. The compilator give me the following errors:

Running: LD Linker

"C:\Program Files (x86)\Raisonance\Ride\arm-gcc\bin\arm-none-eabi-gcc.exe" -mcpu=cortex-m3 -mthumb -Wl,-T -Xlinker "C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\Application0.elf.ld" -u _start -Wl,-static -Wl,--gc-sections -nostartfiles -Wl,-Map -Xlinker "C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\Application0.map"   

C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\stm32f10x_adc.o: In function `ADC_Init': 

C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\C_files/stm32f10x_adc.c:227: undefined reference to `assert_param' 

C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\C_files/stm32f10x_adc.c:228: undefined reference to `assert_param' 

C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\stm32f10x_adc.o: In function `ADC_Cmd': 

C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\C_files/stm32f10x_adc.c:301: undefined reference to `assert_param' 

C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\C_files/stm32f10x_adc.c:302: undefined reference to `assert_param' 

C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\stm32f10x_adc.o: In function `ADC_DMACmd': 

C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\C_files/stm32f10x_adc.c:326: undefined reference to `assert_param' 

C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\stm32f10x_adc.o:C:\Program Files (x86)\Raisonance\Ride\Examples\ARM\ST\STM32Lib-v340\Project\STM32F10x_StdPeriph_Examples\ADC\3ADCs_DMA\RIDE3\C_files/stm32f10x_adc.c:327: more undefined references to `assert_param' follow


All these errors seems to be link with the "undefined reference to `assert_param'". Do anyone have experience such things? I am completely newby, so I may miss something?

Any procedure for dummies to get an adc voltage reading except batt. and temp are welcome. I precise that I look to the different available solution for ADC on primer II on this forum but I was not able to compile them and my attempts in modifiying the batt reading to read an ADC pin (14 for examoke) have all failed.

Anyway, thank you

Offline

 

# 2   2011-04-22 06:23:51 Linking problem for 3ADCs_DMA project withPprimer II

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Linking problem for 3ADCs_DMA project withPprimer II

For using the St examples, I suggest you to first read the notice "stm32f10x_stdperiph_lib_um.chm", specially the paragraph "How to use the Standard Peripherals Library"
It will explain you how to configure, and which header to include, how to use the project template...

Offline

 

# 3   2011-04-26 13:15:30 Linking problem for 3ADCs_DMA project withPprimer II

ludovicbaron
New member
Registered: 2011-04-18
Posts: 2

Re: Linking problem for 3ADCs_DMA project withPprimer II

Thank you for the reply,

I will read the help provided and I will give some news on this forum if I manage to get some ADC values from my Primer.

Regards,

ludovic

Offline

 

# 4   2011-08-23 12:21:48 Linking problem for 3ADCs_DMA project withPprimer II

aamigol
New member
Registered: 2008-08-30
Posts: 2

Re: Linking problem for 3ADCs_DMA project withPprimer II

Hello

I have the same problem when building my very first projects. The way to solve the problem, at least in may case has been including the folowing Define into the project properties:  USE_STDPERIPH_DRIVER

The path where it is has tu be defined is:

    Project properties | GCC compiler | Defines


Best regards

Alfonso

Offline

 

# 5   2011-08-30 06:42:14 Linking problem for 3ADCs_DMA project withPprimer II

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Linking problem for 3ADCs_DMA project withPprimer II

It works, but the library has normally to be configured by modifying the "stm32f10x.h" file.
Here are defined:
- use of library or not,
- crystals values,
- STM32 family used...

I repeat : for using the St examples, I suggest you to first read the notice "stm32f10x_stdperiph_lib_um.chm", specially the paragraph "How to use the Standard Peripherals Library"
It will explain you how to configure, and which header to include, how to use the project template..

Offline

 

Board footer