Skip to content

Conversation

andre-richter
Copy link
Member

@andre-richter andre-richter commented Mar 9, 2019

@naotaco

Could you please review? This branch contains your changes and my extensions.

You can check out the JTAG branch of the repository for this.

naotaco and others added 5 commits March 9, 2019 16:08
Add an instruction for openocd insallation

Update tutorial to use openocd on Docker

Fix RTCK pin

Add wiring diagram for JTAG connection
@naotaco
Copy link
Contributor

naotaco commented Mar 10, 2019

@andre-richter

Wow, it's really nice tutorial. Great job! 👏 Honestly, I had no Idea to provide simple way to load another image to debug after enable/connect JTAG debugger.

Anyway, I'll follow the tutorial. Give me few days for that. At least, I'll provide improved wiring photo and fritzing image as requested at #18 .

compiler_fence(Ordering::Release);

if mbox.call(mbox::channel::PROP).is_err() {
return Err(PowerError::MailboxError); // Abort if UART clocks couldn't be set
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid comment - we turn off POWER, not set UART clocks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks. Corrected it.

@berkus
Copy link
Member

berkus commented Mar 10, 2019

Thank you @andre-richter and @naotaco for this; my journey with JTAG debugging my Pi was bumpy up to this point, hopefully, it will become a smoother ride now!

I will play with the 0B tutorial and write up if anything is not working. I have a JLink not olimex, so things might be slightly different.

Feel free to pull anything from these documents if you want/need: JTAG notes, config.txt that enables JTAG on boot without additional software, JTAG wait helper.

@andre-richter
Copy link
Member Author

@berkus Using config.txt to set the GPIOs is something I was ignorant about, it can definitely be an alternative. Thanks for sharing.

For the tutorials, since we have our chain-loading infrastructure with raspboot in place anyways, I'll stick with the current solution. It has the advantage that the pins are only set on demand when needed, and not on every boot regardless.

@andre-richter
Copy link
Member Author

@naotaco @berkus
I think my exit criteria for merging this one to master is that one of you guys could run and step with gdb successfully.

All points raised in #18 and other findings can be addressed in master then.

@naotaco
Copy link
Contributor

naotaco commented Mar 10, 2019

@andre-richter

I agree. Actually, gdb is working here perfectly! I can break the CPU and see registers/source code in cool gdb window. Thanks again for your great work ❤️

@andre-richter
Copy link
Member Author

Perfect, thanks.

@andre-richter andre-richter merged commit 76b86a4 into master Mar 10, 2019
@andre-richter andre-richter deleted the JTAG branch March 10, 2019 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants