From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15164 invoked by alias); 27 Nov 2008 17:43:02 -0000 Received: (qmail 15110 invoked by uid 22791); 27 Nov 2008 17:43:02 -0000 X-Spam-Level: * X-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BARRACUDA_BRBL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ey-out-1920.google.com (HELO ey-out-1920.google.com) (74.125.78.146) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Nov 2008 17:42:02 +0000 Received: by ey-out-1920.google.com with SMTP id 4so448717eyg.24 for ; Thu, 27 Nov 2008 09:41:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=DAciltuvivrqGUjAZle7VjTL9t2oUjk5agQLjtC0qzM=; b=sAcEVAlGQ9YkUOU3ffQ22Dmmwq+zz3WwQKxnX4PLDeKIZPPtK4cTQ0WmIO8YcmzfI6 RkJvDtuPBfZVWZQK/YiE+25jf3qg/f2vy3UZJIc4EFgPYQOYw8vMvcCqJv04ocZn3NQd D7lLrWCyBUounuSopHYGHy940W7G5Xt0DBnoY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=LfLCk/jFSPohb3qcKpbCmS1JsJI+ki7YKgbPOmAiOWJ5k55/uYrtrSrLQRtPAc2Z+I zRjVyZ1a4kipYpLb0tyGn01n5Xms4ClN50BtCWqwWldAwTTIKJhQTMDeUcNWJxzAmu32 Ip1PRUzhX/fezc0chVqDRvX+4lKP9E5CyTsr0= Received: by 10.210.10.8 with SMTP id 8mr7785583ebj.7.1227807719206; Thu, 27 Nov 2008 09:41:59 -0800 (PST) Received: from smtp.gmail.com ([86.57.207.124]) by mx.google.com with ESMTPS id m5sm30068gve.15.2008.11.27.09.41.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 27 Nov 2008 09:41:58 -0800 (PST) Date: Thu, 27 Nov 2008 17:43:00 -0000 From: Sergei Gavrikov To: Jonathan Larmour Cc: Sergei Gavrikov , eCos patches list Subject: Re: Support for LPC2XXX IAP interface Message-ID: <20081127174200.GA9418@ubuntu.local> References: <20081127125253.GA20616@sg-ubuntu.local> <492ED567.2080900@eCosCentric.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <492ED567.2080900@eCosCentric.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-IsSubscribed: yes Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2008-11/txt/msg00119.txt.bz2 Thank you for your feedback and the valuable remarks. Tonight I fix all and repost a cleaned code. Thank you, all the best, Sergei On Thu, Nov 27, 2008 at 05:14:15PM +0000, Jonathan Larmour wrote: > Sergei Gavrikov wrote: > > > > I saw no such a support in other HALs. And I decided to put it under the > > lpc2xxx/var tree. > > > > RFC: Is it a good place for the interface in lpc2xxx/var? > > Seems fine. > > > +//========================================================================== > > + > > +#include > > +#include > > + > > +#include > > + > > +extern int diag_printf (char *, ...); > > include diag.h > > > > +externC void > > +#ifdef CYGPKG_KERNEL > > +cyg_user_start (void) > > +#else > > +cyg_start (void) > > +#endif > > +{ > > Why ifdef kernel? > > > +cyg_uint32 > > +lpc_iap_call (cyg_uint32 cmd, cyg_uint32 par0, cyg_uint32 par1, > > + cyg_uint32 par2, cyg_uint32 par3, cyg_uint32 *ret); > > This would be better named something like hal_lpc2xxx_iap_call. > > > +// 1) WARNING: lpc on-chip flash memory is not accessible during erase and > > +// write operations. When the user application code starts executing the > > +// interrupt vectors from the user flash area are active. The user should > > +// either disable interrupts, or ensure that user interrupt vectors are active > > +// in RAM and that the interrupt handlers reside in RAM, before making a flash > > +// erase/write IAP call. The IAP code does not use or disable interrupts. > > You say the user, but below, you do disable interrupts. > > It sounds like this could be a CDL option, which defaults to what you do > i.e. disabling interrupts (for safety). After all, the flash programming > would severely hamper real-time operation so many people would want to > avoid it.. > > Otherwise fine. > > Jifl > -- > eCosCentric Limited http://www.eCosCentric.com/ The eCos experts > Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 > Registered in England and Wales: Reg No 4422071. > ------["Si fractum non sit, noli id reficere"]------ Opinions==mine