From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14653 invoked by alias); 23 Oct 2014 09:55:59 -0000 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 Received: (qmail 14640 invoked by uid 89); 23 Oct 2014 09:55:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f174.google.com Received: from mail-wi0-f174.google.com (HELO mail-wi0-f174.google.com) (209.85.212.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 23 Oct 2014 09:55:57 +0000 Received: by mail-wi0-f174.google.com with SMTP id q5so244148wiv.13 for ; Thu, 23 Oct 2014 02:55:54 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.103.74 with SMTP id fu10mr4549975wjb.0.1414058153930; Thu, 23 Oct 2014 02:55:53 -0700 (PDT) Received: by 10.180.83.67 with HTTP; Thu, 23 Oct 2014 02:55:53 -0700 (PDT) In-Reply-To: <5447C1D0.3070906@unicore.co.ua> References: <544618E5.90101@unicore.co.ua> <54479031.9080106@unicore.co.ua> <5447C1D0.3070906@unicore.co.ua> Date: Thu, 23 Oct 2014 09:55:00 -0000 Message-ID: From: Edgar Grimberg To: Oleg Uzenkov Cc: eCos Discussion Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Subject: Re: [ECOS] small custom bootloader to start an app stored in flash X-SW-Source: 2014-10/txt/msg00038.txt.bz2 > (gdb) next > > Breakpoint 8, 0x08020000 in ?? () Here it looks like you leave the bootloader space and you reach the start of the application. > (gdb) next > Cannot find bounds of current function This is fine, there are no functions here. Also, you are not debugging the bootloader anymore, so GDB doesn't know any of the new addresses to match them with the symbols from the elf file. > ..... > program just hangs when continued. It looks like the application has a problem. >> 4. Try starting your application (0x08020000) from the debugger >> directly, see if you get the printf. > > ... > (gdb) load > Loading section .rom_vectors, size 0x8 lma 0x8020000 > Loading section .ARM.extab, size 0x3c lma 0x8020008 > Loading section .ARM.exidx, size 0xc8 lma 0x8020048 > Loading section .text, size 0x586c lma 0x8020110 > Loading section .rodata, size 0x10d lma 0x8025980 > Loading section .data, size 0x268 lma 0x8025a98 > Start address 0x8020110, load size 23789 > Transfer rate: 3 KB/sec, 3398 bytes/write. > (gdb) next > Cannot find bounds of current function > ... Does it display the printf if you continue? If not, this confirms the theory that the application does not start correctly from its start address. Read Rainer's email, too. He might have spotted the problem. About GBD, if you are debugging an elf that sits on the flash, load won't flash it for you (unless you have a really smart debugger). But, a side effect of the load command is that the PC is pointing to the start address. Edgar -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss