NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
emeb has quit [Quit: Leaving.]
WormFood has joined #openocd
tsal has quit [Ping timeout: 272 seconds]
tsal has joined #openocd
thinkfat has quit [Ping timeout: 240 seconds]
thinkfat_ has joined #openocd
<WormFood> Does anyone have any recommendations for a low-cost JTAG interface, to operate with ARM and AVR? I see many options, and I'm not sure what is a good choice.
<WormFood> Or, are they all pretty much the same?
<WormFood> The FT*232* seem to be particularly popular
<WormFood> I think I'm leaning towards the FT2232H...any comments or suggestions?
<WormFood> Or how about a FT4232? Any practical advantage to having more I/O pins?
Hawk777 has joined #openocd
Bertl_oO is now known as Bertl_zZ
nerozero has joined #openocd
sbach has quit [Read error: Connection reset by peer]
<antto> only some avrs have jtag
sbach has joined #openocd
<antto> for arm cortex M i use DAP-based debugger, it's very cheap, but that's not JTAG it's SWD
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
<antto> for avr, i mostly care about xmega, i use an olimex avrisp2 clone, that only has programming features, works also with atmegas
<antto> it's not as cheap as the DAP
michalkotyla has quit [Quit: michalkotyla]
michalkotyla has joined #openocd
<PaulFertser> WormFood: what kind of functionality do you expect for AVRs?
<PaulFertser> WormFood: bare FT2232H isn't that good of a JTAG adapter. You should look at something with buffer, e.g. DP BusBlaster or diygadgets TUMPA.
<PaulFertser> WormFood: if you're really on a budget you can consider J-Link clone (if J-Link EDU is too expensive).
Krazubu has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Haohmaru has joined #openocd
wingsorc has quit [Quit: Leaving]
Krazubu has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Krazubu has joined #openocd
Bertl_zZ is now known as Bertl
michalkotyla has quit [Read error: Connection reset by peer]
michalkotyla has joined #openocd
shuffle2 has joined #openocd
<shuffle2> i'm trying to get openocd working with the arm cores on the "rv32m1-vega" board (from https://open-isa.org/ )
<shuffle2> the vendor provided openocd build for risc-v cores, and there's an old fork here https://github.com/open-isa-rv32m1/rv32m1-openocd but this doesnt seem too helpful for the arm cores
<shuffle2> instead, they provide some config files for j-link etc for targeting the arm cores
<shuffle2> https://pastebin.com/uiaWgdxb here is what i've tried...i'm not really sure what's wrong
<shuffle2> (with the jlink files for comparison)
<Haohmaru> openocd supports arm, but i guess the problem here is, it's not just an arm chip? some chip with multiple cores among which there are ARMs?
<shuffle2> possibly. it does seem like openocd can interact with the 3 DAP Access Ports to some extent, just not really fully successfully
<Haohmaru> stick around till the experts wake up
<Haohmaru> this is advanced stuff
<shuffle2> to clarify a little, the 3 APs are just a cortex-m4, cortex-m0+, and "mdm-ap" (which openocd should support as the kinetis flash device, i think). the risc-v cores are on a different jtag chain (which is why the existing rv32m1 fork of openocd isn't that helpful)
<shuffle2> also, i unfortunately dont have a jlink to just generate the swd traffic, sniff, and compare it :/
<karlp> different _jtag_ chain? you're using swd at the moment?
<karlp> do you really mean just different altogether pins?
<shuffle2> they are supposedly different chains internally
<shuffle2> i'm using swd forwarded over CMSIS-DAP usb. the risc-v jtag is different pins
<shuffle2> https://imgur.com/a/OL1rfgH some excerpts from the manual
<shuffle2> i suspect the arm DAP can (at least indirectly) control risc-v jtag, but it appears to be undocumented because of some licensing issue https://open-isa.org/community/topic/why-do-we-need-an-external-deubgger/#post-323
<PaulFertser> shuffle2: hi
<PaulFertser> shuffle2: do you mean jlink server works with those arm cores for you?
<shuffle2> hi! i dont have a jlink device so i can't test. i just mean that the board vendor provides the jlink config files and documents that one should debug the arm cores with jlink
<PaulFertser> shuffle2: ok, that's helpful too.
<PaulFertser> shuffle2: what if you do not define any targets, just the 'dap', are you able to do "dap info 0", "dap info 1" etc from telnet?
<PaulFertser> shuffle2: btw, what happens if you try to use that cm4 and commend out all the other targets?
<shuffle2> i've found that dap ap_num=0 always returns 0x23000000, unless i cause a system reset by using the mdm-ap control register (ap_num=1). after such reset, dap info 0 can read the AP regs such as the apid, but most other things break. let me paste some logs..
<shuffle2> https://pastebin.com/e8kCv0rT for an example of that reset behavior
<shuffle2> https://pastebin.com/NqUaMzJE the other APs can read the IDs without reset, but trying to read memory fails
<shuffle2> i've tried commenting out all combinations of the 3 and the behavior is the same
<WormFood> PaulFertser, thanks for the info, that is exactly the type of thing I needed to know. I see the BusBlaster is also using a FT2232H, but I can't find anyplace to actually buy it from.
<PaulFertser> WormFood: BusBlaster is FT2232H + CPLD and that CPLD makes a difference, it has wider output voltage range etc.
<PaulFertser> WormFood: also, proper termination resistors unlike FT2232H breakout which has none.
<PaulFertser> shuffle2: guess you can dig the code to try to convince OpenOCD to ignore that 0 in cortex_m_parts[n].partno check in src/target/cortex_m.c
<PaulFertser> shuffle2: and see if it gets you further
<WormFood> I do understand the buffering makes all the difference in the world.
<PaulFertser> WormFood: TUMPA (non-lite) is ok if you're on a budget. Or just get fake jlink.
<WormFood> I'd just like to get something decent for under $50
<WormFood> I see some jtags running hundreds of dollars...I can't afford that. I'd prefer to keep in the $25 neighborhood
<WormFood> PaulFertser, Thanks for filling in the missing pieces, so I can see the bigger picture, and know what to look for.
<PaulFertser> WormFood: have you considered jlink edu original? Jlink clones are mostly decent afaik.
<WormFood> I'm considering whatever works without breaking the bank.
<WormFood> But before I asked here, I had clue, but not enough info to have an idea of what I should get. The only jtag interface I have, appears to be only for the AVR, and it's interface to the computer is an old fashoned serial port. (I've had this thing close to 20 years now)
<WormFood> https://shop.egnite.de/en/embedded-development/programmers-debuggers/in-system-programmers/76/sp-duo-2 <-- and it appears they're *still* selling it. (yeah, I know, there is little to no hope to get openocd to communicate with this, in addition, I'm pretty sure it won't do what I want it to do anyways)
<karlp> that probably still works, not sure why they say avr only?
<karlp> hrm, looks like we don't have any support for raw tty wigglers
<karlp> only parport
<WormFood> The "problem" with mine, is it's old firmware that can't be updated. They want me to physically send the unit back to them, to upgrade the firmware in it, which is not cool for me, because it's firmware. Fuck! just give me the file, and let me flash it myself.
<karlp> hehe, with what? :)
<WormFood> If they gave me the firmware, I could easily reflash it.
<WormFood> I have no problems taking it apart, and soldering to pins if necessary.
<PaulFertser> WormFood: you could flash with raspberrypi or other single board computer.
<PaulFertser> WormFood: if it's a one time job, why bother.
<karlp> anyway, that's a side topic :)
<PaulFertser> WormFood: but you're talking about AVR /and/ ARM, why?
<karlp> openocd doesn't have support for serially connected dongles anwyay,
<WormFood> PaulFertser, well, I work mainly with AVR, so I thought it'd be nice to have hardware that supports that platform, but I mainly want to use it on ARM, so AVR support is secondary, and not really that important to me.
<PaulFertser> WormFood: if you have a raspberrypi and the arm target is 3.3 V why bother?
<WormFood> karlp, I don't want to use this serial dongle. I just happen to have it.
<WormFood> PaulFertser, I'm not aware of using the RPI as a dongle. I know, in theory it should be possible, but I wasn't aware that it is a viable option. What do I need to search for, to find more info on this subject?
<PaulFertser> WormFood: nothing, just run OpenOCD on it and use -f interface/raspberrypi2-native.cfg
<WormFood> ooohhh....I understand now.
<WormFood> ok, I think I got an even bigger picture now. I'll check out using my RPi as a JTAG interface. That's an even better option, as far as coming in under budget.
Hawk777 has joined #openocd
<PaulFertser> shuffle2: so any luck tinkering?
<PaulFertser> It looks like jlink script does nothing special really.
<PaulFertser> Probably the steps to prepare the target to work with it are outlined separately.
Bertl is now known as Bertl_oO
Haohmaru has quit []
nerozero has quit [Ping timeout: 260 seconds]
crabbedhaloablut has quit [Quit: No Ping reply in 180 seconds.]
crabbedhaloablut has joined #openocd
Hawk777 has quit [Ping timeout: 250 seconds]
Hawk777 has joined #openocd
Krazubu has quit [Quit: Textual IRC Client: www.textualapp.com]
Krazubu has joined #openocd
Krazubu has quit [Client Quit]
_franck_ has quit [Quit: Ping timeout (120 seconds)]
_franck_ has joined #openocd