Trying to run from SRAM in debug mode

hello there, I am trying to port NET+OS 5.0 to a self developed board which has a NET+50, 4MB SRAM (2 x 16 bits) and 4MB 16-bit wide flash. I am using GNU-Tools with raven. I am able to download the debug.x image via the raven using the following settings. ######################################################## echo Setting up the environment for debugging gdb.
set complaints 1 set output-radix 16 set input-radix 16 set endian big dir . set prompt (netsilicon-gdb) # This connects to a target via netsiliconLibRemote # listening for commands on this PC’s tcp port 8888 # target remote localhost:8888 # Set netSiliconLibRemote to write short/long values # in big-endian monitor endian big # Set GDB in big-endian set endian big # Reset the chip to get to a known state. monitor reset monitor halt # NET50 INITIALIZATION VALUES monitor long 0xffb00000 = 0x4004a000 monitor long 0xffb00028 = 0x00400000 monitor long 0xffb00030 = 0x00000000 monitor long 0xffc00034 = 0x00000f04 monitor long 0xffc00030 = 0x00000001 monitor long 0xffc00010 = 0x00000000 monitor long 0xffc00000 = 0x00000000 monitor long 0xffc00024 = 0xffc00033 monitor long 0xffc00020 = 0x00000005 monitor long 0xffc00030 = 0x00000000 monitor long 0xffc00034 = 0x00000000 monitor long 0xffb00008 = 0x09000e1e # Set Registers to known value set $r0 = 0 set $r1 = 0 set $r2 = 0 set $r3 = 0 set $r4 = 0 set $r5 = 0 set $r6 = 0 set $r7 = 0 set $r8 = 0 set $r9 = 0 set $r10 = 0 set $r11 = 0 set $r12 = 0 set $sp = 0x80000 set $lr = 0 set $pc = 0 set $cpsr = 0xd3 set $r13 = 0 set $r14 = 0 set $r15 = 0 # Setup GDB FOR FASTER DOWNLOADS set remotewritesize 1024 set remotewritesize fixed # Load the program executable called “debug.x” load debug.x # Load the symbols for the program. # start the loaded image # continue ########################################################## I disabled the SD-RAM workaround in init.s. I can now step through init.s. The code now sets pll and flash. Since the valid bit of cs0 is not set, it does not touch the cs1 configuration. It then sets supervisor stack at adr. 0x100 with a size of 0x100 too. Then it jumps to ncc_init. In this routine, the first command causes a crash to the netarm (mov r12,sp). Insight then shows that all register values (including pc) are 0x0 and the netarm is no longer accessible. Anyone any idea why is that? Is the stack setup wrong? thx in advance, andre

the crsh is probably caused not by the instruction you mentioned but by something that happened before. put breakpoint in Reset_handler_rom , whaen it stops there ,see if you can write-then-read SDRAM from GDB console. if it works - go to the instruction that causes crash, and do it again - find what instruction causes the crash .also put breakpoint at every exception vector) 2 most likely reasons: 1) writing/reading to/from non exesting memory 2) SDRAM is not configured right (eventiualy it will cause (1) )