raspberrypi / debugprobe

761 stars 202 forks source link

Add EXTRA_UART cmake option, bridges UART0 over USB-CDC as tty1 #102

Closed milipropasm closed 1 year ago

milipropasm commented 1 year ago

full (probably excessive) details in commit message

lurch commented 1 year ago

I'm not sure what you've done wrong, but this PR ought to include just commit(s) from yourself, not the commits from P33M and others.

milipropasm commented 1 year ago

As someone with approx zero experience of git and exactly zero experience of github, I could keep experimenting til I get it right, but I really don't want to cluster-bomb you with more dodgy pull-requests...

Here are the steps I took for #102: could you or someone else cast an eye over them and tell me which ones need to be removed/modified/replaced?

# on github, fork raspberrypi/picoprobe to milipropasm/picoprobe_tty1 (1)
git clone git@github.com:milipropasm/picoprobe_tty1.git (2)
cd picoprobe_tty1 (3)
git remote add upstream git@github.com:raspberrypi/picoprobe.git (4)
git fetch upstream (5)
git branch develop (6)
git checkout -b extra_uart develop (7)
# make changes, test (8)
# git status or log between each step below (9)
git add CMakeLists.txt include/(star) src/(star) (10)
git commit --file=commit-message (11)
git push -u origin # failed (12)
git push --set-upstream origin extra_uart (13)
git reset (no effect, was hoping to shrink commit message) (14 )
git push (15)
# on github UI, new pull request: (16)
# baserepo:raspberrypi/picoprobe, base:develop (17)
# headrepo:milipropasm/picoprobe_tty1, compare:extra_uart (18)
lurch commented 1 year ago

I think what happened is that when you did (2) you got a copy of the repo at the default branch (i.e. master), and when you did (6) it then created a new local branch named develop with the contents of your already-checked-out master branch. I think step (6) should have been git checkout develop (which would have then created a local develop branch with a copy of the upstream develop branch.

If my supposition is correct, you should be able to do:

git rebase upstream/develop
git push -f

and that should then "fix" the commits in this PR.

EDIT: And optionally you could do git branch -D develop to delete your "local develop which is actually a copy of upstream master" branch :wink:

milipropasm commented 1 year ago

And thanks for the pointers on the pull request mis-step, much appreciated. Planning to redo the submission from scratch (with new step 6) as a learning experience

lurch commented 1 year ago

I'm not directly involved in this repo, so I was only offering "helpful suggestions", I can't give "concrete answers" - you'll have to rely on @P33M for that (or use your best judgement). If you did want to add support for DebugProbe too (entirely up to you of course), there are a bunch of Test Points that you might be able to make use of - see https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html#schematics

milipropasm commented 1 year ago

Ah, OK - well the suggestions were helpful, so I'll incorporate this latest thinking and do another pull request without the mis-step.

(As a matter of interest, I've already tried soldering to the debug probe test points to get access to VBUS and VSYS, and hit the problem that there's not enough clearance underneath the board in that cute little case for anything but the finest mod-wire)

thanks again for the help and pointers.

lurch commented 1 year ago

Yeah, I guess the expectation is that if you're soldering things to the Debug Probe test-points, you can't expect to keep using the cute little case! :laughing:

milipropasm commented 1 year ago

:-) it's a shame tho: I specifically bought one due to the large number of USB cables that float around my workstation - constantly expecting to drop the end of one onto a live breadboarded pico - but there's no VBUS / VSYS connector on the debugprobe, so unless you're powering the target pico independently, you have no choice but to get the soldering iron out... puzzling.