Re: Get "Bad subdirectory" build error when specifying a non-subdirectory in DIRS

Tech-Archive recommends: Speed Up your PC by fixing your registry



Thanks for your reply!

I'll try conditional CDEFINES in sources.cmn. But I read the following in PB5.0's help:

"After Build.exe parses a sources file, Nmake.exe incorporates the sources file into the common makefile file, Makefile.def. Build.exe follows only the macro assignments and ignores other lines, such as conditional Nmake.exe statements. Conditional statements in sources files are not supported."

Does it say that the means you mentioned is unsupported?

Zhou Yu
nap_yu@xxxxxxxxxxx




"Dean Ramsier" <ramsiernospam@xxxxxxxxxx> 写入消息 news:##WvpOdhIHA.5780@xxxxxxxxxxxxxxxxxxxxxxx
The typical way of passing information to the build tools like this is to use a CDEFINE in the sources file that is controlled by an environment variable. That will allow your code to be conditionally compiled. But instead of spending the time to implement this, might as well spend the same time to fix the code and do it correctly...

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Zhou Yu" <nap_yu@xxxxxxxxxxx> wrote in message news:898526B9-7AE3-4247-9273-585AC9AA6426@xxxxxxxxxxxxxxxx
I agree. I just do it for a temporary workaround.

Regards,
Zhou Yu
nap_yu@xxxxxxxxxxx


"Dean Ramsier" <ramsiernospam@xxxxxxxxxx> 写入消息 news:ew7IMMShIHA.2268@xxxxxxxxxxxxxxxxxxxxxxx
Sounds like you're violating the point of Platform\Common. It shouldn't have BSP specific code. You need to do some more work to separate out *COMMON* code (meaning no BSP dependencies) from BSP code.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Joe Yu" <nap_yu@xxxxxxxxxxx> wrote in message news:4892928D-C95C-4B1F-9FDD-DD399AAAEB34@xxxxxxxxxxxxxxxx
It does work. Thanks! :)

However, I still have a question. My code in \Platform\Common uses compiler directives to separate code for different BSPs. How can I pass the corresponding CDEFINES to to the compiler when building?

Regards,
Joe Yu
nap_yu@xxxxxxxxxxx


"Dean Ramsier" <ramsiernospam@xxxxxxxxxx> 写入消息
news:#5QbPFHhIHA.1944@xxxxxxxxxxxxxxxxxxxxxxx
You don't.

Your common library needs to be in the \Platform\Common tree, which is
always built.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Zhou Yu" <nap_yu@xxxxxxxxxxx> wrote in message
news:28ECFBDF-B1B9-4A45-8B57-6AE2513BBAF1@xxxxxxxxxxxxxxxx
Thank you :) Your answer is really helpful.

However, I still have a question. How to build MYBSP_COMMON\SRC\COMMON\IO
to a lib when building my OS design based on BSP1 or BSP2.

Sorry I'm a beginner for WinCE.

Joe Yu



"Luca Calligaris" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx> 写入消息
news:OfbnlKDhIHA.536@xxxxxxxxxxxxxxxxxxxxxxx
you do not need to have MYBSP_COMMON\SRC\COMMON\IO
in dirs files in your BSP1 / BSP2:

supposing that the common IO folder will build a .lib file
(bsp_common_io.lib) in PLATFORM\COMMON\LIB\... you can put
this in sources files in BSP1 / BSP2 IO folders:

TARGETNAME=bsp1_io.lib
TARGETTYPE=LIBRARY
RELEASETYPE=PLATFORM

SOURCES=

SOURCELIBS= \
$(_PLATCOMMONLIB)\$(_CPUDEPPATH)\bsp_common_io.lib


TARGETNAME=bsp2_io.lib
TARGETTYPE=LIBRARY
RELEASETYPE=PLATFORM

SOURCES=

SOURCELIBS= \
$(_PLATCOMMONLIB)\$(_CPUDEPPATH)\bsp_common_io.lib


--

Luca Calligaris
www.eurotech.it

"Zhou Yu" <nap_yu@xxxxxxxxxxx> ha scritto nel messaggio
news:C6BD5CA1-DFE9-4FC9-9707-A5AD2B085B6A@xxxxxxxxxxxxxxxx
Hi,

I want to share some code between at least 2 BSPs in PB5.0. This comes
from the idea that I don't want to fix the same bug between different
BSPs source trees. What I'm doing is to organize my BSP source trees in
the way like the following:

$(_PLATFORMROOT)\

MYBSP1\SRC\COMMON\IO
dirs

MYBSP2\SRC\COMMON\IO
dirs

MYBSP_COMMON\SRC\COMMON\IO
sources
makefile
io.c

Either MYBSP1\SRC\COMMON\IO\dirs or MYBSP2\SRC\COMMON\IO\dirs defines
DIRS = ..\..\..\..\MYBSP_COMMON\SRC\COMMON\IO.

When I build my OS design based on either MYBSP1 or MYBSP2, PB5.0
report an error like "BUILD: [00:0000000005:ERRORE] Bad subdirectory:
..\..\..\..\MYBSP_COMMON\SRC\COMMON\IO.

Looks like that DIRS can NOT traverse directory other than its
subdirectories.

How can I fix this problems? Or how can I share common source code
between similar BSPs?

Thanks in advance!

Joe Yu
nap_yu@xxxxxxxxxxx














.



Relevant Pages

  • Re: Where is the right place for OAL source files in CE 5.0?
    ... You make the changes to the sources file in your BSP, not in the common ... but I don't think modifying files in the common tree is ...
    (microsoft.public.windowsce.platbuilder)
  • Help needed creating a BPS with customer .CEC files
    ... I'm using PB5 and am trying to generate the same CE image (except hardware ... specifics) for what is currently 3 differenent x86 based platforms that we ... single project and a custom developed BSP for each of the platforms, ... However it appears that the SOURCES file doesn't ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Wince 6 build
    ... the sources file look like: ... I did a lot of changes in include folders and library folders but most ... The problem is that when I try to compile my BSP ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Get "Bad subdirectory" build error when specifying a non-subdirectory in DIRS
    ... use a CDEFINE in the sources file that is controlled by an environment ... *COMMON* code (meaning no BSP dependencies) from BSP code. ... in dirs files in your BSP1 / BSP2: ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Rebuild Issue after modifying Sources File
    ... inside the KERNEL subtree of your BSP, try to rebuild it (you can do ... Valter Minutewww.fortechembeddedlabs.it ... after trying to rebuild with the above issue and being ... the original source file and the SOURCES file. ...
    (microsoft.public.windowsce.platbuilder)