[uClinux-dev] cortex-m3 user space exception

RK Raggit rk.raggit at gmail.com
Wed May 12 04:13:04 EDT 2010

Hi all,
I have taken the cortex-m3 architecture port from linux-arm
repository (http://linux-arm.org/linux-2.6-stable.git) and
have added my board support to it. My board boots and
can execute init(=/bin/sh) to give me a shell BUT ANY
simple program i try after that gives me a hard fault exception.
Here is a log (with prints enabled in fs/binfmt_flat.c) -

Machine: ICE
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 1016
Kernel command line: init=/bin/sh console=ttyAMA0,115200n8 mem=4M user_debug=31
PID hash table entries: 16 (order: 4, 64 bytes)
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 4MB = 4MB total
Memory: 3376KB available (444K code, 48K data, 108K init)
Calibrating delay loop... 5.44 BogoMIPS (lpj=27200)
Mount-cache hash table entries: 512
Serial: AMBA PL011 UART driver
stice-uart0: ttyAMA0 at MMIO 0x4e000000 (irq = 13) is a AMBA/PL011
console [ttyAMA0] enabled
Freeing init memory: 108K
start_thread(regs=0xcbf70, entry=0x160045, start_stack=0x17ffb8)
# ls
start_thread(regs=0x147fb0, entry=0x180045, start_stack=0x19ffa8)
        ---> HARDFAULT HERE

I am using a standard busybox (also from linux-arm site) which is known
to have run on a cortex-m3 based board. Also, when i try "init=/bin/ls" it
works, indicating the binary is fine.

What could be wrong ?


More information about the uClinux-dev mailing list