From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2543 invoked by alias); 9 Nov 2010 12:31:36 -0000 Received: (qmail 2490 invoked by uid 22791); 9 Nov 2010 12:31:35 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Nov 2010 12:31:29 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 08F7E2F80001 for ; Tue, 9 Nov 2010 12:31:27 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JpvqZllerxvh; Tue, 9 Nov 2010 12:31:24 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001070] BSP for Olimex LPC-L2294-8M X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: sergei.gavrikov@gmail.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 09 Nov 2010 12:31:00 -0000 Message-Id: <20101109123124.A14042F78003@mail.ecoscentric.com> 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: 2010-11/txt/msg00010.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001070 --- Comment #4 from Sergei Gavrikov 2010-11-09 12:31:22 GMT --- (In reply to comment #3) > I've followed your suggestion, and it looks like nothing broken. I think adding > another option(s) for the FLASH part is overkilling, what is your opinion? > This is the 1st time I'm playing with eCos and CDL, I wrote this with the > copy-and-paste method, so any other remarks from experienced eCos user are > welcome. As you could notice I added in that CDL component example a line: define -file system.h CYGHWR_BOARD. NOTE: for real world it would be better to name it as CYGHWR_OLIMEX_BOARD instead. That will define in system.h header either CYGHWR_BOARD_OLPCL2294_1M constant or CYGHWR_BOARD_OLPCL2294_8M according your choice. So, your code in hal_platform_setup.h (and in FLASH device driver as well) can look like: #if defined(CYGHWR_BOARD_OLPCL2294_1M) // code for 1M variant #elif defined(CYGHWR_BOARD_OLPCL2294_8M) // code for 8M variant #else # error Not supported board. #end what is more clear than your checks: #if CYGHWR_HAL_ARM_LPC2XXX_OLPCL2294_RAMSIZE == 0x00100000 ... Agreed? So, try to use those constants to differ the parts of code. Check it: if you build eCos with defaults, then your will have: #define CYGHWR_BOARD OLPCL2294_1M #define CYGHWR_BOARD_OLPCL2294_1M if you import below and rebuild eCos cdl_component CYGHWR_HAL_ARM_LPC2XXX_OLPCL2294_VARIANT { user_value OLPCL2294_8M }; then your header will have yours #define CYGHWR_BOARD OLPCL2294_8M #define CYGHWR_BOARD_OLPCL2294_8M So, you can use checks like in example the above in any source which includes system.h. Ah, once again, use there: 'define -file system.h CYGHWR_OLIMEX_BOARD' as 'CYGHWR_BOARD' is too generic name. -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.