From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29157 invoked by alias); 18 Aug 2011 08:01:07 -0000 Received: (qmail 29108 invoked by uid 22791); 18 Aug 2011 08:01:01 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f177.google.com (HELO mail-wy0-f177.google.com) (74.125.82.177) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Aug 2011 08:00:47 +0000 Received: by wyh11 with SMTP id 11so1488981wyh.36 for ; Thu, 18 Aug 2011 01:00:45 -0700 (PDT) Received: by 10.227.68.130 with SMTP id v2mr1702202wbi.5.1313654445784; Thu, 18 Aug 2011 01:00:45 -0700 (PDT) Received: from sg-pc.belvok.com ([86.57.137.251]) by mx.google.com with ESMTPS id fm9sm1538076wbb.27.2011.08.18.01.00.42 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Aug 2011 01:00:44 -0700 (PDT) Date: Thu, 18 Aug 2011 08:01:00 -0000 From: Sergei Gavrikov To: Elad Yosef cc: ecos-discuss@ecos.sourceware.org In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Application behavior for exceptions with RedBoot Rom monitor X-SW-Source: 2011-08/txt/msg00030.txt.bz2 On Thu, 18 Aug 2011, Elad Yosef wrote: > Hi all, > I'm having some issue with exceptions in my application. > My target is based on the Malta. > > How can I disable the GDB code in the RedBoot from handling the exceptions? > What I'm trying to achieve is that in run-time (not debug) the > exceptions will not be handled by stub code, but fall into my code. > I want it to be run time decision - if gdb connected go to stub else > go to my code > > Elad Hi Elad, Keyword: HAL_VSR_SET_TO_ECOS_HANDLE If I understood you correctly you try to achieve HAL_VSR_SET_TO_ECOS_HANDLER() ensures that the VSR for a specific exception is pointing at the eCos exception VSR and not one for RedBoot or some other ROM monitor. The default when running under RedBoot is for exceptions to be handled by RedBoot and passed to GDB. This macro diverts the exception to eCos so that it may be handled by application code. The arguments are the VSR vector to be replaces, and a location in which to store the old VSR pointer, so that it may be replaced at a later point. [1]_ .. [1] http://ecos.sourceware.org/docs-latest/ref/hal-interrupt-handling.html Sergei -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss