From owner-freebsd-arm@FreeBSD.ORG Thu Sep 19 21:29:18 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6BB9996E for ; Thu, 19 Sep 2013 21:29:18 +0000 (UTC) (envelope-from richard@inf.ed.ac.uk) Received: from treacle.ucs.ed.ac.uk (treacle.ucs.ed.ac.uk [129.215.16.102]) by mx1.freebsd.org (Postfix) with ESMTP id 074632AF5 for ; Thu, 19 Sep 2013 21:29:17 +0000 (UTC) Received: from crunchie.inf.ed.ac.uk (crunchie.inf.ed.ac.uk [129.215.33.180]) by treacle.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id r8JLT0po008691; Thu, 19 Sep 2013 22:29:00 +0100 (BST) Received: from macavity.inf.ed.ac.uk (macavity.inf.ed.ac.uk [129.215.197.221]) by crunchie.inf.ed.ac.uk (8.14.4/8.14.4) with ESMTP id r8JLSxKg025404; Thu, 19 Sep 2013 22:28:59 +0100 Received: by macavity.inf.ed.ac.uk (Postfix, from userid 26013) id 5A46A97324E; Thu, 19 Sep 2013 22:29:00 +0100 (BST) From: Richard Tobin Subject: Re: stm32flash under FreeBSD? To: Torfinn Ingolfsen , freebsd-arm@freebsd.org In-Reply-To: Torfinn Ingolfsen's message of Thu, 19 Sep 2013 22:44:24 +0200 X-Mailer: Ream 5.1.51-richard-mac Message-Id: <20130919212900.5A46A97324E@macavity.inf.ed.ac.uk> Date: Thu, 19 Sep 2013 22:29:00 +0100 (BST) X-Edinburgh-Scanned: at treacle.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus Content-Type: text/plain MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.60 on 129.215.16.102 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 21:29:18 -0000 > To me (but I am no expert) Nor me, but... > it looks like it never reaches > serial_setup(), it fails after serrial_open(). The log shows open, fcntl, tcgettatr, tcgettatr, tcflush, tcsetattr, tcgettatr. The NLS stuff is inside perror(). serial_open() does open, fcntl, tcgettatr, tcgettatr. serial_setup() does tcflush, tcsetattr, tcgettatr, and then fails if the tcgettatr doesn't match the tcsetattr. Presumably that's what's happening. I would put some debugging printf()s in to see what the settings returned by the tcgettattr in serial_setup() are. -- Richard -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.