Bug 218241 - [PATCH] devel/bossa: Add 1200bps hack w/ -a flag
Summary: [PATCH] devel/bossa: Add 1200bps hack w/ -a flag
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Boris Samorodov
URL:
Keywords: patch
Depends on:
Blocks: 218221
  Show dependency treegraph
 
Reported: 2017-03-30 21:17 UTC by Kyle Evans
Modified: 2017-04-19 20:21 UTC (History)
1 user (show)

See Also:
bsam: maintainer-feedback+


Attachments
svn(1) diff of devel/bossa (2.15 KB, patch)
2017-03-30 21:17 UTC, Kyle Evans
kevans: maintainer-approval-
Details | Diff
svn(1) diff of devel/bossa (5.58 KB, patch)
2017-03-31 15:37 UTC, Kyle Evans
kevans: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer freebsd_triage 2017-03-30 21:17:42 UTC
Created attachment 181331 [details]
svn(1) diff of devel/bossa

Adding the 1200bps hack to devel/bossa should improve reliability of programming the Arduino Due with devel/arduino16 + devel/bossa. Right now, the IDE performs the 1200bps reset and then delegates programming to BOSSA, which fails a good chunk of the time. The overhead and latency between these two seems to make BOSSA fail to program the device quite frequently.

This patch has been submitted upstream, and a future patch will be delivered to make devel/arduino16 take advantage of the new feature. PORTREVISION bumped for the patch.

Looked over with: portlint -AC
Tested with: Poudriere (-HEAD, amd64)
Comment 1 Kyle Evans freebsd_committer freebsd_triage 2017-03-31 13:36:11 UTC
Comment on attachment 181331 [details]
svn(1) diff of devel/bossa

This is still not quite right, unfortunately. =( It addresses cases where there is no sketch flashed to the device, but it's not doing something that the CDC handling in the SAM core wants.

I will submit another patch soon-ish.
Comment 2 Boris Samorodov freebsd_committer freebsd_triage 2017-03-31 13:37:47 UTC
Take.
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2017-03-31 15:37:26 UTC
Created attachment 181352 [details]
svn(1) diff of devel/bossa

Alright, figured it out. =) New version adds a total of six (6) patches and works consistently.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-04-19 20:20:29 UTC
A commit references this bug:

Author: bsam
Date: Wed Apr 19 20:19:33 UTC 2017
New revision: 438912
URL: https://svnweb.freebsd.org/changeset/ports/438912

Log:
  devel/bossa: Adding the 1200bps hack to devel/bossa should improve
  reliability of programming the Arduino Due.

  PR:		218241
  Submitted by:	Kyle Evans <bsdports@kyle-evans.net> (maintainer)

Changes:
  head/devel/bossa/Makefile
  head/devel/bossa/files/
  head/devel/bossa/files/patch-src_PosixSerialPort.cpp
  head/devel/bossa/files/patch-src_PosixSerialPort.h
  head/devel/bossa/files/patch-src_SerialPort.h
  head/devel/bossa/files/patch-src_WinSerialPort.cpp
  head/devel/bossa/files/patch-src_WinSerialPort.h
  head/devel/bossa/files/patch-src_bossac.cpp
Comment 5 Boris Samorodov freebsd_committer freebsd_triage 2017-04-19 20:21:17 UTC
Committed, thanks!