none
whether a sub-project .exe file gets executed in OSDesign project? RRS feed

  • Question

  • I would like to migrate OS project from WCE6 to WEC7, and I took the couple of subprojects (console applications) from 6 to 7 via add new a subproject and copy/paste the source code.

    There is only one executable file gets called and I can get the retailmsg from my serial port when the system booting-up. But there is no any other retailmsg displayed for rest of subprojects (system is built in release mode).

    So I checked the .bib and .reg file, and found all of the subprojects executable files are shown in .bib: (I attached part of them)

    ; @XIPREGION IF PLATFORM_FILES_MISC
    SetActivePartition.exe  C:\WINCE700\OSDesigns\CrestoneWEC\CrestoneWEC\RelDir\crestone_ARMV7_Release\SetActivePartition.exe               NK
    ; @XIPREGION ENDIF PLATFORM_FILES_MISC
    ; @XIPREGION IF PLATFORM_FILES_MISC
    GetBspVersion.exe  C:\WINCE700\OSDesigns\CrestoneWEC\CrestoneWEC\RelDir\crestone_ARMV7_Release\GetBspVersion.exe               NK
    ; @XIPREGION ENDIF PLATFORM_FILES_MISC
    ; @XIPREGION IF PLATFORM_FILES_MISC
    RtcMSTest.exe  C:\WINCE700\OSDesigns\CrestoneWEC\CrestoneWEC\RelDir\crestone_ARMV7_Release\RtcMSTest.exe               NK
    ; @XIPREGION ENDIF PLATFORM_FILES_MISC
    ; @XIPREGION IF PLATFORM_FILES_MISC
    SetUserPasswords.exe  C:\WINCE700\OSDesigns\CrestoneWEC\CrestoneWEC\RelDir\crestone_ARMV7_Release\SetUserPasswords.exe               NK
    ; @XIPREGION ENDIF PLATFORM_FILES_MISC

    But there is only file .exe file is included in the .reg file, and this is of course the one that gives me log message:

    [HKEY_LOCAL_MACHINE\init]
    "Launch50"="_explorer.exe"
    "Depend50"=hex:14,00, 1e,00
    "Launch80"="SetUserPasswords.exe"
    "Depend80"=hex:3C,00

    I would like to understand why there is mismatch in reg and bib? What is a good way to manage execution order for subproject executable file? And if the rest of subproject .exe files are really get called, or say effectively included in NK.bin?  

     


    • Edited by kyan91 Tuesday, October 15, 2019 10:10 PM
    Tuesday, October 15, 2019 9:30 PM

Answers

  • So, you are saying that the SD card never mounts at all, not even after waiting a long time after booting into CE?

    If that is the case then you will need to debug your SD card driver. What board is this? Which processor, which BSP?


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Tuesday, October 22, 2019 11:25 PM
    Moderator

