<Getty>
is there something that can give me better output on the Error: open failed with a stlink?
<Getty>
debugging is not really helping :D damn, one of those "could be hardware" error and then on the init of the situation
<karlp>
open failed? that's... sounding like just plain old permissions problems on the usb device?
<Getty>
no, its also the problem you get if your programmer doesnt like you
<Getty>
somehow that thing i got in front of me is not the ST Link that i expect it to be, or its broken, i dont know :D i took out an old one and NOW suddenly it works all fine
<Getty>
<pain>
<Getty>
oh my god, that was now dumb..... I had before programmed Atmel and we had JUST started to use the standard connector on the STM32 which is like Atmel one so................. yeah.............. exactly
<Getty>
well that not gonna happen to me again :D
nerozero has joined #openocd
Hawk777 has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Hawk777 has joined #openocd
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Read error: Connection reset by peer]
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Ping timeout: 245 seconds]
crabbedhaloablut has joined #openocd
Hawk777 has quit [Quit: Leaving.]
MGF_Fabio has joined #openocd
slobodan has joined #openocd
kucha has joined #openocd
Foxyloxy_ has joined #openocd
Foxyloxy has quit [Read error: Connection reset by peer]
MGF_Fabio has quit [Remote host closed the connection]
MGF_Fabio has joined #openocd
tlwoerner has quit [Ping timeout: 268 seconds]
tlwoerner has joined #openocd
wingsorc has joined #openocd
bvernoux has joined #openocd
nerozero has quit [Ping timeout: 276 seconds]
Guest27 has joined #openocd
<Guest27>
Is it possible to include all libraries in the openocd binary when crosscompiling? (compiled for aarch64 android, but some libraries are missing)
tchebb has quit [Ping timeout: 252 seconds]
<PaulFertser>
Guest27: like static linking?
<PaulFertser>
Guest27: there's some hint about that in the cross compiling script.
gzlb has quit [Ping timeout: 256 seconds]
gzlb has joined #openocd
<Guest27>
PaulFertser: yes, i checked it, it only mentions it for cross compilation script, i cannot find the required source files for the script so i built with make but i did do ./config --enable-static as explained in configure help
<Guest27>
when i readelf the binary outputted in src/ folder it still lists the libraries as needed
<Guest27>
i also built it natively on an aarch64 machine (apple m1 with parallels ubuntu) if that makes any difference
renrelkha has quit [Quit: bye]
renrelkha has joined #openocd
<PaulFertser>
Guest27: sorry I do not have the answer ready I'll try to check. Do you have root on that android?
<PaulFertser>
Guest27: do you have static version of libusb installed? On Debian I see there's no static libusb by default.
<PaulFertser>
So building static OpenOCD isn't possible without it.
<PaulFertser>
Guest27: and in any case I think you need to run configure with LDFLAGS="-static" in environment so that the final executable is statically linked if possible.
<PaulFertser>
Guest27: but probably you can install ready-made OpenOCD with Termux (by just doing pkg install openocd)?
crabbedhaloablut has quit []
crabbedhaloablut has joined #openocd
<Guest27>
PaulFertser: i thought about that too but pkg install openocd or open-ocd gives nothing
<Guest27>
PaulFertser: i installed libusb-1.0-0-dev through apt
<Guest27>
this would not really be an issue on rooted android however i am trying to have this run on unrooted android for now
<Guest27>
PaulFertser: about the specific missing libraries: libusb-1.0.so.0, libjaylink.so.0, libc.so.6, ld-linux-aarch64.so.1
<PaulFertser>
Guest27: but does libusb-1.0-0-dev have a static .a library archive?
<PaulFertser>
Guest27: how do you expect non-rooted android to allow regular libusb to work?
<Guest27>
good point, seems like this is pretty much impossible to do without rooting
<PaulFertser>
Probably termux have some alternative libusb implementation which uses some API, idk. Android is a mess and PITA.
<PaulFertser>
If you put .so files there on the target you can use them with LD_LIBRARY_PATH
<Guest27>
CANNOT LINK EXECUTABLE "linker64": cannot find verneed/verdef for version index=32770 referenced by symbol "_res" at "/data/local/tmp/andro_openocd/libexec/libc.so.6"
<PaulFertser>
That's because it's a different linker I guess. You might need to copy /lib/ld-linux-aarch64.so.1 too, and use it from command line to tell it to load everything needed.
<Guest27>
i was hoping to get openocd working because i cant find any alternative that can flash stm32 and nrf51 at the same time..
<PaulFertser>
I'd expect it to work just fighting android is tricky.
<PaulFertser>
Try starting ld-linux-aarch64.so.1 as an executable with appropriate arguments to load openocd.
<Guest27>
yeah same, first i tried to just use xpack's arm64 implementation but i had this same issue
<Guest27>
Info : Listening on port 6666 for tcl connections
<Guest27>
Info : Listening on port 4444 for telnet connections
<Guest27>
Error: Debug Adapter has to be specified, see "adapter driver" command
<Guest27>
embedded:startup.tcl:28: Error:
<Guest27>
in procedure 'script'
<Guest27>
at file "embedded:startup.tcl", line 28
<Guest27>
just gotta set the adapter and target line and fingers crossed it might actually work?
crabbedhaloablut has quit []
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Client Quit]
crabbedhaloablut has joined #openocd
MGF_Fabio has quit [Ping timeout: 245 seconds]
MGF_Fabio has joined #openocd
<HelloShitty>
Hello. I was tinking about to program an RP2040 (Raspberry chip which is a dual core ARM Cortex M0+) wit openocd but there is no specific target config file for this chip. Would it work if I use stm32f0x.cfg which is a single core ARM Cortex M0 (suggested by some AI) or maybe stm32wbx.cfg or even stm32wblx.cfg which are ARM Cortex M0+ ? I'm asking in terms of memory region settings because I don't
<HelloShitty>
know how to change CFG files to match this specific RP2040.
<HelloShitty>
RP2040 datasheet says: internal SRAM can contain code or data. It is addressed as a single 264 kB region, but physically partitioned into 6 banks to allow simultaneous parallel access from different masters.
<HelloShitty>
but I can't find any chip with these memory characteristics. 6 banks as 64 + 64 + 64 + 64 + 4 + 4
<HelloShitty>
Address map of this RP2040 are well documented but I don't know how to put the addresses in a CFG file!
<Guest27>
PaulFertser:messing with it now, when i try to connect to my chip i get a wall of this DEPRECATED! use 'swj_newdap' not 'hla newtap' then it says
<PaulFertser>
Guest27: yes looks like you can use libusb on unrooted android after all. But that also requires some tweaks to app and also a corresponding Java helper.
<Guest27>
yeah i see it needs an app
<Guest27>
i wonder if theres a way to use it without the app part
<PaulFertser>
Probably with termux
<PaulFertser>
It seems to have some suitable app integrated.