cambrian_invader has quit [Ping timeout: 260 seconds]
nerozero has joined #openocd
cambrian_invader has joined #openocd
Hawk777 has quit [Quit: Leaving.]
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
joconor has quit [Ping timeout: 256 seconds]
joconor has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
Haohmaru has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
alexd has joined #openocd
<alexd>
Hey everyone!
<alexd>
Anyone know if it is possible to run code (C, not Tcl) on target from inside `-event reset-init` ? The code is already on target (internal flash) and I want to run it to initialize external SDRAM.
<alexd>
I currently have Tcl code that reads/writes to registers to initialize SDRAM. But this is basically a copy of my C driver. I'm looking for a way to run the C code instead. Then I won't need to keep the C/Tcl in sync and I can support new boards more easily.
<alexd>
Any advice is much appreciated. (Even to tell me that this is a bad idea.)
<alexd>
I first thought to do this through GDB. But I don't really know how I can run GDB commands from inside Tcl script.
wingsorc has quit [Ping timeout: 240 seconds]
<karlp>
have you tried just using "reg" to reset the SP, and then "resume [address]" ?
<karlp>
you can probably just risk it and use resume directly, but that wll assume that SP is valid.
<karlp>
you'll have to set a breakpoint if you want to catch it finishing or anything though
<alexd>
Will the Tcl script continue after my function returns/hits breakpoint?
<alexd>
I will definitely try this. Thx
<PaulFertser>
alexd: you can add sw breakpoint function in your C code and use "resume XXX; wait_halt" in Tcl.
<alexd>
Ok, cool. That sounds like a plan
Bertl_zZ is now known as Bertl
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
alexd has quit [Quit: Client closed]
wingsorc has joined #openocd
alexd has joined #openocd
<alexd>
@karlp @PaulFertser I got this working now. `resume xxx; wait_halt` in Tcl and my C code has `asm("bkpt 255");` to "return". In linker script I always place the C function at the same address (after interrupt table). So I can hardcode the address in Tcl and this will keep working. Very very nice
erhankur has joined #openocd
<PaulFertser>
alexd: cool!
erhankur has quit []
diddly has quit [Ping timeout: 260 seconds]
diddly has joined #openocd
nerozero has quit [Remote host closed the connection]
lh has quit [Remote host closed the connection]
nerozero has joined #openocd
lh has joined #openocd
alexd has quit [Quit: Client closed]
nerozero has quit [Read error: Connection reset by peer]
nerozero has joined #openocd
nerozero has quit [Remote host closed the connection]
nerozero has joined #openocd
erhankur has joined #openocd
emeb has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Ping timeout: 248 seconds]
Haohmaru has quit []
Bertl is now known as Bertl_oO
HelloShitty has quit [Ping timeout: 248 seconds]
nerozero has quit [Ping timeout: 240 seconds]
erhankur has joined #openocd
wingsorc has quit [Quit: Leaving]
wingsorc has joined #openocd
wingsorc has quit [Ping timeout: 252 seconds]
wingsorc has joined #openocd
sbach has quit [Read error: Connection reset by peer]
sbach has joined #openocd
HelloShi1ty has joined #openocd
erhankur has quit [Remote host closed the connection]