cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f756 uclinux - system hang on init

polimorphic
Associate II
Posted on November 30, 2015 at 13:53

hello

I make custom board with sdram and use stm32f756 chip.

Then I try to run modyfied my self version of uclinux (and u-boot) - but system hangs.

this is callstack that I build with 2 leds (early printk don't work)

/fs/super.c -> get_sb_single(...)

  hangs on  -> simple_set_mnt(mnt, s);

/fs/namespace.c -> void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb)

             hangs on -> mnt->mnt_root = dget(sb->s_root);

/include/linux/dcache.h -> static inline struct dentry *dget(struct dentry *dentry)

             hangs on  -> atomic_inc(&dentry->d_count);

/arch/arm/include/asm/atomic.h => atomic_inc(

  hangs on - atomic_add(

Run hangs in this asm code:

static inline void atomic_add(int i, atomic_t *v)

{

    unsigned long tmp;

    int result;

    

//stm32f7_gpio_led_on(1,1);

    __asm__ __volatile__(''@ atomic_add\n''

''1:    ldrex    %0, [%2]\n''

''    add    %0, %0, %3\n''

''    strex    %1, %0, [%2]\n''

''    teq    %1, &sharp0\n''

''    bne    1b''

    : ''=&r'' (result), ''=&r'' (tmp)

    : ''r'' (&v->counter), ''Ir'' (i)

    : ''cc'');

//stm32f7_gpio_led_on(1,0);

//stm32f7_gpio_led_on(0,1);

}

this function is call many times but in this order fail (hangs always on this place).

I run ram test in u-boot - but all is ok.

Does anyone have a similar problem or know what's up?

#uclinux
1 REPLY 1
polimorphic
Associate II
Posted on November 30, 2015 at 15:20

I might add

- board is 4 layer (2 layer supply) -sdram tracks are max 12cm - length matched, differences are max 2,5cm.

EDIT.

Wrong tracks length matching. Kernel loaded to other address run different.