boru has quit [Killed (NickServ (GHOST command used by boru`))]
boru` is now known as boru
tsal has quit [Ping timeout: 268 seconds]
tsal has joined #openocd
The_Jag_ has joined #openocd
The_Jag has quit [Ping timeout: 258 seconds]
Hawk777 has joined #openocd
tomtastic has quit [Ping timeout: 258 seconds]
tomtastic_ has joined #openocd
tomtastic_ has quit [Ping timeout: 264 seconds]
tomtastic has joined #openocd
tomtastic has quit [Ping timeout: 264 seconds]
tomtastic has joined #openocd
Bertl_oO is now known as Bertl_zZ
nerozero has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Haohmaru has joined #openocd
_franck_5 has joined #openocd
_franck_ has quit [Ping timeout: 245 seconds]
_franck_5 is now known as _franck_
zjason` is now known as zjason
wingsorc has quit [Remote host closed the connection]
Bertl_zZ is now known as Bertl
indy has quit [Read error: Connection reset by peer]
indy has joined #openocd
indy has quit [Ping timeout: 260 seconds]
indy has joined #openocd
Haohmaru has quit []
abg has joined #openocd
<abg>
is there a step-by-step guide for newbies to use openocd and jlink for nrf52?
<PaulFertser>
abg: hi
<abg>
hello
<PaulFertser>
abg: there's the official user manual. Do you have any specific questions?
<abg>
so i can connect to the chip and run some commands (i think). now, i tried running this - $OPENOCD/bin/openocd -s $OPENOCD/share/openocd/scripts -f interface/jlink.cfg -c 'transport select swd' -f target/nrf52.cfg -c 'program target/thumbv7em-none-eabihf/release/rcfw.hex verify reset exit'
<abg>
and the output led me to believe everything was fine, but the code was not running (no io no nothing)
<PaulFertser>
abg: that looks a bit odd as it's assuming you didn't install OpenOCD the normal way but should work ok.
<PaulFertser>
abg: if you're using softdevice functions you probably needed to flash the softdevice binary too? Or are you using NimBLE stack or something else like that?
<abg>
i then tried the command 'nrf5 mass_erase', printed a bunch of stuff, now the last line printed is "Info : SWD DPIDR 0x2ba01477" and does nothing more :(
<abg>
i installed it a bit differently yes cuz i also have some other rpi2040 fork of openocd. i am not using any softdevice functions, dunno what that means but i assume some kind of bootloader?
<abg>
i only want to use the jlink for programming
<abg>
i googled softdevice. no, the firmware is some rust code
<abg>
the code atm is very simple, just prints some stuff on a uart. recently switched devkits to the dongle pcb and want to get stuff up and running. i am pretty sure the code is fine since i can run it on another devkit (where i program stuff with some bootloader and pyocd, no jlink)
<abg>
if i run openocd with the --debug flag, i see this line: Debug: 193 29 command.c:590 run_command(): Command 'init' failed with error code -4
<abg>
but i cannot figure out what that means, or if related
<abg>
and again, all this started happening after running nrf5 mass_erase
<PaulFertser>
abg: please use some pastebin to show what happens now if you use the "program" command again.
<PaulFertser>
abg: I see. Hm, what happens if instead of program you do "adapter speed 100; init; reset halt"?
<abg>
oh this is good! it goes further and i can telnet
<abg>
similar behavior as before running mass_erase
<abg>
what does this do?
<abg>
found it in docs, and i see the value before would be 1000 from target/nrf52.cfg
nerozero has quit [Ping timeout: 260 seconds]
<PaulFertser>
abg: my guess is that 1000 is too much somehow for your configuration.
<PaulFertser>
abg: so you can try to "program" again with this lower speed.
<abg>
yeah programming seems to work, but still the weird behavior. i'll take a look at the binary and datasheet, at least i know that the jlink is not the problem anymore
<abg>
thank you paul :)
<PaulFertser>
abg: good luck! I want to also remind you that you can actually do step-by-step debugging with OpenOCD.
<PaulFertser>
abg: connect gdb and debug your firmware from reset vector.
<PaulFertser>
abg: probably you just have wrong memory map and your MCU has less than expected?
<PaulFertser>
abg: I mean the amount of SRAM
<abg>
the build system assumes an nrf52840 specifically so not sure, but I'm going for the gdb approach indeed
<PaulFertser>
abg: you can try "flash info 0" and it might show your MCU model and probably SRAM size.
<abg>
still poking, i started from scratch on a new cargo project. i'm pretty sure the problem is with the rust side of things, in gdb i see the correct code being executed (at least same as in ida). i am trying to do sanity checks
<PaulFertser>
abg: I see, hope you figure it out soon.
crabbedhaloablut has quit [Remote host closed the connection]