NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
nerozero has joined #openocd
Hawk777 has joined #openocd
crabbedhaloablut has quit [Ping timeout: 248 seconds]
crabbedhaloablut has joined #openocd
vampirefrog has quit [Read error: Connection reset by peer]
vampirefrog has joined #openocd
memset has quit [Remote host closed the connection]
cyrozap_ has joined #openocd
zmatt has joined #openocd
h4x0riz3d has joined #openocd
uartist has quit [Read error: Connection reset by peer]
cyrozap has quit [Remote host closed the connection]
antto has quit [Remote host closed the connection]
zmatt- has quit [Ping timeout: 246 seconds]
nerozero has quit [Ping timeout: 246 seconds]
nerozero has joined #openocd
Haohmaru has joined #openocd
Hawk777 has quit [Quit: Leaving.]
MGF_Fabio has joined #openocd
rigid has quit [Read error: Connection reset by peer]
rigid has joined #openocd
rigid has quit [Changing host]
rigid has joined #openocd
rigid has quit [Read error: Connection reset by peer]
rigid has joined #openocd
rigid has quit [Changing host]
rigid has joined #openocd
rigid has quit [Read error: Connection reset by peer]
rigid has joined #openocd
rigid has quit [Changing host]
rigid has joined #openocd
Guest19 has joined #openocd
<Guest19> Hi,
<Guest19> I've recently swapped from using a Windows 10 laptop to a Pi4 with Ubuntu 24.04 LTS for flashing a board.  I was using openocd Open On-Chip Debugger 0.10.0+dev-1.0.0.277 (2019-10-11-11:05) on Windows and now have openocd Open On-Chip Debugger 0.12.0 on the Pi.  I am facing errors with this swap - my first question is:
<Guest19> Is this the right place to discuss this, and if not, where?
<karlp> this is fine.
<karlp> (always bet to just ask, don't ask to ask)
<Guest19> Thx (easier to seek forgiveness than permission ;-) )
<Guest19> So, originally on Windows I was using (as an example):
<Guest19> openocd.exe -s ../scripts -f interface/kitprog3.cfg -f target/traveo2_4m.cfg -c "init; reset init; traveo2 sflash_restrictions 1; program D:/Software/VIP/B2_VirginFlash/vHsmCombined.srec verify; shutdown"
<Guest19> I transferred all the target s/w to the Pi and ran:
<Guest19>  openocd -s /usr/share/openocd/scripts -f interface/kitprog.cfg -f target/traveo2_4m.cfg -c "init; reset init; traveo2 sflash_restrictions 1; program /home/flash/Downloads/VIP/B2_VirginFlash/vHsmCombined.srec verify; shutdown"
<Guest19> Which fails with:
<Guest19> Licensed under GNU GPL v2
<Guest19> For bug reports, read
<Guest19> Info : only one transport option; autoselect 'swd'
<Guest19> DEPRECATED! use 'adapter speed' not 'adapter_khz'
<Guest19> Warn : DEPRECATED! (/usr/share/openocd/scripts/target/traveo2_68m_common.cfg:6) use 'expr { (126 << 16) | 16 }' not 'expr (126 << 16) | 16'
<Guest19> Warn : DEPRECATED! (/usr/share/openocd/scripts/target/traveo2_68m_common.cfg:7) use 'expr { (96 << 16) | 512 }' not 'expr (96 << 16) | 512'
<Guest19> DEPRECATED! use 'adapter name' not 'adapter_name'
<Guest19> ** Test Mode acquire not supported by selected adapter
<Guest19> Warn : DEPRECATED! (/usr/share/openocd/scripts/target/traveo2_68m_common.cfg:53) use 'expr { (1 << 24) | (1 << 25) | (1 << 27) | (1 << 29) | (1 << 31) }' not 'expr (1 << 24) | (1 << 25) | (1 << 27) | (1 << 29) | (1 << 31)'
<Guest19> Warn : DEPRECATED! (/usr/share/openocd/scripts/target/traveo2_68m_common.cfg:55) use 'expr { (1 << 24) | (1 << 25) | (1 << 27) | (1 << 29) | (1 << 31) }' not 'expr (1 << 24) | (1 << 25) | (1 << 27) | (1 << 29) | (1 << 31)'
<Guest19> Error: flash driver 'traveo22' not found
<Guest19> This is with the "missing" cfgs moved over from Windows as they don't exist on the Linux installation.  I have also tried copying the entire older Windows scripts folder over to the Pi and running, specifying this scripts folder but still no joy.
<Guest19> Is it the case that some of the interface and target cfgs have become more inclusive, such that I need to find the correct new version?
<PaulFertser> Guest19: please in the future use some pastebin and avoid pasting more than 2 lines into a public channel.
<PaulFertser> Guest19: you shouldn't be mixing configs with binaries from unrelated version.
<PaulFertser> Guest19: were you using upstream OpenOCD on Windows 10 laptop?
<Guest19> It's a version that comes with (but is independent to) an IDE from Cypress
<Guest19> As in, it stands alone from the IDE, it was just bundled with it
<Guest19> Is it likely the case that it is modded?
<PaulFertser> Guest19: they must provide you with full corresponding GPL source for that.
<PaulFertser> Guest19: ask your FAE for full source code, they MUST give it.
<PaulFertser> Then you'll build it for GNU/Linux, that should be easy.
<Guest19> Just checked - the distro does come with a source folder that contains patches
bryanb has quit [Remote host closed the connection]
geep has quit [Remote host closed the connection]
lh has quit [Remote host closed the connection]
<PaulFertser> Time to build from source then.
geep has joined #openocd
bryanb has joined #openocd
lh has joined #openocd
<Guest19> So these patches will apply to the specific version they used as a base (0.10.0)?  And their mods provide the extra '+dev-1.0.0.277' to the version info?
<PaulFertser> Guest19: something about that but I can't know for sure
rigid has quit [Read error: Connection reset by peer]
<PaulFertser> Guest19: they must provide you full corresponding source code, not just the patches.
<Haohmaru> probably, you could also try to use the patches onto the latest openocd but i'd think 99% it won't build or won't work properly
<Haohmaru> have they modified openocd to work with their chips?
rigid has joined #openocd
rigid has quit [Changing host]
rigid has joined #openocd
<Guest19> Possibly - there are 3 hidapi patches, 1 jimctl_msys2 patch, 1 libftdi-0.19 patch and 1 libusb-win32-src-1.2.6.0 patch
<Haohmaru> x_x
<Guest19> The source directory contains build scripts and the patches directory.
<Guest19> Just checked and I think it's pulling a Git repo
<Guest19> I'll give this a go and see if I can replicate the modded older version on the Pi
<Guest19> Thanks PaulFertser, Haohmaru and karlp
<Haohmaru> i didn't really say anything useful
<Haohmaru> send more pepsi to the other two ;P~
<Guest19> You all at least responded!  That always helps, rather than thinking you're shouting into a void
<PaulFertser> Guest19: you shouldn't need any of those to work with kitprog debugger, it should be supported properly in current upstream already.
<PaulFertser> Guest19: but you need those implementing "traveo2" command.
<PaulFertser> And traveo22 flash driver
<PaulFertser> Guest19: and it should be easy to change expr in config files to use the current syntax.
<Guest19> '*traveo22*' is not found - is it possible that this is a bespoke driver required for their chip?
<karlp> correct.
<Guest19> great :-/
<karlp> talk to the people who gave you the code :)
<karlp> I mean, yeah, it sucks, but you don't hve "openocd" you have "customized private patched openocd"
<Guest19> That WILL be like shouting into a void
<karlp> at least it's still a presently supported cpu.
<Haohmaru> write an angry letter, tie it onto a brick and toss it thru their window ;P~
<Haohmaru> make sure no one sees you, wear a hoodie and stuff
<karlp> given that it's still supported, where di dyou get the distro package initially?
<karlp> try and go back there and find the linux version?
<karlp> I don't really have time to go trolling infineon's site right now, but somewhere you need the source for your openocd version they provided.
rigid has quit [Remote host closed the connection]
rigid has joined #openocd
rigid has quit [Changing host]
rigid has joined #openocd
rigid has quit [Read error: Connection reset by peer]
rigid has joined #openocd
rigid has quit [Changing host]
rigid has joined #openocd
<Guest19> Sorry - been on a "Support" chat with Infineon, giving them all my details only for them to tell me to raise a ticket
<Guest19> Originally I downloaded it from the Infineon website
<Guest19> I'm raising a ticket - we'll see how that goes............
<PaulFertser> Guest19: why do not you take their flash driver patch and integrate into current OpenOCD upstream?
<PaulFertser> Yourself
<Guest19> I'm a Systems Engineer, and my s/w knowledge is not fantastic.  If I get good enough instructions from them I will certainly give it a go.  There is still the issue of a missing driver (traveo22) which I am unsure whether it exists for Linux yet.
<PaulFertser> Huh? That should be GPL part of their patches to OpenOCD.
<PaulFertser> But you're dealing with firmware there, so someone who digs C language should be around, right?
<PaulFertser> And OpenOCD is written in C.
<PaulFertser> The flash drivers are written in C.
<Haohmaru> coincidence? ;P~
<Guest19> My first step will be to see if I can rebuild what they provided on Linux using the build script (1 dependency is not met).  If that generates the traveo22 driver, wonderful, but the Windows distro I was using has no *traveo22* anywhere
<Guest19> Sorry - no emphasis intended, I meant wildcards
<PaulFertser> Guest19: hm, what traveo22 driver anyway, please pastebin the config file that references it.
<PaulFertser> And how exactly do you check no patches add that driver?
<Guest19> My corporate network won't let me access pastebin
<Guest19> I searched the Cypress folder structure for anything called * traveo22 *
<PaulFertser> Use other pastebin
<PaulFertser> How did you search it?
<PaulFertser> Surely it would be in the binary itself at least.
<Haohmaru> you mentioned traveo2 earlier, not traveo22 btw
<Haohmaru> if it matters
<Guest19> After moving all the files to Linux I've grepped for it and found the libusb-win32-src-1.2.6.0 patch contains references to "$(STATIC_LIB_TARGET).a: usb.22.o error.22.o descriptors.22.o windows.22.o install.22.o registry.22.o resource.2.o"
<PaulFertser> Guest19: what was the grep command exactly?
<Guest19> grep 22 *
<PaulFertser> Flash driver is not related to libusb
<PaulFertser> So you didn't find it in the config file either?
<PaulFertser> Show the config please
<Guest19> target/traveo2_68m_common.cfg
<PaulFertser> Is it not part of the patches?
<Guest19> Not that I can see
<PaulFertser> The flash driver MUST be part of the source code they provide.
key2 has quit [Quit: Connection closed for inactivity]
Haohmaru has quit [Quit: saionara]
<karlp> must/should. gpl _can_ be violated, you're just not meant to :|
tsal has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
MGF_Fabio has quit [Remote host closed the connection]
MGF_Fabio has joined #openocd
Guest19 has quit [Ping timeout: 256 seconds]
nerozero has quit [Ping timeout: 246 seconds]
Hawk777 has joined #openocd
slobodan has joined #openocd
slobodan has quit [Ping timeout: 244 seconds]
slobodan has joined #openocd
tsal has joined #openocd
MGF_Fabio has quit [Ping timeout: 246 seconds]
slobodan has quit [Quit: Leaving]
rigid has quit [Read error: Connection reset by peer]
rigid has joined #openocd
rigid has quit [Changing host]
rigid has joined #openocd
Hawk777 has quit [Quit: Leaving.]