Showing posts with label Atom. Show all posts
Showing posts with label Atom. Show all posts

Thursday, February 12, 2015

Intel Atom WEC7 BSP SDCard driver not compiling

Hi Folks,

If you are using the Intel Atom BSP, available for download from Adeneo Embedded website (http://www.adeneo-embedded.com/Products/Board-Support-Packages/Intel) with the Windows Embedded Compact 7 updates higher than March 2014, you will experiment build issue for the SDCard.

Microsoft folks have change the signature of the pSDIODisconnectInterrupt field of the SDCARD_API_FUNCTIONS structure. So function pointer to SDIODisconnectInterrupt__X is expected to be SD_API_STATUS SDIODisconnectInterrupt__X(SD_DEVICE_HANDLE hDevice) instead of  VOID SDIODisconnectInterrupt__X(SD_DEVICE_HANDLE hDevice)

This results in having the following error :
BUILD: [00:0000000028:PROGC ] Building COMPILE Pass in C:\WINCE700\platform\Intel_CS\SRC\DRIVERS\sdcard30\sdbus\ directory.
BUILD: [01:0000000039:PROGC ] Compiling .\sdbus.cpp
BUILD: [01:0000000042:ERRORE] Error(s) in directory "C:\WINCE700\platform\Intel_CS\SRC\DRIVERS\sdcard30\sdbus\". {log="C:\WINCE700\platform\Intel_CS\src\drivers\sdcard30\SDBus\bldsys.log(29)"}
BUILD: [01:0000000043:ERRORE] c:\wince700\platform\intel_cs\src\drivers\sdcard30\sdbus\sdbus.cpp(1896) : error C2440: '=' : cannot convert from 'void (__cdecl *)(SD_DEVICE_HANDLE)' to 'PSD_IO_DISCONNECT_INTERRUPT' {log="C:\WINCE700\platform\Intel_CS\src\drivers\sdcard30\SDBus\bldsys.log(30)"}


To fix this modify the block of code loacted at line 1805 in WINCE700\platform\Intel_CS\SRC\DRIVERS\sdcard30\sdbus\sdbus.cpp

// Fix link to Microsoft Update
// VOID SDIODisconnectInterrupt__X(SD_DEVICE_HANDLE hDevice)
SD_API_STATUS SDIODisconnectInterrupt__X(SD_DEVICE_HANDLE hDevice)
{
    SD_API_STATUS   status = SD_API_STATUS_INVALID_PARAMETER;  // intermediate status
    CSDDevice *     pDevice = CSDHostContainer::GetDeviceByDevice((HANDLE)hDevice);
    if (pDevice) {
        __try {
            status = pDevice->SDIOConnectDisconnectInterrupt( NULL,FALSE);
        }
        __except (SDProcessException(GetExceptionInformation())) {
            status = SD_API_STATUS_ACCESS_VIOLATION;
        }
        pDevice->DeRef();
    }
    DEBUGMSG(SDCARD_ZONE_ERROR && !SD_API_SUCCESS(status), (TEXT("SDIODisconnectInterrupt__X: Failed status 0x%08X \n"),status));

return status;
}

Then rebuild the SDCard driver to check the correctness of the modification.

Enjoy
-Nicolas

Intel Atom WEC7 BSP boot failing when SMP enabled

Hi Folks,

If you are using the Intel Atom BSP, available for download from Adeneo Embedded website (http://www.adeneo-embedded.com/Products/Board-Support-Packages/Intel) with the Windows Embedded Compact 7 updates higher than July 2013, you will experiment boot issue when the SMP (multicore) is enabled.

In July 2013 Microsoft has release an update of the common source code for the management of SMP under x86 platform, and as the Intel Atom BSP is using his own lib flavor, then the BSP is no longer compatible with what WEC7 is expecting.
So you have to link to the correct library in the OAL, and for this, edit the sources file located in WINCE700\Platform\INTEL_CS\SRC\OAL\OALEXE.

At line 73 replace
$(_PLATLIB)\$(_CPUINDPATH)\oal_mpsupport_atom.lib \
by
$(_PLATCOMMONLIB)\$(_CPUINDPATH)\oal_mpsupport_x86.lib \

Then just rebuild the OALEXE folder and perform a make image... and voilà

Enjoy
-Nicolas