EmbDev.net

Forum: ARM programming with GCC/GNU tools how can I get rid of impure_ptr ?


Author: anotherbrick (Guest)
Posted on:
Attached files:

Rate this post
0 useful
not useful
hello dear forum ,

I am trying to compile a C program for STM32F407 microcontroller
with OlimexODS  ( Eclipse + yagarto compiler )

I get the error;

undefined reference to `_impure_ptr'

there is no function "impure_ptr" in my whole project
the error pointer points to a line containing only }   - see attached 
screenshot


yagarto version :
--------------------------------------------
This build of yagarto use the following versions:

binutils: 2.20.1
gcc: 4.5.1
newlib: 1.18.0
gdb: 7.1

(13.08.2010, mifi)
-----------------------------------
In my code I include
#include <stdio.h>
#include <string.h>

this must be something related to C compiler however I dont know what

how can I get rid of this ?

thanks

Author: Johann L. (gjlayde)
Posted on:

Rate this post
0 useful
not useful
Don't use a debugger, it won't tell you the root of the problem.

Read the map file, generated with -Wl,-Map,filename.map and what object 
needs _impure_ptr.  Presumably it's not a function but an object needed 
by functions from libc.

You can also read the generated assembly (*.s) and precompiled sources 
(*.i resp. *.ii) by means of -save-temps -g3 -P and ready them to find 
what causes the problem, but most likely you will find the information 
in the map file.

Maybe a
void *_impure_ptr;
 kludge in one module does what you want.

Are you sure you don't have a misconfigured toolchain and no objects / 
libraries are missing for some reason?

The problem is not in the compiler, dig newlib.

Author: anotherbrick (Guest)
Posted on:

Rate this post
0 useful
not useful
Are you sure you don't have a misconfigured toolchain and no objects / 
libraries are missing for some reason?

The problem is not in the compiler, dig newlib.

I suspect exactly the same thing

there must be a switch or a property to be turned off

to turn off the compiler or linker option
which causes this error

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.