NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
Hawk777 has joined #openocd
Hawk777 has quit [Quit: Leaving.]
tsal_ has joined #openocd
tsal has quit [Ping timeout: 246 seconds]
nerozero has joined #openocd
diddly has quit [Ping timeout: 252 seconds]
diddly has joined #openocd
van has quit [Quit: WeeChat 4.2.1]
van has joined #openocd
van has quit [Quit: WeeChat 4.2.1]
van has joined #openocd
balrog has quit [Ping timeout: 252 seconds]
balrog_ has joined #openocd
Hawk777 has joined #openocd
cambrian_invader has quit [Ping timeout: 252 seconds]
Guest63 has joined #openocd
<Guest63> Hi, I was looking through the definitions of flash devices openocd uses trying to debug an issue, and found that the w25q16jv NOR flash (used on rpi picos) is specified as having a sector size of 32KiB, even though the datasheet specifies that it has a sector size of 4KiB
<Hawk777> Are you sure OpeNOCD doesn’t specify 64k? That’s what this line looks like: https://sourceforge.net/p/openocd/code/ci/master/tree/src/flash/nor/spi.c#l129
<Guest63> The problem is that it /does/ specify 64KiB, the sector size of that flash is 4KiB
<Hawk777> Oh, you said in your first message “is specified as having a sector size of 32KiB”
<Guest63> yeah sorry, the definition in openocd is 32KiB, which is a supported block size of this flash for mass erasing/programming, but by specifying that as the sector size it locks me out of actually doing things at the granularity of the 4KiB sectors
<Hawk777> Wait, so OpenOCD is treating it as 32k? Because the number in the source code is 64k, not 32k.
<Hawk777> Anyway, it looks like the data is at least consistent, since the erase_cmd is specified as D8, which is the 64k erase command.
<Guest63> You're right it is 64, my bad
<Hawk777> So yeah I guess it doesn’t let you erase at smaller granularities, but at least it’s not wrong.
<Hawk777> Honestly it seems to me that the ideal representation would be a list of erase unit sizes and commands, and then a request to erase an arbitrary region could be served by commands of different sizes to fill up the space optimally. But that’s a whole project, I guess, which would take time.
<Guest63> Yeah, I'm building a patched build for myself, because i've got a memory map on the granularity of 4KiB that openocd is really struggling with as-is, was wondering if this would be something a patch would be accepted for
<Hawk777> I don’t know. Just changing the size and command would presumably hurt everyone who wants to erase larger regions by making that operation slower.
<karlp> you're also going to find that not all "w25" are the same wrt to sector sizes.
Hawk777 has quit [Quit: Leaving.]
cambrian_invader has joined #openocd
Hawk777 has joined #openocd
nerozero has quit [Ping timeout: 252 seconds]
Guest63 has quit [Quit: Client closed]
zjason has quit [Read error: Connection reset by peer]
zjason has joined #openocd