NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
flatmush has quit [Ping timeout: 276 seconds]
flatmush has joined #openocd
loki_val has quit [Ping timeout: 265 seconds]
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Ping timeout: 260 seconds]
crabbedhaloablut has joined #openocd
rigid_ has quit [Ping timeout: 276 seconds]
rigid has joined #openocd
rigid has quit [Changing host]
rigid has joined #openocd
Hawk777 has joined #openocd
nerozero has joined #openocd
flatmush has quit [Ping timeout: 258 seconds]
flatmush has joined #openocd
polprog has quit [Ping timeout: 246 seconds]
polprog has joined #openocd
KindOne_ has joined #openocd
KindOne has quit [*.net *.split]
bencoh has quit [*.net *.split]
KindOne_ is now known as KindOne
bencoh has joined #openocd
tlwoerner_ has quit [Quit: Leaving]
tlwoerner has joined #openocd
sugarbeet has quit [Ping timeout: 248 seconds]
sugarbeet has joined #openocd
JakeSays has joined #openocd
JakeSays_ has quit [Ping timeout: 252 seconds]
PaulFertser has quit [Ping timeout: 260 seconds]
Hawk777 has quit [Quit: Leaving.]
Haohmaru has joined #openocd
PaulFertser has joined #openocd
Foxyloxy has quit [Read error: Connection reset by peer]
Foxyloxy has joined #openocd
braunr_ has joined #openocd
braunr has quit [Remote host closed the connection]
HelloShi1ty has joined #openocd
HelloShitty has quit [Ping timeout: 248 seconds]
KindOne has quit [*.net *.split]
crabbedhaloablut has quit [*.net *.split]
defiant has quit [*.net *.split]
nathanhi- has quit [*.net *.split]
indy has quit [*.net *.split]
renrelkha_ has quit [*.net *.split]
youthpastor has quit [*.net *.split]
dinkelhacker has quit [*.net *.split]
xantoz has quit [*.net *.split]
Bertl has quit [*.net *.split]
zear has quit [*.net *.split]
van has quit [*.net *.split]
KindOne has joined #openocd
crabbedhaloablut has joined #openocd
nathanhi- has joined #openocd
indy has joined #openocd
defiant has joined #openocd
xantoz has joined #openocd
renrelkha_ has joined #openocd
youthpastor has joined #openocd
dinkelhacker has joined #openocd
van has joined #openocd
zear has joined #openocd
Bertl has joined #openocd
braunr_ is now known as braunr
<karlp> sometimes you're limited by the flash, sometimes by transport speeds.
HelloShi1ty has quit [Ping timeout: 260 seconds]
HelloShitty has joined #openocd
<gamiee> karlp: yeah. i am happy that i am limited with transport speeds right now
<karlp> are you working on boufallo stuff? might be because the "flash" is sram fronted internally anyway?
guestinator has quit [Remote host closed the connection]
guestinator has joined #openocd
guestinator has quit [Remote host closed the connection]
guestinator has joined #openocd
<gamiee> karlp: yes, currently on bl702, but will work on others as well.
<gamiee> and the devkit I have does have external winbond SPI Flash.
<gamiee> I did not tried flashing internal Flash yet (procedure is same), that will be task of upcoming days :P
Deneb has joined #openocd
guestinator has quit [Remote host closed the connection]
guestinator has joined #openocd
<gamiee> yay! Reading integrated flash works too!
<gamiee> Atleast in this BL706, in the chip is 'mac 25l8005' (ID 0x001420c2)
Haohmaru has quit [Quit: saionara]
<gamiee> Although, I am encountering one issue. The flash base is specified as 0x2300_0000. In reality, this is base address of eXecute In Place (XIP) peripheral, which also features option to specify offset address. So in reality, in SPI Flash, on 0x0000 is boot header, and on 0x2000 is code. But execution address is 0x2300_0000, in boot header is 0x2000 offset specified. The question is, when gdb's "load" function is used to write elf, I guess it tries to write it
<gamiee> into area according to LMA. Although I am really not sure how to do this. Please, does anyone have any suggestions please?
<PaulFertser> gamiee: probably like target/rp2040.cfg: flash bank $_CHIPNAME.alias virtual 0x10000000 0 0 0 $_TARGETNAME_1 $_FLASHNAME
<gamiee> ooooh rp2040 does that???? going to take look on it, thanks!!!
merethan has joined #openocd
<gamiee> PaulFertser: but uhh, I am bit confused how it works :(
<PaulFertser> gamiee: I guess you can define aliases for the flash memory, then they will be mentioned in the memory map and GDB will be using them as flash.
<gamiee> PaulFertser: oh okay. But I am not quite sure how I can use this to solve my problem :( The problem is, that the XIP offset is specified in Boot Header, so basically, OpenOCD/GDB doesn't know where to actually load the firmware, unless it parses boot header.
<gamiee> I got an idea, that app flash offset will be specified as parameter to flash bank driver command.
<gamiee> Thus if driver will see writes into XIP area, it will write it to the flash + offset. But it's.... not sure if it's best idea.
<PaulFertser> gamiee: I do not exactly follow, sorry. The real mapping between the addresses used by code while executing and the flash can be arbitrarily specified by the code itself?
<gamiee> PaulFertser: sorry for confusion. When BootROM wants to launch user app in Flash, it firstly reads data from Flash offset 0x0, which contains Boot Header. This boot header contains "flash_offset" field, which specifies, where is the code is. Then BootROM takes this offset, and configures XIP, that it should use offset 0x2000. That means, on 0x2300_0000, there are contents from 0x2000. (This feature is used also for A/B firmwares, so you can have same
<gamiee> firmware on two locations in Flash, and just use different flash_offset configuration in XIP).
<gamiee> So, since the VMA and LMA of the code in .elf is specified to 0x2300_0000, my driver flashes it to Flash offset 0x0. But on 0x0, there must be boot header, and according boot header, the code must be (most usually it is) on Flash offset 0x2000.
<PaulFertser> gamiee: what does readelf say about program headers for such an ELF?
<PaulFertser> gamiee: I know regular MCU ELFs which contain some initial values for the globals are loaded properly to flash addresses despite the fact the code expects all those variables at a different address when running.
guestinator is now known as lh_
<gamiee> PaulFertser : I am just working on it now, I think I got it to do exactly what I need
<gamiee> https://paste.debian.net/hidden/67644590/ I solved it like this, and I don't need to modify anything in OpenOCD, yay!
Guest1414 is now known as ringo
nerozero has quit [Ping timeout: 264 seconds]
merethan has quit [Ping timeout: 258 seconds]
<PaulFertser> gamiee: cool! Yes, that's what I implied, that something needs to be fixed in the linker script.
bacam has quit [Quit: reboot]
bacam has joined #openocd
Deneb has quit [Quit: Leaving]
merethan has joined #openocd
merethan has quit [Ping timeout: 252 seconds]
lh_ has quit [Remote host closed the connection]
guestinator has joined #openocd
joconor has quit [Quit: ZNC 1.8.2 - https://znc.in]
joconor has joined #openocd
vampirefrog has joined #openocd