All replies

  • Subproject executables are NOT automatically called. It is up to you to configure the registry to do that. Best place to do this is of course in the subproject's reg file.

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Wednesday, October 16, 2019 1:25 AM
    Moderator
  • Thanks Michel,

    We are able to narrow down the issue and could you please advise how to check a file: launch.exe (to launch application UI) in resigtry, is properly running or not? How can I view the log messages or where can I add log prints to figure out if it is this file causing the application launch failure. I am now enable KITL debugger, but there is no log from the output regarding to this file.

    (we am trying to launch an application from platform builder, and use HKEY/LOCAL_MACHINE\Init to start this application from SD card)

    Wednesday, October 16, 2019 9:18 PM
  • Launch.exe is not something "standard", it's probably delivered as part of your BSP so look for the source of that.

    Starting an application directly from the Init key is usually a bad idea, especially when the application you want to start is on a mountable store. At the time of processing of the Init key, not all APIs required for your application may be ready yet, and the store you want to execute from may not be mounted yet.

    In the BSPs we create we have an "autoexec.exe" that can be configured (through the registry) to start any number of applications from any location. It can be configured to wait for the window manager APIs to be ready, it can wait for mounting of any storage medium and it can wait for an active Ethernet connection.

    This is something you will need to develop to allow applications to start properly.

    To debug your launcher application, best is of course to build a debug kernel and upload that to the device using Platform Builder with a KITL connection so you can step-debug.


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6



    Wednesday, October 16, 2019 9:35 PM
    Moderator
  • Hello Michel,

    Can you supply more information on 'autoexec.exe'?

    I have an .exe file cannot be executed from SD Card during the system boot-time. No matter I set path as  "\\Myprogram.exe" or "Storage Card\\Myprogram.exe". So I would like to check if there is any mounting SD card issue.

    I found your another post also mentioned "So, you would need to create a simple native process, let's call it autoexec.exe, that first waits for your your storage device to be fully mounted, and only then launches your application."

    Is this a small program we need to develop by ourselves? Thanks

    This is what my registry looks like:

    "Launch10"="shell.exe"
    
    "Launch20"="device.dll"
    "Depend20"=hex:0a,00
    
    "Launch30"="gwes.dll"
    "Depend30"=hex:14,00
    
    "Launch50"="explorer.exe"
    "Depend50"=hex:14,00, 1e,00
    
    "Launch55"="dmsrv.exe"
    
    "Launch60"="servicesStart.exe" 
    "Depend60"=hex:14,00
    
    "Launch70"="Myprogram.exe"
    
    "Launch79"="compositor.exe"
    "Depend79"=hex:1E,00 
    
    "Launch80"="SetUserPasswords.exe"
    "Depend80"=hex:3C,00

    • Edited by kyan91 Saturday, October 19, 2019 10:49 PM
    Saturday, October 19, 2019 10:46 PM
  • >Is this a small program we need to develop by ourselves?

    Yes.

    You need to write a native application that gets started from your Init key. That native application will request device notifications of storage devices (with the BLOCK_DRIVER_GUID). Once you receive the notification, try to open the store by name. If that doesn't work, wait a bit and try again. Close the store handle, close the notification queue, and now you can call CreateProcess on your executable residing on the now mounted and available storage medium.


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Sunday, October 20, 2019 6:23 AM
    Moderator
  • Hello Michel,

    Another question: Instead of creating another program 'autoexec.exe' to request device notification for the storage device, how can we debug where is the issue cause the SD card mounting issue? Because, the same BSP (the same registry) is working fine in CE6, and here we are using this BSP in EC7. And this SD card was also used to downloaded the kernel image to NADN, before the application requiring to access it in this stage.

    (As we discussed before about KITL, it is not helpful for us when the kernel image in release build. we cannot make a debug build kernel, because RAM limitation (128MB) on this hardware)

    • Edited by kyan91 Monday, October 21, 2019 9:22 PM
    Monday, October 21, 2019 7:43 PM
  • Hello, Michelle, another question: In addition to creating another program to request device notifications for storage devices, is there any way to debug the location that caused this SD card installation problem? Because the same BSP works fine in WCE6 without SD card read problems, and the SD card can also be downloaded to NAND before the WEC7 core image is "mounted" and accessed for provisioning. (As mentioned earlier, KITL is not very helpful to me when the kernel is in the release version. Due to the limitation of RAM size (128MB), I can't make a valid debug version for this hardware.

    First of all, my name is Michel, 2nd; not everybody speaks Chinese. This is an English language forum, so at least use Google Translate so you can post in English.

    Your CE6 kernel may have stored the hive based registry on the SD card. In that case, the card gets mounted very early in the bootprocess and thus it will be available at the time the Init key is processed by the system.

    Being able to store NK and bootloader on the SD from the bootloader, or booting from the SD card has NOTHING to do with mounting the SD card.

    A way around the whole issue (if you really don't want to create a simple native "autoexec" application) is to put the hive based registry on the SD card.

    Proving to you that the SD card is not mounted at the time of Init is easy; create a small application that creates a file on the SD card and start that from the Init key. You will see the file will not be created (unless you wait for the SD card to be mounted).


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Monday, October 21, 2019 7:52 PM
    Moderator
  • Hi Michel, 

    So sorry to make it so embarrassing... I typed in my question in English originally, but the browser 'helped' to translate my post in another language. Thank for translating them back, and it looks like the information is kept as it should be.

    I edited my previous reply, and am started working on figuring out if the 'autoexec' exists in the WEC6 BSP, and why it is working in CE6, not not in my EC7. 


    • Edited by kyan91 Monday, October 21, 2019 9:23 PM
    Monday, October 21, 2019 9:14 PM
  • Hello Michel,

    Now we know the issue is that SD card is not mounted. we added a 60-seconds delay before accessing the SD card, and it didn't help. We checked multiple places in our code that the accessing SD card is properly set:

    1. In catalog: Driver/SD memory and Driver/SD Bus Driver are checked.

    2. In catalog: Fat File System is checked.

    3. In registry: Hive base registries are set in the image:

    [HKEY_LOCAL_MACHINE\init\BootVars]
    "SystemHive"="Windows\\Registry\\system.hv"

    4. Path is 'Storage Card'. And in C# application we set the path = @"Storage Card\myapp.exe". Or in init, we set as: Storage Card\\myapp.exe.

    "Folder"="Storage Card"

    Could you please guide, where else should we check to make the SD mounted? Thanks!

    Regards,

    Xuke



    Tuesday, October 22, 2019 10:37 PM
  • So, you are saying that the SD card never mounts at all, not even after waiting a long time after booting into CE?

    If that is the case then you will need to debug your SD card driver. What board is this? Which processor, which BSP?


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Tuesday, October 22, 2019 11:25 PM
    Moderator
  • SD card never mounts is the problem in our case. Thanks for your suggestions and we are doing the debug on SD card driver and Fatfs auto-mount feature.

    The board: VAR-SOM-OM37. Processor: AM3703CUS. BSP: Variscite for WEC7.

    The SDbus2 driver we are using is from public/oak/driver. SD card size 2GB. 


    • Edited by kyan91 Wednesday, October 23, 2019 6:07 PM
    Wednesday, October 23, 2019 3:42 PM