NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
<c4017w_> Woohoo, it finally all works!
Hawk777 has quit [Quit: Leaving.]
thinkfat has joined #openocd
thinkfat_ has quit [Ping timeout: 265 seconds]
boru` has joined #openocd
boru has quit [Killed (NickServ (GHOST command used by boru`))]
boru` is now known as boru
tsal_ has joined #openocd
tsal has quit [Ping timeout: 245 seconds]
Hawk777 has joined #openocd
c4017_ has quit [Ping timeout: 256 seconds]
c4017 has joined #openocd
nerozero has joined #openocd
c4017w__ has joined #openocd
c4017w_ has quit [Ping timeout: 268 seconds]
Hawk777 has quit [Quit: Leaving.]
<_franck_> would it be possible to have binarybuffer.h functions endian aware ? For example, I'd like to use buf_to_hex_str on big endian datas in a buffer without an prior buffer manipulation to swap endian.
akaWolf has quit [Ping timeout: 246 seconds]
akaWolf has joined #openocd
Steffanx has quit [Ping timeout: 245 seconds]
akaWolf has quit [Ping timeout: 268 seconds]
akaWolf has joined #openocd
akaWolf has quit [Ping timeout: 255 seconds]
akaWolf has joined #openocd
Steffanx has joined #openocd
Hawk777 has joined #openocd
akaWolf has quit [Ping timeout: 265 seconds]
akaWolf has joined #openocd
guessnbl has joined #openocd
<guessnbl> I am trying to "flash write_image erase nuttx.bin 0x08000000" an stm32f103 minimum blue pill board, following some instructions here https://github.com/apache/incubator-nuttx/tree/master/boards/arm/stm32/stm32f103-minimum
<guessnbl> I get "no flash bank found for address 88000000" which seems strange because the target I am using specifies (and flash list seems to agree) that I have a flash bank starting at 0x08000000. Seems like a base/prefix address is being added in?
<guessnbl> "flash bank $_FLASHNAME stm32f1x 0x08000000 0x20000 0 0 $_TARGETNAME"
guessnbl has quit [Ping timeout: 246 seconds]
guessnbl has joined #openocd
<PaulFertser> guessnbl: still have issues?
<PaulFertser> guessnbl: why are you using flash write_image instead of the "program" helper?
<PaulFertser> guessnbl: how big is nuttx.bin?
<guessnbl> mmm... no particular reason. pretty sure I get the same error.
<guessnbl> I am actually flashing something much smaller.
<PaulFertser> guessnbl: please share -d3 log of an attempt somewhere.
<guessnbl> ok. will do!
nerozero has quit [Ping timeout: 265 seconds]
<guessnbl> I found the problem. My loader script has the incorrect location for flash. Would that do it? ;)
<guessnbl> yep. fixed my flash memory region in ld script and flash works :) problem solved. Thanks for the rubber duck-ing.
<guessnbl> success. My program is running. "(7) r7 (/32): 0xDEADBEEF"
<PaulFertser> guessnbl: then the bin file would be huge
<guessnbl> am following this example but using openocd instead of other tools: https://vivonomicon.com/2018/04/02/bare-metal-stm32-programming-part-1-hello-arm/
<PaulFertser> guessnbl: btw, I recommend to always use "program" and "elf" files directly. This way you avoid many issues like stale "bin" or "hex" files, wrong offset when you manually specify it etc.
<guessnbl> cool. will do. :) the instructions are a bit old I think.
<PaulFertser> guessnbl: alternatively, you can flash right from "gdb" by simple "load". And GDB will auto-reload the elf if you do "make" or change the elf otherwise.
<PaulFertser> I mean you can type "make" right into gdb prompt.
<guessnbl> right. I am not too experienced just yet. Mostly just following existing instructions, not knowing all the possibilities. Cool. :)
<guessnbl> PaulFertser thanks for chiming in. Super happy I have a nice little tiny program running. :) Can't quite get gdb working with openocd in this case but debugging/halt/reg etc in openocd are good enough for me "for now".
<guessnbl> Cheers :)
<PaulFertser> guessnbl: enjoy :) gdb usually works nicely, just do "tar ext :3333" there, "file <your.elf>" and that's it. You can use "load", continue/c, press C-c to halt etc.
<guessnbl> that worked! I was trying to do "target extended-remote :4444" ah... I see, "tar ext" is short for that and I was using the telnet port and not the gdb port right? :)
<guessnbl> (obv not thinking about what I was doing) :)
<PaulFertser> guessnbl: exactly
<guessnbl> radical. now I can happily progress with learning more assembly/raw firmware on stm32f103 min board :) I've done nuttx stuff before but want to practice with ld/asm more. :)
<guessnbl> cheers.
guessnbl has quit [Quit: Client closed]
<karlp> damnit, they left before we could tell them to stop copying shitty legacy "omg, asm!" bare metal crap tutorials
guessnbl has joined #openocd
<guessnbl> karlp: yeah, if you have some better tutorials send them my way. :) thanks.
<karlp> basically, consider what the goal is, and why and how you found something.
<karlp> and what the roadmap is.
<karlp> what sort of tutorial are you really looking for?
<karlp> the pain is that people try and expoand this "minimal" examples and then run into pain.
<karlp> pain² even.
<guessnbl> yeah, the roadmap is me learning how to load and interact with a device (openocd etc) and programming low-level (asm/C) :) pretty much fitting the bill so far and definitely appreciate the help.
<guessnbl> mm... right... good point. re: pain^2
<guessnbl> I am mostly interested in reverse engineering chips and booting sequences, so lots of practice/knowledge around memory, interfaces, bringup, that sort of thing is where I play.
<karlp> so, cortex-m banner feature was not requiring asm for startup, so anyone who just goes and does that is doign things old school for no reason.
<karlp> and that linker script is completel useless if you want to start _doign_ anything.
<guessnbl> well yeah, I've fiddled with linker scripts before for sure :) much more complex certainly.
<karlp> sounds like you might be luycky enough to know when that blog post will run out of steam, lots don't
<guessnbl> right on. :) I appreciate the wisdom of experience from ya for sure.
<PaulFertser> guessnbl: in this case https://blog.zapb.de/ would be of interest to you
<karlp> PaulFertser: how?
<karlp> there's 4 articles total, one of them is promo for the coming article.
<PaulFertser> karlp: it's directly related to reverse engineering chips with plenty of details
<PaulFertser> And guessnbl wants to learn that.
<guessnbl> appreciate it. more sources is cool. :)
<guessnbl> my RE target is mediatek SoCs, 2g->LTE :p but I have this real life that keeps getting in the way ;)
<guessnbl> have used openocd a bunch in the past with nuttx and osmocom-bb :gratitude:
<PaulFertser> osmocom-bb !
<guessnbl> yes. :) I have a sciphone dream g2 laying around that needs some open source baseband :p
guessnbl has quit [Quit: Client closed]