From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20728 invoked by alias); 28 Jan 2008 20:40:17 -0000 Received: (qmail 20714 invoked by uid 22791); 28 Jan 2008 20:40:15 -0000 X-Spam-Check-By: sourceware.org Received: from smtp35.poczta.interia.pl (HELO smtp4.poczta.interia.pl) (80.48.65.35) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 28 Jan 2008 20:39:45 +0000 Received: by smtp4.poczta.interia.pl (INTERIA.PL, from userid 502) id 2AA312C271B; Mon, 28 Jan 2008 21:39:42 +0100 (CET) Received: from poczta.interia.pl (mi01.poczta.interia.pl [10.217.12.1]) by smtp4.poczta.interia.pl (INTERIA.PL) with ESMTP id B16DA2C2718 for ; Mon, 28 Jan 2008 21:39:41 +0100 (CET) Received: by poczta.interia.pl (INTERIA.PL, from userid 502) id D802F769E83; Mon, 28 Jan 2008 21:39:41 +0100 (CET) Received: from [192.168.1.12] (eji186.neoplus.adsl.tpnet.pl [83.21.150.186]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by poczta.interia.pl (INTERIA.PL) with ESMTP id 3A0C8769EA2 for ; Mon, 28 Jan 2008 21:39:40 +0100 (CET) Message-ID: <479E3D8B.1010909@interia.pl> Date: Tue, 29 Jan 2008 04:31:00 -0000 From: Alergent User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: ecos-discuss@sourceware.org References: <20080125090139.GA6215@sg-ubuntu> <20080125212412.GA5919@ubuntu> <20080125220617.GA6205@ubuntu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-EMID: 2cf66acc 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] arm7 lpc2xxx abort data exception X-SW-Source: 2008-01/txt/msg00197.txt.bz2 Hi, I have LPC2290 and had very similar problem at the very beginning. The problem was caused by part of the code in /packages/hal/arm/arch/current/src/vectors.S and my configuration settings. There is a ".global __exception_handles" part where in case CYGSEM_HAL_ROM_RESET_USES_JUMP is defined short jump (b reset_vector) is used. In my case it was defined and I had a short jump... Because CPU starts with interrupt vectors remapped to address 0 and the rest is residing somewhere in memory (address depends on boot configuration) long jump (ldr pc,.reset_vetor) is required. Check whether CYGSEM_HAL_ROM_RESET_USES_JUMP is defined and undefine it. Hopefully this will help. Greetings Tomasz > Hi, > > Could it be that you need to do some memory remapping to get the > exception vectors at the right address (they have to be located at > address 0)? I have no idea if the LPC requires this, so just a quick > thought. > > I had a similar issue trying to run a RAM image on the Atmel ARM7 > (AT91SAM7SE) based cpu, in my case the problem was caused because the > SRAM-Flash remap code that wasn't in the RAM image startup sequence. > > Tom > > On Jan 25, 2008 11:06 PM, Sergei Gavrikov wrote: > >> On Fri, Jan 25, 2008 at 01:55:06PM -0800, Jean-David Vuillemain wrote: >> >>> Yes i use a mixture of tool in fact... >>> >>> "Can you undo for GCC-3.2.1 and rebuild new CVS eCos with original tools?" >>> Could you be more explicit please. >>> >> I wonder, will you get a hang on a startup stage when you'll build eCos >> with GNU toolchain from public FTP (a.k.a eCosCentric tools)? And what >> about behaviors of built application for ROM startup? Does that hang >> too? >> >> Sergei >> >> >> >>> JD >>> 2008/1/25, Sergei Gavrikov : >>> >>>> On Fri, Jan 25, 2008 at 10:21:39AM -0800, Jean-David Vuillemain wrote: >>>> >>>>> I can run my application with GDB but the breakpoints you point out >>>>> are not reachable. The program goes straight to the data abort at >>>>> 0x00000010 after a few instructions. >>>>> I didn't get any assertion message. >>>>> >>>> I have another question, Is it possible that you use a mixture of tools? >>>> Is your GNU toolchain a home-cooked stuff? Does the error occur with >>>> GCC-3.2.1? If you build eCos with a recent tolchain, it could be that >>>> you did modify CYGBLD_GLOBAL_CFLAGS and your startup become a broken... >>>> Can you undo for GCC-3.2.1 and rebuild new CVS eCos with original tools? >>>> >>>> Sergei >>>> >>>> >>>>> 2008/1/25, Sergei Gavrikov : >>>>> >>>>>> On Thu, Jan 24, 2008 at 03:38:14PM -0800, Jean-David Vuillemain wrote: >>>>>> >>>>>>> hi, >>>>>>> >>>>>>> i have been working with ecos for a couple of months now. I had no >>>>>>> problem at all with a 8 months old repository source files and my own >>>>>>> port for my target board. After some problem with my working >>>>>>> environment and updating the ecos source files, i can't have my old >>>>>>> work and my new code running on the board. >>>>>>> >>>>>> Working with lpc2xxx targets I update eCos repository every week. Did >>>>>> you try to build eCos with a tracing support? Import 2 lines the below >>>>>> with ecosconfig and rebuild eCos >>>>>> >>>>>> cdl_option CYGPKG_INFRA_DEBUG {user_value 1}; >>>>>> cdl_option CYGDBG_USE_TRACING {user_value 1}; >>>>>> >>>>>> Can you run your application in GDB as >>>>>> >>>>>> b cyg_start >>>>>> b cyg_assert_fail >>>>>> c >>>>>> c >>>>>> >>>>>> I wonder, Did you get same assertion? >>>>>> >>>>>> ASSERT FAIL: <1>lpc2xxx_misc.c[359]hal_interrupt_configure() Invalid vector >>>>>> >>>>>> >>>>>> Sergei >>>>>> >>>>>> >>>>>>> It seems that my code always go through the same steps and finishes by >>>>>>> an exception abort data. >>>>>>> >>>>>>> Here is the code where it fails: >>>>>>> 0x80020070 : ldr r0, [pc, #1020] ; 0x80020474 <.init_flag> >>>>>>> 0x80020074 : ldr r1, [r0] >>>>>>> 0x80020078 : cmp r1, #0 ; 0x0 >>>>>>> 0x8002007c : bne 0x80020078 >>>>>>> 0x80020080 : ldr r1, [pc, #196] ; 0x8002014c >>>>>>> 0x80020084 : str r1, [r0] >>>>>>> 0x80020088 : mov r0, #0 ; 0x0 >>>>>>> 0x8002008c : ldr r1, [pc, #988] ; 0x80020470 >>>>>>> <.__exception_handlers> >>>>>>> 0x80020090 : cmp r7, #19 ; 0x13 >>>>>>> 0x80020094 : beq 0x800200a0 >>>>>>> 0x80020098 : ldr r2, [r1, #40] >>>>>>> 0x8002009c : str r2, [r0, #40] >>>>>>> 0x800200a0 : ldr r2, [r1, #24] >>>>>>> 0x800200a4 : str r2, [r0, #24] <-- this line fails on my >>>>>>> old and new programs >>>>>>> It ends up in an abort data: >>>>>>> 0x00000010 swp r1, r3, [r2] >>>>>>> >>>>>>> Someone has a hint to solve this problem?? >>>>>>> >>>>>>> Thanks in advance. >>>>>>> >>>>>>> Jean-David >>>>>>> >>>>>>> -- >>>>>>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos >>>>>>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss >>>>>>> >>>>> -- >>>>> Jean-David Vuillemain >>>>> jdvuillemain@gmail.com >>>>> >>> -- >>> Jean-David Vuillemain >>> jdvuillemain@gmail.com >>> >> -- >> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos >> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss >> >> >> > > ---------------------------------------------------------------------- Sprawdz, czy pasujesz do swojego partnera! http://link.interia.pl/f1ce7 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss