BSP Template now available for CE 6.0 / CE6R2

New sample code called the BSP Template is now available for download.  This code serves two major purposes:

1. Provide a stub version of a BSP that illustrates all required and optional BSP functions.

2. Educate newcomers to CE on the basics of BSPs in an incremental fashion.

The BSP Template is compatible with CE6.0 and CE6R2.  You can find it attached to this post.


Comments (9)

  1. Разработка BSP – самая трудоемкая задача при создании устроств на базе Windows E

  2. Doug Boling says:

    Very cool.  I would suggest that you add CPU specific subdirectories under OALLIB to show how to add assembly code.  This is needed for the Startup function anyway.  

    You could use update the SOURCES file as used to be done in the old Odo BSP to compile only the assembly code appropriate for the target CPU.

  3. ce_base says:

    Thanks for the suggestion, Doug.

    You’re right that assembly is needed for the Startup function.  The tradeoff is having 4 separate assembly files, only one of which would be used at compile time.  My worry was that would confuse newcomers, whereas using the .c file I can explain the complexity ahead of time and still make sure we compile for all architectures.

    I think that the 4-assembly file oallib would be a great thing to add in the tutorial area.

  4. Doug Boling says:

    One more thing…

    It would be good to show the various HAL_IOCTL commands being parsed in the OEMIocontrol function.  Even if you have the code do nothing, you could add comments on what each of the commands does and the REQUIRED / OPTIONAL tags.  

    This would also help to differentiate the commands that are still used and those that are’t needed anymore (you wouldn’t list those.)


  5. ce_base says:

    One of the goals of the BSP Template is to provide a truly minimal set of stubs so it is less intimidating to someone looking at it for the first time.  Since the CE kernel doesn’t require a response to any OEMIoControl code, I left it blank.

    Of course, it’s a gray area because for most CE devices you would want to implement at least a few IOCTLs.  That’s why I left it to the tutorial section.  If you look at tutorial #4 (Tutorial: Implementing a HALFlat display driver), it actually demonstrates how you would handle an IOCTL code inside OEMIoControl.  However, a more general "Implementing OEMIoControl" tutorial would be a great addition.

  6. Alex says:


    your argument about "less intimidating" for me has no much sense here since sonner or later one will face (many) "intimidating" tasks developing a whole BSP. So I prefer completeness in this case, that will help me to do the job easer.



  7. Chaitanya says:


    Good Platform for Learning.

    We faced some problems when we use the Template for Developing a Custom BSP.

    Looks it doesn’t contain some Linker Defines required like


    Can some body please explain why the above Macro is required, with out this macro our initial boot code is not working.

    Thank You & Regards,


  8. ce_base says:


    I understand that you’ll have to get the whole picture eventually.  Maybe a better way to phrase "less intimidating" would be "avoiding information overload."  I believe that getting the fundamentals down is of primary importance when you’re learning something new.  If there is too much information at the beginning, you end up with a mediocre understanding of everything.  The template is meant to be a starting point, so the information is simple and incremental – a conscious tradeoff vs. completeness.  Fortunately, you have full examples in the form of the CE reference BSPs when you are looking for completeness.


    Those LDEFINES are added to and overridden by the CE linker.  -subsystem:native gets overridden by /subsystem:windowsce,6.00 if you look at the build.log.  So declaring subsystem:native does nothing.  Also, if you look at the build.log, you’ll see /debug and /debugtype:cv are added automatically.  So I don’t see how having this macro in the sources file would make a difference.  Further questions along these lines would be a great topic for the CE newsgroup at microsoft.public.windowsce.platbuilder.