none
How to set sysgen variable RRS feed

  • Question

  • Hello,

    I'm working on a new BSP and to test it I created a very simple OS design. When I compile one of the drivers I got an error:

    BUILD: [01:0000001323:ERRORE] some_driver.lib(some_file.obj) : error LNK2019: unresolved external symbol OpenDeviceKey referenced in function Some_Function

     

    I found that the OpenDeviceKey is a function from the devload.lib.

    ; @CESYSGEN IF COREDLL_DEVLOAD

       OpenDeviceKey @1396

       DDKReg_GetWindowInfo @1668

       DDKReg_GetIsrInfo @1669

       DDKReg_GetPciInfo @1670

    ; @CESYSGEN ENDIF

     

    Looking to the winceos.bat I found that the devload.lib would be included to the coredll only if the __SYSGEN_DEVLOAD is set, which depends on some catalog components that are not included into my OS design and I actually need none of them.

    Is that possible to set some sysgen to include the devload.lib to the coredll w/o adding unnecessary components to the OS design?

    Thanks,

    Vitaly

     

        

      

    Thursday, July 21, 2011 4:59 PM

Answers

  • Have you tried to set the SYSGEN in %_TARGETPLATROOT%\cebasecesysgen.bat in the PASS1 section.
    For example

    REM Pass1. Add new platform specific settings here.
    if /i not "%1"=="pass1" goto :Not_Pass1
    set __SYSGEN_DEVLOAD=1
    ...

    • Proposed as answer by Prabu[MCTS] Friday, July 22, 2011 6:15 AM
    • Marked as answer by Vitaly_A Friday, July 22, 2011 11:55 AM
    Thursday, July 21, 2011 6:47 PM
  • just a note: the sysgen variables with the leading underscores are typically for 'internal' use of the build tools; they seldom are not associated to a specific catalog items. be careful in setting them explicitely since there may be other dependencies.
    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    • Marked as answer by Vitaly_A Friday, July 22, 2011 11:55 AM
    Friday, July 22, 2011 6:18 AM

All replies

  • Have you tried to set the SYSGEN in %_TARGETPLATROOT%\cebasecesysgen.bat in the PASS1 section.
    For example

    REM Pass1. Add new platform specific settings here.
    if /i not "%1"=="pass1" goto :Not_Pass1
    set __SYSGEN_DEVLOAD=1
    ...

    • Proposed as answer by Prabu[MCTS] Friday, July 22, 2011 6:15 AM
    • Marked as answer by Vitaly_A Friday, July 22, 2011 11:55 AM
    Thursday, July 21, 2011 6:47 PM
  • Thanks, that helped.

     

    Friday, July 22, 2011 3:12 AM
  • just a note: the sysgen variables with the leading underscores are typically for 'internal' use of the build tools; they seldom are not associated to a specific catalog items. be careful in setting them explicitely since there may be other dependencies.
    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    • Marked as answer by Vitaly_A Friday, July 22, 2011 11:55 AM
    Friday, July 22, 2011 6:18 AM
  • In addition, if you only need OpenDeviceKey from that lib you may grab the function implementation and cut & paste it in your code: if you installed the shared source code you can take a look at %_WINCEROOT%\PRIVATE\WINCEOS\DRIVERS\DEVLOAD\devreg.cpp
    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Friday, July 22, 2011 12:34 PM
  • My question was not about the OpenDeviceKey function only, but how to include a specific module to the coredll. BSP drivers may require some modules which depending on OS configuration may be included or not to the coredll. In case if the required module is not included I need a way to include it. Regarding the OpenDeviceKey. Most likely in a usual OS design PM component will be enabled and __SYSGEN_DEVLOAD will be set.     

    Friday, July 22, 2011 12:46 PM