NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
wingsorc has quit [Remote host closed the connection]
wingsorc has joined #openocd
wingsorc has quit [Quit: Leaving]
fabien has joined #openocd
fabien is now known as treguy
<treguy> Hi. I have a a raspberry pico clone with an unrecognised NOR flash. I managed to rebuild openocd to add the flashid and it works for me but 1/ I could not find the manufacturer (marking is "sy25q80") ans 2/ I only tried to flash, I don't know if there is a standard test to check that all functions are working, size is right, ...
urja has quit [Read error: Connection reset by peer]
urja has joined #openocd
<borneoa___> treguy: if I remember correctly, through the flash ID and some other read only value you can get the manufacturer of the flash. Sometimes the marking does not match completely the P/N, but knowing the manufacturer you can compare the real marking with the markings reported on their datasheets
<treguy> borneoa___: Yes, I've tried googling the manufacturer_id part of the chip_id but no luck.
<borneoa___> treguy: can you post them here for reference. You could also post a patch in OpenOCD Gerrit if you want to add support for it
MGF_Fabio has joined #openocd
<treguy> diff --git a/src/flash/nor/spi.c b/src/flash/nor/spi.c
<treguy> + FLASH_ID("unknown sy25q80", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x00146085, 0x100, 0x10000, 0x100000),
<treguy> As I said, it "works for me" but I just duplicated some other values (could not find a datasheet) and just used it for two weeks. I did not try to conduct any test but if you can guide me I could run them.
<treguy> I have this chip on two different board I ordered six months appart from two different sellers. Both have the same pcb marked "rp2040-a". I like them because of the reset button. (https://vi.aliexpress.com/item/1005005725307436.html)
<treguy> (github oauth did not work on openocd gerrit and I don't have an account for the other oauth)
<PaulFertser> treguy: hm, how come, you're the first to complain about github oauth not working for gerrit.
<PaulFertser> treguy: I can check the logs for details
<treguy> I hade a "server error" page after redirect
<treguy> I can try again
<treguy> ok, it worked this time :D
<treguy> I'll submit a patch during the day
<PaulFertser> treguy: have you checked if it's already known to flashrom?
<treguy> PaulFertser: I'm not really sure I understand the question, but what is sure is that I could not flash with the latest release, so I DLed the code, added the line I pasted here at 8:58, compiled and it started working.
<PaulFertser> treguy: that's clear
<PaulFertser> treguy: I just thought probably people more experienced with all kinds of flash chips have already taken care of this one in another project called flashrom. But apparently not.
<treguy> ho, ok : I looked got the chip id on google and github and did not find it anywhere.
<PaulFertser> OK, guess it's as good as it gets then.
<PaulFertser> Thank you!
<treguy> real small contribution, thank to the openocd team for allowing me to... loose hundreds of hours on silly useless projects ^^
treguy has quit [Remote host closed the connection]
treguy has joined #openocd
Haohmaru has joined #openocd
fabien_ has joined #openocd
treguy has quit [Ping timeout: 256 seconds]
bvernoux has joined #openocd
merethan has joined #openocd
fabien__ has joined #openocd
fabien_ has quit [Remote host closed the connection]
erru has joined #openocd
<erru> hello, i have a question regarding openocd. help is appreciated.
<erru> can anyone tell me where i can find the definition of the command "flash write_image"?
<erru> i have a hard time finding it by grepping on the sources of openocd. is it defined somewhere else? i'm looking for it, since i cannot execute the command. openocd tells me: "invalid subcommand "write_image at91bootstrap.cfg 0x10000000""
<erru> if anyone knows a workaround for that, i would be a happy camper
<Haohmaru> no clue but i think besides the C code there is also tcl or some other kinds of scripting involved
<erru> well, yeah it's c or jim-tcl
<PaulFertser> erru: hi
<erru> but when grepping on all files using 'grep -rn "flash write_image", i only get a handfull of files, all of which are instances of usage, no declaration / definition, except a docstring
<PaulFertser> erru: it's in src/flash/nor/tcl.c
<PaulFertser> erru: but why do you really need it?
<erru> i want to flash a new bootstrap.bin to my board and the "flash write_image" is not working since it does not recognise write_image as a valid sub command
<PaulFertser> erru: please show full OpenOCD output with full command you're running.
<erru> give me a sec
<PaulFertser> erru: do you have flash bank defined for your target? Does "flash info 0" work?
<erru> i get "invalid subcommand info 0"
<erru> here is the output of "help flash"
<erru> > help flash
<erru> flash bank bank_id driver_name base_address size_bytes chip_width_bytes
<erru> flash
<erru> bus_width_bytes target [driver_options ...]
<erru> NOR flash command group (command valid any time)
erru has quit [Excess Flood]
<Haohmaru> much paste, very flood
fabien_ has joined #openocd
erru has joined #openocd
<PaulFertser> erru: please use some pastebin to show stuff
<PaulFertser> erru: also show your config file and full invocation command line
<erru> @PaulFertser yea, sorry
fabien__ has quit [Ping timeout: 272 seconds]
<PaulFertser> erru: I need to see config and invocation command line
<erru> openocd.cfg contains 2 lines
<erru> source [find interface/olimex-jtag-tiny.cfg]
<PaulFertser> And the other?
<erru> source [find target/at91sam9g45.cfg]
<erru> it is very well possible that you may not be able to find the interface/olimex thing
<PaulFertser> erru: ok, this one just doesn't define any flash at all, probably no driver was ever written.
<karlp> it has no flash,
<karlp> it's an mpu, arm926.
<PaulFertser> Heh, no wonder then.
<erru> well, guess that explains it then... do i need to roll my own?
<PaulFertser> erru: do you have flash connected to it? What kind of flash and how exactly is it connected?
<karlp> maybe, maybe not, depends where and how the flash is actually connected, if at all :)
<karlp> yeah, what he said...
<erru> okay, so the official wiki page explains the layout. https://wiki.in-circuit.de/index.php5?title=Memorymapping_of_ICnova_SAM9G45_OEM
<erru> does that help?
<karlp> you should speak to those people about what else they have in either their openocd config files, or their fork then...
<karlp> "A pre-patched version of the software can be found on a recent version of the support-CD for your board. "
<erru> okay, thank you guys! at least a small step :)
<karlp> the wiki links to their version, or it might hav eone day, but it's a dead link now...
<PaulFertser> erru: so you have it there, don't you see what kind of flash IC is connected?
<PaulFertser> erru: where's the schematics?
<karlp> https://in-circuit.de/shop/icprog/ might have the downloads?
<erru> i need some time to find out which one in particular the flash chip is so i can look it up
<PaulFertser> erru: and are you trying to change NOR flash or NAND flash?
<erru> but on this page https://wiki.in-circuit.de/index.php5?title=OpenOCD they state, that flashing should be possible without further configuration...
<karlp> _with their patched openocd_
<karlp> and whatever they may have added to the target file...
<PaulFertser> erru: OpenOCD needs to know what flash and where it is connected
<erru> i'm not sure if they added anything to their configs at this point tho. they do provide one config file in board/ but its for a different module
<PaulFertser> E.g. there's a config for this board target/at91sam9260_ext_RAM_ext_flash.cfg which has an example of CFI compatible NOR flash attached.
<PaulFertser> erru: just look at schematics
<erru> i will check for if anything fits. if i cant find anything and icnova dont know anything, i will check back with you if that's okay
<PaulFertser> erru: they do not know schematics of their own boards?
<karlp> is board/icnova_sam9g45_sodimm.cfg correct for your board?
<karlp> because it has cfi flash setup...
<PaulFertser> Eh, it also has special steps for that "Setup SMC for NOR Flash"
<karlp> the commit log says that NAND doens't work though, if that is the flash you want to use :)
<erru> i want to use the nor flash which should start at address 0x10000000
<karlp> so, check whether the sodimm is compatible with the OEM verison, or check wahte hw you actualy have in front of you :)
<erru> will do
<karlp> if the OEM one is different tot he sodimm one, you should be able to follow what the sodimm one is doing and add it tyour own new config file though.
<karlp> I cant' find their openocd source anywwhere though, it's not on the dwonloads page, always just links to the shop, and the shop only links to the wiki.
<erru> yea, there are probably minimal changes involved, it just won't be so easy to know which ones :S
<erru> the nor flash ICs used are macronix
<erru> MX29LV040CTI-70G
<PaulFertser> So it's CFI compatible, very good.
<PaulFertser> If you think it's connected using 16-bits wide bus just give that sodimm config file a try.
<erru> allrighty
<erru> with the sodimm config i can execute flash erase_sector but the output is https://pastebin.com/uyAQ3mew
<erru> what is a QRY?
fabien__ has joined #openocd
fabien_ has quit [Remote host closed the connection]
<PaulFertser> erru: not able to talk to CFI flash on that address.
<erru> okay, i figured out that i had to put the plug back into the outlet... the flashing worked with that setup. thank you for your help!
slobodan has joined #openocd
erru has quit [Quit: ERC 5.6-git (IRC client for GNU Emacs 30.0.50)]
<karlp> I wonder what "plug back into the outlet" meant?
<karlp> board not powered?
* karlp shrugs. another happy customer!
fabien_ has joined #openocd
fabien__ has quit [Ping timeout: 256 seconds]
fabien_ has quit [Quit: Leaving]
Hawk777 has joined #openocd
slobodan has quit [Remote host closed the connection]
slobodan has joined #openocd
MGF_Fabio has quit [Ping timeout: 260 seconds]
Haohmaru has quit [Quit: saionara]
gzlb has quit [Ping timeout: 260 seconds]
gzlb has joined #openocd
russ has joined #openocd
merethan has quit [Ping timeout: 256 seconds]
slobodan has quit [Read error: Connection reset by peer]
slobodan has joined #openocd
slobodan has quit [Ping timeout: 256 seconds]
slobodan has joined #openocd
slobodan has quit [Remote host closed the connection]
slobodan has joined #openocd
nerozero has quit [Read error: Connection reset by peer]
nerozero has joined #openocd
slobodan_ has joined #openocd
slobodan has quit [Ping timeout: 246 seconds]
slobodan__ has joined #openocd
slobodan_ has quit [Ping timeout: 260 seconds]
slobodan_ has joined #openocd
slobodan__ has quit [Ping timeout: 246 seconds]
nerozero has quit [Ping timeout: 246 seconds]
slobodan_ has quit [Read error: Connection reset by peer]
slobodan_ has joined #openocd
bvernoux has quit [Quit: Leaving]
slobodan_ has quit [Ping timeout: 268 seconds]
dliviu has quit [Ping timeout: 268 seconds]
dliviu has joined #openocd
Hawk777 has quit [Quit: Leaving.]