From owner-freebsd-arm@FreeBSD.ORG Fri Sep 27 21:07:54 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 4E8F9CC2 for ; Fri, 27 Sep 2013 21:07:54 +0000 (UTC) (envelope-from torfinn.ingolfsen@getmail.no) Received: from bouvier.getmail.no (bouvier.getmail.no [84.210.184.8]) by mx1.freebsd.org (Postfix) with ESMTP id C7E312B34 for ; Fri, 27 Sep 2013 21:07:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by bouvier.getmail.no (Postfix) with ESMTP id 511124253D for ; Fri, 27 Sep 2013 23:02:23 +0200 (CEST) X-Spam-Flag: NO X-Spam-Score: -2.95 X-Spam-Level: X-Spam-Status: No, score=-2.95 tagged_above=-10 required=6.6 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, T_FB_WORD2_END_DOLLAR=0.01, T_KHOP_THREADED=-0.01, T_NICE_REPLY_A=0.01, T_TVD_SUBJ_NUM_OBFU=0.01, T_TVD_SUBJ_NUM_OBFU2=0.01, T_TVD_SUBJ_NUM_OBFU3=0.01, T_UNKNOWN_ORIGIN=0.01] autolearn=ham Authentication-Results: bouvier.get.c.bitbit.net (amavisd-new); dkim=pass (1024-bit key) header.d=getmail.no Received: from bouvier.getmail.no ([127.0.0.1]) by localhost (bouvier.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id tk965OK-X9PX for ; Fri, 27 Sep 2013 23:02:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by bouvier.getmail.no (Postfix) with ESMTP id DCC0142447 for ; Fri, 27 Sep 2013 23:02:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.7.1 bouvier.getmail.no DCC0142447 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=getmail.no; s=8A9C8B4C-D727-11E2-8095-B6466E6B3FA2; t=1380315742; bh=kDlxIBPP/JBsihOp5eOVQYNT6GcaqUd1dCGhgzBKc2w=; h=Date:From:To:Subject:Message-Id:Mime-Version:Content-Type: Content-Transfer-Encoding; b=Qf/HP3vHfoT9XBc/MQdvVdq2Twfj9gwzKK7qM+6lBT4Xbp2+ySkJhpvZqDJq3Qs3E 2D4cA6y34lFVE8M++YxDFj1taOXS3xuVTfTqoi0wrfcKgcO8e1TktqytWTS4/XeF6a xFi0RNM5GHOPIQMtQVHDbBWwXnBPAhhkDXLezywA= X-Virus-Scanned: amavisd-new at Received: from bouvier.getmail.no ([127.0.0.1]) by localhost (bouvier.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id tzCK9w7mDm60 for ; Fri, 27 Sep 2013 23:02:22 +0200 (CEST) Received: from kg-core1.kg4.no (cm-84.215.180.206.getinternet.no [84.215.180.206]) by bouvier.getmail.no (Postfix) with ESMTPSA id ACF2942549 for ; Fri, 27 Sep 2013 23:02:22 +0200 (CEST) Date: Fri, 27 Sep 2013 23:02:22 +0200 From: Torfinn Ingolfsen To: freebsd-arm@FreeBSD.org Subject: Re: stm32flash under FreeBSD? Message-Id: <20130927230222.93f96eef8475cdf5e609d9ec@getmail.no> In-Reply-To: <20130927215914.7e93129302efbfafc678994d@getmail.no> References: <20130919212900.5A46A97324E@macavity.inf.ed.ac.uk> <20130927215914.7e93129302efbfafc678994d@getmail.no> X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.19; amd64-portbld-freebsd8.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Fri, 27 Sep 2013 21:07:54 -0000 Update - works (and breaks) as designed. On Fri, 27 Sep 2013 21:59:14 +0200 Torfinn Ingolfsen wrote: > Ok, it gets a bit further: > tingo@kg-core1$ ./stm32flash /dev/cuaU0 > stm32flash - http://stm32flash.googlecode.com/ > > (read, written) iflag: 1, 1 > (read, written) oflag: 0, 0 > (read, written) cflag: db00, db00 > (read, written) lflag: 0, 0 > Serial Config: 57600 8E1 > read_byte: No such file or directory > Assertion failed: (0), function stm32_read_byte, file stm32.c, line 90. > Abort trap (core dumped) Upon checking my notes, this is exactly the way stm32flash works on Linux, unless you put it into the right mode by holding down the BOOT0 button, then pressing and releasing the RESET button on the board. After doing that I get this: tingo@kg-core1$ ./stm32flash /dev/cuaU0 stm32flash - http://stm32flash.googlecode.com/ (read, written) iflag: 1, 1 (read, written) oflag: 0, 0 (read, written) cflag: db00, db00 (read, written) lflag: 0, 0 Serial Config: 57600 8E1 Version : 0x22 Option 1 : 0x00 Option 2 : 0x00 Device ID : 0x0410 (Medium-density) RAM : 20KiB (512b reserved by bootloader) Flash : 128KiB (sector size: 4x1024) Option RAM : 15b System RAM : 2KiB Resetting device... done. So now stm32flash works - Yay! -- Torfinn Ingolfsen