From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32688 invoked by alias); 11 Jul 2009 09:18:25 -0000 Received: (qmail 32673 invoked by uid 22791); 11 Jul 2009 09:18:24 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from www.meduna.org (HELO meduna.org) (92.240.244.38) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Jul 2009 09:18:12 +0000 Received: from dial-78-141-95-31-orange.orange.sk ([78.141.95.31] helo=[192.168.130.27]) by meduna.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MPYib-00012G-Oz for ecos-discuss@ecos.sourceware.org; Sat, 11 Jul 2009 11:18:09 +0200 Message-ID: <4A5858BE.9000005@meduna.org> Date: Sat, 11 Jul 2009 09:18:00 -0000 From: Stanislav Meduna User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: eCos Discussion Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Authenticated-User: stano@meduna.org X-Authenticator: dovecot_plain X-Spam-Score: -8.1 X-Spam-Score-Int: -80 X-Exim-Version: 4.69 (build at 30-Sep-2008 18:26:44) X-Date: 2009-07-11 11:18:09 X-Connected-IP: 78.141.95.31:1492 X-Message-Linecount: 58 X-Body-Linecount: 48 X-Message-Size: 2147 X-Body-Size: 1774 X-Received-Count: 1 X-Recipient-Count: 1 X-Local-Recipient-Count: 1 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 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: [ECOS] How to write a complicated bootloader? X-SW-Source: 2009-07/txt/msg00064.txt.bz2 Hi, I have a hardware with a complicated ethernet device that is not usable in a polled mode (or at least I don't have enough documentation to be able to use it in such a way). There is an OEM driver needing all kind of stuff (including eCos kernel) to run, that works fine in a regular application. The hardware has a serial port, which is enough for debugging, but pain in the you know where for downloading our 2+ MB large binary over max. 115200 bps. In the field this serial port won't be available at all, so the only way to upgrade the device is via ethernet. What I'd like to have is some kind of bootloader, that is able to - load the application via ethernet - manipulate the flash (application upgrade and at least initialize the jffs, even better to access it filewise) - start the loaded application - support debugging the application at least over serial line including the asynchronous ctrl-c support (ethernet in a way of gdbserver would be nice, but I imagine this can't be achieved in the eCos architecture where the application and OS can't be really separated) Is there any special magic in loading an application somewhere into memory and transfer control to it, while leaving the GDB stubs in the bootloader? For the development cycle I imagine something like: - connect with the gdb over serial - connect with a telnet-like interface over ethernet - initiate a tftp load - run the application - the application loads, runs and breaks into the gdb as soon as the basic initialization is done (everything else in the bootloader is now dead, only the vectors needed for serial comm remain) Is there information (and examples) available on how to approach this? Many thanks for hints -- Stano -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss