using readl, writel, ioremap in CW for Power Architecture V8.7 (Windows hosted)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

using readl, writel, ioremap in CW for Power Architecture V8.7 (Windows hosted)

3,575件の閲覧回数
Rudi
Contributor I
I want to design a simple Linux C-Application using the CodeWarriors Embedded Project Wizard.

Following my selections:
- Linker: EPPC Linux GNU Linker
- Application, language C
- GCC Toolchain: gcc-3.3.2-glibc-2.3.2
- Processor type: 83xx

To have I/O access to the registers memory map to the MPC8349 on my board
I added functions like readl, writel and ioremap.
For referencing these functions I included the headerfile 'asm/io.h'.

When I want to make the *.elf file the linker shows the error message like this:
undefined reference  to 'readl'.

Do I have to add any compiler or linker options?
In which libraries can I find these functions?
Does the linker using this library?
Is any important setting to do in the IDE?

Please let me know if anybody have an idea to make it work.
Thanks in advance.

ラベル(1)
タグ(1)
0 件の賞賛
返信
4 返答(返信)

1,004件の閲覧回数
Voxan
Contributor III
Hi Rudi,

you'll need to add the right access path to your project settings.
To do so please open your project settings\access paths and add the following to your user path:

{CW PA v8.7}\Cross_Tools\binary\Metrowerks\ppc\tools\gcc-3.3.2-glibc-2.3.2\powerpc-linux\include

Hope this helps...

Regards
0 件の賞賛
返信

1,004件の閲覧回数
Rudi
Contributor I
Hi Voxan,

thank you for your fast response .
I'm sorry to say that this try was without success.
The linker shows the error message again.
Also the try with added access path of 'sys-include' was without any success.
I'm without any idea at the moment.

Rudi

 
0 件の賞賛
返信

1,004件の閲覧回数
Voxan
Contributor III
Rudi,

2 points here, do an "#include "io.h"" in your c module and have the access path to point to the .../include/asm folder

Then you will need to take care of all #ifdef to reach you function (macros) definitions...

Hope this helps...

regards
0 件の賞賛
返信

1,004件の閲覧回数
Rudi
Contributor I
Hi Voxan,

as I figured out the main problem was my selected Project Type in the GNU Target settings panel.
Instead of Application I have to select Loadable Module.
With this option I get an errorfree message window.
It seems as if I doesn't can use these type of functions in an application.

Regards,
Rudi


0 件の賞賛
返信