Linux Debug

From ArmadeusWiki
Revision as of 12:25, 19 September 2006 by 217.128.254.186 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
    • Tips to do debug under linux **

Introduction

On this page, you will find usefull informations for debugging Armadeus under Linux

Testing Linux kernel

You can test a linux kernel you've generated without to have to reflash your board and destroy your currently working image. Indeed Linux kernel images can be loaded and started from RAM:

BIOS> tftpboot 0x08800000 linux-kernel-2.6.16-arm.bin
BIOS> bootm 0x08800000

imxregs

This tool allows you to access iMX registers from linux userspace/console. This way you debug your driver or access iMX hardware functionnalities directly from Linux console.

First, you have to go in software/target/linux/debug/imxregs/ directory and build the tool:

$ make clean
$ make
$ cp imxregs /your/nfs/shared/dir/

To use it, you must clear PAR 1&2 registers (register access rights) before launching Linux kernel, so in U-Boot type:

BIOS> mw.l 0x00200008 0
BIOS> mw.l 0x00210008 0

Then in linux, launch it like that:

# imxregs REGISTER_NAME  (give it the register name as printed in iMX Ref Manual or just the begining of the name)

or

# imxregs    (to dump all supported registers)

Examples:

Show OCR1 registers of each GPIO Port:

# imxregs OCR1

TBDL

Links

http://www.armadeus.com