Skip to content

Commit

Permalink
Fix Picoprobe USB PID
Browse files Browse the repository at this point in the history
Thanks to @me-no-dev for pointing out that the Picoprobe does UART
passthrough!
  • Loading branch information
earlephilhower committed Apr 7, 2021
1 parent af1d595 commit 1955215
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ rpipico.menu.dbglvl.NDEBUG=NDEBUG
rpipico.menu.dbglvl.NDEBUG.build.debug_level=-DNDEBUG
rpipicopicoprobe.name=Raspberry Pi Pico (Picoprobe)
rpipicopicoprobe.vid.0=0x2e8a
rpipicopicoprobe.pid.0=0x000a
rpipicopicoprobe.pid.0=0x0004
rpipicopicoprobe.build.usbpid=-DSERIALUSB_PID=0x000a
rpipicopicoprobe.build.board=RASPBERRY_PI_PICO
rpipicopicoprobe.build.mcu=cortex-m0plus
Expand Down Expand Up @@ -336,7 +336,7 @@ adafruitfeather.menu.dbglvl.NDEBUG=NDEBUG
adafruitfeather.menu.dbglvl.NDEBUG.build.debug_level=-DNDEBUG
adafruitfeatherpicoprobe.name=Adafruit Feather RP2040 (Picoprobe)
adafruitfeatherpicoprobe.vid.0=0x2e8a
adafruitfeatherpicoprobe.pid.0=0x000b
adafruitfeatherpicoprobe.pid.0=0x0004
adafruitfeatherpicoprobe.build.usbpid=-DSERIALUSB_PID=0x000b
adafruitfeatherpicoprobe.build.board=ADAFRUIT_FEATHER_RP2040
adafruitfeatherpicoprobe.build.mcu=cortex-m0plus
Expand Down Expand Up @@ -596,7 +596,7 @@ generic.menu.boot2.boot2_w25x10cl_4_padded_checksum=W25X10CL QSPI /4
generic.menu.boot2.boot2_w25x10cl_4_padded_checksum.build.boot2=boot2_w25x10cl_4_padded_checksum
genericpicoprobe.name=Generic RP2040 (Picoprobe)
genericpicoprobe.vid.0=0x2e8a
genericpicoprobe.pid.0=0xf00a
genericpicoprobe.pid.0=0x0004
genericpicoprobe.build.usbpid=-DSERIALUSB_PID=0xf00a
genericpicoprobe.build.board=GENERIC_RP2040
genericpicoprobe.build.mcu=cortex-m0plus
Expand Down
10 changes: 7 additions & 3 deletions tools/makeboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def BuildBoot(name):
print("%s.menu.boot2.%s=%s" % (name, l[1], l[0]))
print("%s.menu.boot2.%s.build.boot2=%s" % (name, l[1], l[1]))

def BuildHeader(name, prettyname, pid, boarddefine, variant, uploadtool, flashsize, boot2):
def BuildHeader(name, prettyname, pidtouse, pid, boarddefine, variant, uploadtool, flashsize, boot2):
print("%s.name=%s" % (name, prettyname))
print("%s.vid.0=0x2e8a" % (name))
print("%s.pid.0=%s" % (name, pid))
print("%s.pid.0=%s" % (name, pidtouse))
print("%s.build.usbpid=-DSERIALUSB_PID=%s" % (name, pid))
print("%s.build.board=%s" % (name, boarddefine))
print("%s.build.mcu=cortex-m0plus" % (name))
Expand Down Expand Up @@ -82,7 +82,11 @@ def MakeBoard(name, prettyname, pid, boarddefine, flashsizemb, boot2):
fssizelist = [ 0, 64 * 1024, 128 * 1024, 256 * 1024, 512 * 1024 ]
for i in range(1, flashsizemb):
fssizelist.append(i * 1024 * 1024)
BuildHeader(n, p, pid, boarddefine, name, c, flashsizemb * 1024 * 1024, boot2)
if a == "picoprobe":
pidtouse = '0x0004'
else:
pidtouse = pid
BuildHeader(n, p, pidtouse, pid, boarddefine, name, c, flashsizemb * 1024 * 1024, boot2)
if name == "generic":
BuildFlashMenu(n, 2*1024*1024, [0, 1*1024*1024])
BuildFlashMenu(n, 4*1024*1024, [0, 2*1024*1024])
Expand Down

0 comments on commit 1955215

Please sign in to comment.