From: bugzilla-daemon@bugs.ecos.sourceware.org
To: ecos-patches@ecos.sourceware.org
Subject: [Bug 1001070] BSP for Olimex LPC-L2294-8M
Date: Tue, 09 Nov 2010 12:31:00 -0000 [thread overview]
Message-ID: <20101109123124.A14042F78003@mail.ecoscentric.com> (raw)
In-Reply-To: <bug-1001070-104@http.bugs.ecos.sourceware.org/>
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 <sergei.gavrikov@gmail.com> 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 <pkgconf/system.h> 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 <pkgconf/system.h> 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.
next prev parent reply other threads:[~2010-11-09 12:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 15:36 [Bug 1001070] New: " bugzilla-daemon
2010-11-09 9:53 ` [Bug 1001070] " bugzilla-daemon
2010-11-09 11:34 ` bugzilla-daemon
2010-11-09 11:43 ` bugzilla-daemon
2010-11-09 12:31 ` bugzilla-daemon [this message]
2010-11-22 9:02 ` bugzilla-daemon
2010-11-22 9:43 ` bugzilla-daemon
2010-11-22 9:46 ` bugzilla-daemon
2010-11-22 11:12 ` bugzilla-daemon
2010-11-22 11:33 ` bugzilla-daemon
2010-11-25 13:34 ` bugzilla-daemon
2010-11-25 13:38 ` bugzilla-daemon
2010-12-15 4:41 ` bugzilla-daemon
2010-12-15 6:43 ` bugzilla-daemon
2010-12-16 12:29 ` bugzilla-daemon
2010-12-16 12:34 ` bugzilla-daemon
2011-03-14 19:46 ` bugzilla-daemon
2011-11-08 1:15 ` bugzilla-daemon
2011-11-08 1:17 ` bugzilla-daemon
2011-11-08 1:17 ` bugzilla-daemon
2011-11-08 10:41 ` bugzilla-daemon
2011-11-08 17:08 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101109123124.A14042F78003@mail.ecoscentric.com \
--to=bugzilla-daemon@bugs.ecos.sourceware.org \
--cc=ecos-patches@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).