/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Issues in the STM32 libraries

Username:     
Password:     
             

Forum

# 1   2011-07-28 15:24:52 Issues in the STM32 libraries

smiermont
New member
From: Grenoble, France
Registered: 2011-06-21
Posts: 5

Issues in the STM32 libraries

Hello

I'm trying to compile a circle OS application (known to work in another development environment) and I had dependencies problems one after the other for the last two days.

The version I use are:
Ride7  v7.30.10.0159
Rkit-ARM for Ride7  v1.30.10.0356
Ride7 Patch   v7.30.10.0169
I'm using the included Circle OS version (4.1) and the STM32Lib v3.4.0

I have added all the .h files in the relevant directory (the STM32 .h files, plus stm32f10x.h and stm32f10x_conf.h that I had to go find elsewhere) and added the relevant .c files to my project (stm32f10x_gpio.c, stm32f10x_rcc.c, stm32f10x_tim.c and stm32f10x_usart.c) as recommended on the forum, instead of using the "Use OLD precompiled libraries" option.


Now, I have the following error:


Building  <project path>\Appli0.rapp
Running: LD Linker
"C:\Program Files (x86)\Raisonance\Ride\arm-gcc\bin\arm-none-eabi-gcc.exe" -mcpu=cortex-m3 -mthumb -Wl,-T -Xlinker " <project path>\objrelease\Appli0.elf.ld" -u _start -Wl,-static -Wl,--gc-sections -nostartfiles -Wl,-Map -Xlinker " <project path>\objrelease\Appli0.map"   
<project path>\objrelease\stm32f10x_gpio.o: In function `GPIO_Init': 
<project path>\libsrc/stm32f10x_gpio.c:178: undefined reference to `assert_param' 
<project path>\libsrc/stm32f10x_gpio.c:179: undefined reference to `assert_param' 
<project path>\libsrc/stm32f10x_gpio.c:180: undefined reference to `assert_param' 
<project path>\libsrc/stm32f10x_gpio.c:187: undefined reference to `assert_param' 
<project path>\objrelease\stm32f10x_rcc.o: In function `RCC_APB2PeriphClockCmd': 
<project path>\libsrc/stm32f10x_rcc.c:1098: undefined reference to `assert_param' 
<project path>\objrelease\stm32f10x_rcc.o: <project path>\libsrc/stm32f10x_rcc.c:1099: more undefined references to `assert_param' follow 
collect2: ld returned 1 exit status 


The only fix I've found is to add the following line to all the stm32f10x_***.c files:
#include "stm32f10x_conf.h"
That file contains the only definition of the 'assert_param' macro I've found.
With that line added on top of the 4 .c files, my application build successfully.

I can't believe ST would deliver a library without the proper dependencies resolved, so, $1?

Offline

 

# 2   2011-08-23 12:27:08 Issues in the STM32 libraries

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

Re: Issues in the STM32 libraries

Hello I had the same problem but just soved it. I posted what i have done in another post

http://www.stm32circle.com/forum/viewto … 6530#p6530

best regards

Offline

 

# 3   2011-08-30 06:42:58 Issues in the STM32 libraries

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

Re: Issues in the STM32 libraries

For working, the library has normally to be configured by modifying the "stm32f10x.h" file.
Here are defined:
- use of library or not (USE_STDPERIPH_DRIVER macro),
- crystals values,
- STM32 family used...

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