Initial commit from NXP 2.6.7 sources
NXP is constantly breaking links, but it was found at: https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcu-bootloader-for-nxp-microcontrollers:MCUBOOT
This commit is contained in:
206
tools/common/blfwkdll/blfwk.vcxproj
Normal file
206
tools/common/blfwkdll/blfwk.vcxproj
Normal file
@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\blfwk\AESCounter.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\AESKey.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\BlfwkErrors.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\Blob.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\Bootloader.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\BusPal.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\BusPalPeripheral.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\Command.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\Crc.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\DataSource.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\DataSourceImager.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\DataTarget.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\ELF.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\ELFSourceFile.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\EndianUtilities.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\ExcludesListMatcher.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\format_string.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\GHSSecInfo.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\GlobMatcher.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\HexValues.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\hidapi.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\host_types.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\IntelHexSourceFile.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\int_size.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\json.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\Logging.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\OptionContext.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\options.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\Packetizer.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\Peripheral.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\Random.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\rijndael.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\RijndaelCTR.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\SBSourceFile.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\SearchPath.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\serial.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\SerialPacketizer.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\smart_ptr.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\SourceFile.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\SRecordSourceFile.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\stdafx.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\StELFFile.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\StExecutableImage.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\StIntelHexFile.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\StringMatcher.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\StSRecordFile.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\UartPeripheral.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\Updater.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\UsbHidPacketizer.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\UsbHidPeripheral.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\utils.h" />
|
||||
<ClInclude Include="..\..\..\src\blfwk\Value.h" />
|
||||
<ClInclude Include="..\..\..\src\bootloader\bootloader.h" />
|
||||
<ClInclude Include="..\..\..\src\bootloader\command.h" />
|
||||
<ClInclude Include="..\..\..\src\crc\crc16.h" />
|
||||
<ClInclude Include="..\..\..\src\crc\crc32.h" />
|
||||
<ClInclude Include="..\..\..\src\include\bootloader_common.h" />
|
||||
<ClInclude Include="..\..\..\src\packet\serial_packet.h" />
|
||||
<ClInclude Include="..\..\..\src\property\property.h" />
|
||||
<ClInclude Include="..\..\..\src\usb_device\bootloader_hid_report_ids.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\AESCounter.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\AESKey.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Blob.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Bootloader.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\BusPal.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\BusPalPeripheral.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Command.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Crc.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\DataSource.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\DataSourceImager.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\DataTarget.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\ELFSourceFile.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\ExcludesListMatcher.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\format_string.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\GHSSecInfo.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\GlobMatcher.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\HexValues.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\hid-windows.c" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\IntelHexSourceFile.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\jsoncpp.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Logging.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\options.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Random.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\rijndael.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\RijndaelCTR.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\SBSourceFile.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\SearchPath.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\serial.c" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\SerialPacketizer.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\SourceFile.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\SRecordSourceFile.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\StELFFile.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\StExecutableImage.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\StIntelHexFile.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\StSRecordFile.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\UartPeripheral.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Updater.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\UsbHidPacketizer.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\UsbHidPeripheral.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\utils.cpp" />
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Value.cpp" />
|
||||
<ClCompile Include="..\..\..\src\crc\src\crc16.c" />
|
||||
<ClCompile Include="..\..\..\src\crc\src\crc32.c" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{DE64A8C3-695A-491F-B3E3-24D6A3057A40}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>blfw</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(ProjectDir)$(ProjectName)-$(Configuration)\</OutDir>
|
||||
<IntDir>$(ProjectDir)$(ProjectName)-$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(ProjectDir)$(ProjectName)-$(Configuration)\</OutDir>
|
||||
<IntDir>$(ProjectDir)$(ProjectName)-$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>BOOTLOADER_HOST;WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../../src;../../../src/include;../../../src/drivers/common;../../../src/bm_usb</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Lib>
|
||||
<AdditionalDependencies>setupapi.lib</AdditionalDependencies>
|
||||
</Lib>
|
||||
<Bscmake>
|
||||
<PreserveSbr>true</PreserveSbr>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>BOOTLOADER_HOST;WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../../src;../../../src/include;../../../src/drivers/common;../../../src/bm_usb</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
<Lib>
|
||||
<AdditionalDependencies>setupapi.lib</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
332
tools/common/blfwkdll/blfwk.vcxproj.filters
Normal file
332
tools/common/blfwkdll/blfwk.vcxproj.filters
Normal file
@ -0,0 +1,332 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Target Header Files">
|
||||
<UniqueIdentifier>{fb17e7f8-107f-4583-b9ff-f467d2a37db4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Target Source Files">
|
||||
<UniqueIdentifier>{01992201-ccdd-4a18-b77f-85d5c5353cd0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\include\bootloader_common.h">
|
||||
<Filter>Target Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\usb_device\bootloader_hid_report_ids.h">
|
||||
<Filter>Target Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\bootloader\command.h">
|
||||
<Filter>Target Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\packet\serial_packet.h">
|
||||
<Filter>Target Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\crc\crc16.h">
|
||||
<Filter>Target Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\property\property.h">
|
||||
<Filter>Target Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\bootloader\bootloader.h">
|
||||
<Filter>Target Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\Packetizer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\Peripheral.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\SBSourceFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\SearchPath.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\serial.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\SerialPacketizer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\smart_ptr.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\SourceFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\SRecordSourceFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\StELFFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\StExecutableImage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\StringMatcher.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\StSRecordFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\UartPeripheral.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\Updater.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\UsbHidPacketizer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\UsbHidPeripheral.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\utils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\Value.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\BlfwkErrors.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\Blob.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\Bootloader.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\BusPal.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\BusPalPeripheral.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\Command.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\DataSource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\DataTarget.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\ELF.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\ELFSourceFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\EndianUtilities.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\format_string.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\GHSSecInfo.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\hidapi.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\host_types.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\int_size.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\json.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\Logging.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\OptionContext.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\options.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\crc\crc32.h">
|
||||
<Filter>Target Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\AESKey.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\AESCounter.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\GlobMatcher.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\HexValues.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\DataSourceImager.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\ExcludesListMatcher.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\rijndael.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\RijndaelCTR.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\Random.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\IntelHexSourceFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\StIntelHexFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\blfwk\Crc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\src\crc\src\crc16.c">
|
||||
<Filter>Target Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\hid-windows.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\jsoncpp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Logging.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\SBSourceFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\SearchPath.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\serial.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\SerialPacketizer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\SourceFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\SRecordSourceFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\StELFFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\StExecutableImage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\StSRecordFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\UartPeripheral.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Updater.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\UsbHidPacketizer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\UsbHidPeripheral.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\utils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Value.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Bootloader.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\BusPal.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\BusPalPeripheral.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Command.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\DataSource.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\DataTarget.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\ELFSourceFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\format_string.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\GHSSecInfo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\options.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\crc\src\crc32.c">
|
||||
<Filter>Target Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\AESKey.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Blob.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\AESCounter.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\GlobMatcher.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\HexValues.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\DataSourceImager.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\ExcludesListMatcher.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\rijndael.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\RijndaelCTR.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Random.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\IntelHexSourceFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\StIntelHexFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\blfwk\src\Crc.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
4
tools/common/blfwkdll/blfwk.vcxproj.user
Normal file
4
tools/common/blfwkdll/blfwk.vcxproj.user
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
270
tools/common/blfwkdll/blfwkdll.cpp
Normal file
270
tools/common/blfwkdll/blfwkdll.cpp
Normal file
@ -0,0 +1,270 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2015 Freescale Semiconductor, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include "blfwkdll.h"
|
||||
#include "blfwk/Bootloader.h"
|
||||
#include "blfwk/Updater.h"
|
||||
#include "blfwk/SerialPacketizer.h"
|
||||
#include "blfwk/Crc.h"
|
||||
|
||||
namespace blfwkdll
|
||||
{
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
Updater::Updater(PeripheralConfig *config)
|
||||
{
|
||||
blfwk::Peripheral::PeripheralConfigData *pinnedConfig = (blfwk::Peripheral::PeripheralConfigData *)config;
|
||||
updater = NULL;
|
||||
try
|
||||
{
|
||||
updater = new blfwk::Updater(*pinnedConfig);
|
||||
}
|
||||
catch (exception e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
Updater::~Updater()
|
||||
{
|
||||
// Clean up unmanaged code.
|
||||
if (updater != NULL)
|
||||
{
|
||||
delete (blfwk::Updater *)updater;
|
||||
updater = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
void Updater::registerCallback(void (*progress)(int, int, int), bool *abort)
|
||||
{
|
||||
((blfwk::Updater *)updater)->registerCallback(progress, abort);
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
uint32_t Updater::flashFirmware(std::string *filename, uint32_t baseAddress, uint32_t memoryId)
|
||||
{
|
||||
try
|
||||
{
|
||||
uint32_t status;
|
||||
status = ((blfwk::Updater *)updater)->flashFirmware(filename->c_str(), baseAddress, memoryId);
|
||||
return status;
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
void Updater::eraseAllUnsecure()
|
||||
{
|
||||
try
|
||||
{
|
||||
((blfwk::Updater *)updater)->eraseAllUnsecure();
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
void Updater::eraseRegion(uint32_t start, uint32_t length, uint32_t memoryId)
|
||||
{
|
||||
try
|
||||
{
|
||||
((blfwk::Updater *)updater)->eraseRegion(start, length, memoryId);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
void Updater::eraseAll(uint32_t memoryId)
|
||||
{
|
||||
try
|
||||
{
|
||||
((blfwk::Updater *)updater)->eraseAll(memoryId);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
void Updater::unlockWithKey(const std::string &backdoorKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
((blfwk::Updater *)updater)->unlock(backdoorKey);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/* clang-format off */
|
||||
/* the for each statement is non-standard and not supported by clang format */
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
bool Updater::isCommandSupported(const std::string &command)
|
||||
{
|
||||
try
|
||||
{
|
||||
for each(blfwk::cmd_t var in blfwk::kCommands)
|
||||
{
|
||||
if (command.compare(var.name) == 0)
|
||||
{
|
||||
return ((blfwk::Updater *)updater)->isCommandSupported(var);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
/* clang-format on */
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
void Updater::getProperty(PROPERTY_TAG tag, uint32_t *responseWords)
|
||||
{
|
||||
try
|
||||
{
|
||||
blfwk::property_t propertytag = blfwk::kProperties.at(tag);
|
||||
std::vector<uint32_t> value = ((blfwk::Updater *)updater)->getProperty(propertytag);
|
||||
for (size_t i = 0; i < value.size(); i++)
|
||||
{
|
||||
responseWords[i] = value.at(i);
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
uint32_t Updater::getInternalFlashSize(void)
|
||||
{
|
||||
try
|
||||
{
|
||||
return ((blfwk::Updater *)updater)->getInternalFlashSize();
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
uint32_t Updater::getInternalRAMSize(void)
|
||||
{
|
||||
try
|
||||
{
|
||||
return ((blfwk::Updater *)updater)->getInternalRAMSize();
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
void Updater::programOnce(uint32_t index, uint32_t byteCount, const std::string &data, bool isLsb)
|
||||
{
|
||||
try
|
||||
{
|
||||
((blfwk::Updater *)updater)->programOnce(index, byteCount, data, isLsb);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
void Updater::reset()
|
||||
{
|
||||
try
|
||||
{
|
||||
((blfwk::Updater *)updater)->reset();
|
||||
// delete updater;
|
||||
// updater = NULL;
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
// delete this;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
uint32_t Updater::getSerialProtocolVersion()
|
||||
{
|
||||
try
|
||||
{
|
||||
return ((blfwk::Updater *)updater)->getPacketizer()->getVersion().version;
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
void Updater::ping(int32_t retries, uint32_t delay, uint32_t comSpeed)
|
||||
{
|
||||
static uint32_t actualComSpeed = 0;
|
||||
uint32_t xferComSpeed = (actualComSpeed == 0) ? comSpeed : actualComSpeed;
|
||||
try
|
||||
{
|
||||
((blfwk::Updater *)updater)->ping(retries, delay, xferComSpeed, (int *)&actualComSpeed);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
actualComSpeed = comSpeed;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
void Updater::getSupportedMemories(MemoryList &list)
|
||||
{
|
||||
list.push_back(make_pair(kMemory_Internal.memoryId, kMemory_Internal.description));
|
||||
list.push_back(make_pair(kMemory_ExecuteOnly.memoryId, kMemory_ExecuteOnly.description));
|
||||
for (MemoryArray::const_iterator it = kMemories.begin(); it != kMemories.end(); it++)
|
||||
{
|
||||
list.push_back(make_pair(it->memoryId, it->description));
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
bool Updater::IsMemorySpaceId(uint32_t memoryId)
|
||||
{
|
||||
if ((GROUPID(memoryId) != kGroup_Internal) || (memoryId == kMemoryInternal))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// See blfwkdll.h for documentation of this method.
|
||||
uint32_t Crc::calculate_application_crc32(const uint8_t *start, uint32_t length)
|
||||
{
|
||||
return blfwk::Crc::calculate_application_crc32(start, length);
|
||||
}
|
||||
|
||||
} // namespace blfwkdll;
|
400
tools/common/blfwkdll/blfwkdll.h
Normal file
400
tools/common/blfwkdll/blfwkdll.h
Normal file
@ -0,0 +1,400 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2015 Freescale Semiconductor, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifdef BLFWKDLL_EXPORTS
|
||||
#define BLFWKDLL_API __declspec(dllexport)
|
||||
#else
|
||||
#define BLFWKDLL_API __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
//! @brief Tag value used to validate the bootloader configuration data.
|
||||
#define kBootloaderConfigAreaTag (('k' << 0) | ('c' << 8) | ('f' << 16) | ('g' << 24))
|
||||
//! @brief Peripheral type bit mask definitions.
|
||||
#define kPeripheralMaskUart (1 << 0)
|
||||
#define kPeripheralMaskI2c (1 << 1)
|
||||
#define kPeripheralMaskSpi (1 << 2)
|
||||
#define kPeripheralMaskCan (1 << 3)
|
||||
#define kPeripheralMaskUsb (1 << 4)
|
||||
#define kPeripheralMask \
|
||||
(kPeripheralMaskUart | kPeripheralMaskI2c | kPeripheralMaskSpi | kPeripheralMaskCan | kPeripheralMaskUsb)
|
||||
//! @brief Bit positions for boot flags in configuration data
|
||||
#define kBootFlagDirectBoot (1 << 0)
|
||||
//! @brief Bit positions for clock flags in configuration data.
|
||||
#define kClockFlagHighSpeed (1 << 0)
|
||||
|
||||
// Copy from src/bootloader/src/flexcan_peripheral_interface.c
|
||||
// config1 8 bit
|
||||
#define FLEXCAN_SPEED_MASK 0x0F // bit[3:0]
|
||||
#define FLEXCAN_SPEED_SPEC_MASK 0x08 // bit[3:3]
|
||||
#define FLEXCAN_SPEED_INDEX_MASK 0x07 // bit[2:0]
|
||||
#define FLEXCAN_CLKSEL_MASK 0x80 // bit[7:7]
|
||||
|
||||
#define FLEXCAN_PROPSEG_MASK 0x70 // bit[6:4]
|
||||
#define FLEXCAN_PROPSEG_SHIFT 4
|
||||
// config2 16 bit
|
||||
#define FLEXCAN_PRESCALER_MASK 0xFF00 // bit[15:8]
|
||||
#define FLEXCAN_PRESCALER_SHIFT 8
|
||||
#define FLEXCAN_PSEG1_MASK 0x00E0 // bit[7:5]
|
||||
#define FLEXCAN_PSEG1_SHIFT 5
|
||||
#define FLEXCAN_PSEG2_MASK 0x001C // bit[4:2]
|
||||
#define FLEXCAN_PSEG2_SHIFT 2
|
||||
#define FLEXCAN_RJW_MASK 0x0003 // bit[1:0]
|
||||
#define FLEXCAN_RJW_SHIFT 0
|
||||
|
||||
#define FLEXCAN_SPEED_125K 0x00 // bit[2:0]
|
||||
#define FLEXCAN_SPEED_250K 0x01 // bit[2:0]
|
||||
#define FLEXCAN_SPEED_500K 0x02 // bit[2:0]
|
||||
#define FLEXCAN_SPEED_1M 0x04 // bit[2:0]
|
||||
|
||||
namespace blfwkdll
|
||||
{
|
||||
// Copy from src/property/property.c
|
||||
//! @brief Format of bootloader configuration data on Flash.
|
||||
struct BLFWKDLL_API BootloaderConfigureAreaData
|
||||
{
|
||||
uint32_t tag; //!< [00:03] Magic number to verify bootloader configuration is valid. Must be set to 'kcfg'.
|
||||
uint32_t crcStartAddress; //!< [04:07] Start address for application image CRC check. If the bits are all set then
|
||||
//! Bootloader by default will not perform any CRC check.
|
||||
uint32_t crcByteCount; //!< [08:0b] Byte count for application image CRC check. If the bits are all set then
|
||||
//! bootloader by default will not prform any CRC check.
|
||||
uint32_t crcExpectedValue; //!< [0c:0f] Expected CRC value for application CRC check. If the bits are all set then
|
||||
//! Bootloader by default will not perform any CRC check.
|
||||
uint8_t enabledPeripherals; //!< [10:10] Bitfield of peripherals to enable.
|
||||
//! bit 0 - LPUART, bit 1 - I2C, bit 2 - SPI, bit 3 - CAN, bit 4 - USB
|
||||
//! Bootloader will enable the peripheral if corresponding bit is set to 1.
|
||||
uint8_t i2cSlaveAddress; //!< [11:11] If not 0xFF, used as the 7-bit I2C slave address. If 0xFF, defaults to 0x10
|
||||
//! for I2C slave address.
|
||||
uint16_t peripheralDetectionTimeoutMs; //!< [12:13] Timeout in milliseconds for active peripheral detection. If
|
||||
//! 0xFFFF, defaults to 5 seconds.
|
||||
uint16_t usbVid; //!< [14:15] Sets the USB Vendor ID reported by the device during enumeration. If 0xFFFF, it
|
||||
//! defaults to 0x15A2.
|
||||
uint16_t usbPid; //!< [16:17] Sets the USB Product ID reported by the device during enumeration.
|
||||
uint32_t usbStringsPointer; //!< [18:1b] Sets the USB Strings reported by the device during enumeration.
|
||||
uint8_t clockFlags; //!< [1c:1c] The flags in the clockFlags configuration field are enabled if the corresponding
|
||||
//! bit is cleared (0).
|
||||
//! bit 0 - HighSpeed Enable high speed mode (i.e., 48 MHz).
|
||||
uint8_t
|
||||
clockDivider; //!< [1d:1d] Inverted value of the divider to use for core and bus clocks when in high speed mode.
|
||||
uint8_t bootFlags; //!< [1e:1e] If bit 0 is cleared, then Bootloader will jump to either Quad SPI Flash or
|
||||
//! internal flash image depending on FOPT BOOTSRC_SEL bits.
|
||||
//! If the bit is set, then Bootloader will prepare for host communication over serial peripherals.
|
||||
uint8_t pad0; //!< [1f:1f] Reserved, set to 0xFF
|
||||
uint32_t mmcauConfigPointer; //!< [20:23] A pointer to the MMCAU configuration structure in memory.
|
||||
uint32_t keyBlobPointer; //!< [24:27]Holds a pointer value to the key blob array used to configure OTFAD
|
||||
uint8_t pad1; //!< [28:28] reserved
|
||||
uint8_t canConfig1; //!< [29:29] ClkSel[1], PropSeg[3], SpeedIndex[4]
|
||||
uint16_t canConfig2; //!< [2a:2b] Pdiv[8], Pseg1[3], Pseg2[3], rjw[2]
|
||||
uint16_t canTxId; //!< [2c:2d] txId
|
||||
uint16_t canRxId; //!< [2e:2f] rxId
|
||||
uint32_t qspi_config_block_pointer; //!< [30:33] A pointer to the QSPI config block in internal flash array.
|
||||
uint32_t reserved[3]; //!<[34:3f] reserved
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Update class contains the functionality necessary to update the
|
||||
* firmware on a device running Bootloader.
|
||||
*
|
||||
* The purpose of this class is to provide a common interface for
|
||||
* updating any device running the Bootloader from several different file formats.
|
||||
*/
|
||||
class BLFWKDLL_API Updater
|
||||
{
|
||||
public:
|
||||
//! @brief Bootloader Transports.
|
||||
enum HOST_PERIPHERAL_TYPE_TAG
|
||||
{
|
||||
kHostPeripheralType_None,
|
||||
kHostPeripheralType_UART,
|
||||
kHostPeripheralType_BUSPAL_UART,
|
||||
kHostPeripheralType_USB_HID,
|
||||
kHostPeripheralType_SIM
|
||||
};
|
||||
|
||||
//! @brief BusPal Transports.
|
||||
enum BUS_PAL_TYPE
|
||||
{
|
||||
kBusPalFunction_None,
|
||||
kBusPalFunction_SPI,
|
||||
kBusPalFunction_I2C,
|
||||
kBusPalFunction_CAN,
|
||||
kBusPalFunction_GPIO_CONFIG,
|
||||
kBusPalFunction_GPIO_SET,
|
||||
kBusPalFunction_FPGA_CLOCK_SET
|
||||
};
|
||||
|
||||
//! @brief SPI clock polarity configuration.
|
||||
enum SPI_CLOCK_POLARITY
|
||||
{
|
||||
kSpiClockPolarity_ActiveHigh = 0, //!< Active-high SPI clock (idles low).
|
||||
kSpiClockPolarity_ActiveLow = 1 //!< Active-low SPI clock (idles high).
|
||||
};
|
||||
|
||||
//! @brief SPI clock phase configuration.
|
||||
enum SPI_CLOCK_PHASE
|
||||
{
|
||||
kSpiClockPhase_FirstEdge =
|
||||
0, //!< First edge on SPSCK occurs at the middle of the first cycle of a data transfer.
|
||||
kSpiClockPhase_SecondEdge =
|
||||
1 //!< First edge on SPSCK occurs at the start of the first cycle of a data transfer.
|
||||
};
|
||||
|
||||
//! @brief SPI data shifter direction options.
|
||||
enum SPI_SHIFT_DIRECTION
|
||||
{
|
||||
kSpiMsbFirst = 0, //!< Data transfers start with most significant bit.
|
||||
kSpiLsbFirst = 1 //!< Data transfers start with least significant bit.
|
||||
};
|
||||
|
||||
//! @brief BusPal configuration data.
|
||||
struct BusPalConfig
|
||||
{
|
||||
BUS_PAL_TYPE function;
|
||||
uint32_t spiSpeedKHz;
|
||||
SPI_CLOCK_POLARITY spiPolarity;
|
||||
SPI_CLOCK_PHASE spiPhase;
|
||||
SPI_SHIFT_DIRECTION spiDirection;
|
||||
uint8_t i2cAddress;
|
||||
uint32_t i2cSpeedKHz;
|
||||
uint32_t canSpeed;
|
||||
uint32_t canTxid;
|
||||
uint32_t canRxid;
|
||||
uint8_t gpioPort;
|
||||
uint8_t gpioPinNum;
|
||||
uint8_t gpioLevel;
|
||||
uint8_t gpioMux;
|
||||
uint32_t fpgaClockMhz;
|
||||
};
|
||||
|
||||
//! @brief Peripheral configuration data.
|
||||
struct PeripheralConfig
|
||||
{
|
||||
HOST_PERIPHERAL_TYPE_TAG peripheralType;
|
||||
std::string comPortName;
|
||||
long comPortSpeed;
|
||||
uint32_t packetTimeoutMs;
|
||||
unsigned short usbHidVid;
|
||||
unsigned short usbHidPid;
|
||||
std::string usbHidSerialNumber;
|
||||
bool ping;
|
||||
BusPalConfig busPalConfig;
|
||||
std::string usbPath;
|
||||
};
|
||||
|
||||
//! @brief Bootloader command mask.
|
||||
enum COMMAND_MASK
|
||||
{
|
||||
kCommandMask_FlashEraseAll = 0x00000001,
|
||||
kCommandMask_ReadMemory = 0x00000004,
|
||||
kCommandMask_WriteMemory = 0x00000008,
|
||||
kCommandMask_FillMemory = 0x00000010,
|
||||
kCommandMask_FlashSecurityDisable = 0x00000020,
|
||||
kCommandMask_GetProperty = 0x00000040,
|
||||
kCommandMask_ReceiveSBFile = 0x00000080,
|
||||
kCommandMask_Execute = 0x00000100,
|
||||
kCommandMask_Call = 0x00000200,
|
||||
kCommandMask_Reset = 0x00000400,
|
||||
kCommandMask_SetProperty = 0x00000800,
|
||||
kCommandMask_FlashEraseAllUnsecure = 0x00001000,
|
||||
kCommandMask_FlashProgramOnce = 0x00002000,
|
||||
kCommandMask_FlashReadOnce = 0x00004000,
|
||||
kCommandMask_FlashReadResource = 0x00008000,
|
||||
kCommandMask_ConfigureQuadSpi = 0x00010000,
|
||||
};
|
||||
|
||||
//! @brief Bootloader property.
|
||||
enum PROPERTY_TAG
|
||||
{
|
||||
kPropertyTag_ListProperties = 0x00,
|
||||
kPropertyTag_BootloaderVersion = 0x01,
|
||||
kPropertyTag_AvailablePeripherals = 0x02,
|
||||
kPropertyTag_FlashStartAddress = 0x03,
|
||||
kPropertyTag_FlashSizeInBytes = 0x04,
|
||||
kPropertyTag_FlashSectorSize = 0x05,
|
||||
kPropertyTag_FlashBlockCount = 0x06,
|
||||
kPropertyTag_AvailableCommands = 0x07,
|
||||
kPropertyTag_CrcCheckStatus = 0x08,
|
||||
kPropertyTag_Reserved9 = 0x09,
|
||||
kPropertyTag_VerifyWrites = 0x0a,
|
||||
kPropertyTag_MaxPacketSize = 0x0b,
|
||||
kPropertyTag_ReservedRegions = 0x0c,
|
||||
kPropertyTag_Reserved13 = 0x0d,
|
||||
kPropertyTag_RAMStartAddress = 0x0e,
|
||||
kPropertyTag_RAMSizeInBytes = 0x0f,
|
||||
kPropertyTag_SystemDeviceId = 0x10,
|
||||
kPropertyTag_FlashSecurityState = 0x11,
|
||||
kPropertyTag_UniqueDeviceId = 0x12,
|
||||
kPropertyTag_FacSupport = 0x13,
|
||||
kPropertyTag_FlashAccessSegmentSize = 0x14,
|
||||
kPropertyTag_FlashAccessSegmentCount = 0x15,
|
||||
kPropertyTag_FlashReadMargin = 0x16,
|
||||
kPropertyTag_QspiInitStatus = 0x17,
|
||||
kPropertyTag_TargetVersion = 0x18,
|
||||
kPropertyTag_ExternalMemoryAttributes = 0x19,
|
||||
kPropertyTag_InvalidProperty = 0xFF,
|
||||
};
|
||||
typedef std::pair<uint32_t, std::string> MemoryId;
|
||||
typedef std::vector<MemoryId> MemoryList;
|
||||
|
||||
private:
|
||||
// Due to the reason that MFC project must include this headfile to use blfwkdll,
|
||||
// while cannot include blfwk/Updater.h.
|
||||
// So use a void pointer here
|
||||
void *updater; //!< A pointer to blfwk::Updater.
|
||||
|
||||
public:
|
||||
//! \brief Default constructor.
|
||||
Updater(PeripheralConfig *config);
|
||||
|
||||
//! \brief Destructor.
|
||||
~Updater();
|
||||
|
||||
//! \brief register callback function
|
||||
//!
|
||||
//! \param progress Progress callback function
|
||||
//!
|
||||
//! \param abort The variable to abort the data phase.
|
||||
void registerCallback(void (*progress)(int, int, int), bool *abort);
|
||||
|
||||
//! \brief Program flash on the device.
|
||||
//!
|
||||
//! \exception Raised if the file could not be opened successfully.
|
||||
//!
|
||||
//! \param filename The file to program into the device.
|
||||
//! \param base_address The address on the device where the file wiill be written.
|
||||
//! (for hex,srec and sb file, the param can be any value.)
|
||||
uint32_t flashFirmware(std::string *filename, uint32_t baseAddress, uint32_t memoryId);
|
||||
|
||||
//! \brief Erase all flash blocks and release MCU security
|
||||
//!
|
||||
//! \exception Raised if the FlashEraseAllUnsecure command does not return success.
|
||||
//! Raised if the FlashEraseAllUnsecure command is not supported.
|
||||
void eraseAllUnsecure();
|
||||
|
||||
//! \brief Execute the FlashEraseRegion bootloader command.
|
||||
//!
|
||||
//! \exception Thrown if an error occurred while sending the
|
||||
//! FlashEraseRegion(start, length) bootloader command.
|
||||
//!
|
||||
//! \param start The beginning address of the memory region to be erased.
|
||||
//! \param length The length in bytes of the memory region to be erased.
|
||||
void eraseRegion(uint32_t start, uint32_t length, uint32_t memoryId);
|
||||
|
||||
//! \brief Execute the FlashEraseAll bootloader command.
|
||||
//!
|
||||
//! \exception Thrown if an error occurred while sending the
|
||||
//! FlashEraseAll bootloader command.
|
||||
void eraseAll(uint32_t memoryId);
|
||||
|
||||
//! \brief Release security using BackdoorKey
|
||||
//!
|
||||
//! \exception Raised if the FlashSecurityDisable command does not return success.
|
||||
//! Raised if the FlashSecurityDisable command is not supported.
|
||||
//! Raised if the parameter is illegal
|
||||
//! \param backdoor_key The 16 hex digitals used to release the security
|
||||
void unlockWithKey(const std::string &backdoorKey);
|
||||
|
||||
//! \brief Checks if Bootloader device supports a given command.
|
||||
//!
|
||||
//! \exception Thrown if an error occurred while sending the
|
||||
//! GetProperty(kProperty_AvailableCommands) bootloader command.
|
||||
//!
|
||||
//! \param command The command to check.
|
||||
//!
|
||||
//! \return true if command is supported, false if not.
|
||||
bool isCommandSupported(const std::string &command);
|
||||
|
||||
//! \brief get Device's property by using get-property command.
|
||||
//!
|
||||
//! \exception Thrown if an error occurred while sending the
|
||||
//! GetProperty(property) bootloader command.
|
||||
//!
|
||||
//! \param property tag
|
||||
//!
|
||||
//! \param pointer of the response values.
|
||||
void getProperty(PROPERTY_TAG tag, uint32_t *responseWords);
|
||||
|
||||
//! \brief get total internal flash size of current device.
|
||||
//!
|
||||
//! \exception Raised if the operation is failed.
|
||||
//!
|
||||
//! \return the size in bytes. Return 0 means no internal Flash available.
|
||||
uint32_t getInternalFlashSize(void);
|
||||
|
||||
//! \brief get total internal RAM size of current device.
|
||||
//!
|
||||
//! \exception Raised if the operation is failed.
|
||||
//!
|
||||
//! \return the size in bytes. Return 0 means no internal RAM available.
|
||||
uint32_t getInternalRAMSize(void);
|
||||
|
||||
//! \brief Execute the FlashProgramOnce bootloader command.
|
||||
//!
|
||||
//! \exception Thrown if an error occurred while sending the
|
||||
//! FlashEraseAll bootloader command.
|
||||
//!
|
||||
//! \param index The index of a specific program once field.
|
||||
//!
|
||||
//! \param byteCount The length in bytes of a specific program once field.
|
||||
//!
|
||||
//! \param data The 8/16 hex digitals to write.
|
||||
void programOnce(uint32_t index, uint32_t byteCount, const std::string &data, bool isLsb);
|
||||
|
||||
//! \brief Execute the reset command.
|
||||
//!
|
||||
//! \exception Raised if the reset command is failed.
|
||||
void reset();
|
||||
|
||||
//! @brief Get the serial protocol version.
|
||||
//!
|
||||
//! \exception Raised if the operation is failed.
|
||||
uint32_t getSerialProtocolVersion();
|
||||
|
||||
//! \brief Send a ping if applicable.
|
||||
//!
|
||||
//! \exception Raised if ping response is not received successfully.
|
||||
void ping(int32_t retries, uint32_t delay, uint32_t comSpeed);
|
||||
|
||||
//! \brief return all memory IDs supported by Bootloader.
|
||||
//!
|
||||
//! \param list return the list.
|
||||
static void getSupportedMemories(MemoryList &list);
|
||||
|
||||
//! \brief Check if a given memory ID is also a memory space.
|
||||
//!
|
||||
//! \param memoryId The given memory ID to check.
|
||||
//!
|
||||
//! \return true/false
|
||||
static bool IsMemorySpaceId(uint32_t memoryId);
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Crc class contains the functionality about crc ccalculation.
|
||||
*/
|
||||
class BLFWKDLL_API Crc
|
||||
{
|
||||
public:
|
||||
//! \brief Default constructor.
|
||||
Crc(){};
|
||||
|
||||
//! \brief Destructor.
|
||||
virtual ~Crc(){};
|
||||
|
||||
//! \brief calculate crc32 for a given memory region
|
||||
//!
|
||||
//! \param start The start address of a memory region that contains the data
|
||||
//! \
|
||||
//! \param length Length in bytes to calculate
|
||||
//! \
|
||||
//! \return calculated result
|
||||
static uint32_t calculate_application_crc32(const uint8_t *start, uint32_t length);
|
||||
};
|
||||
|
||||
} // namespace blfwkdll
|
170
tools/common/blfwkdll/blfwkdll.vcxproj
Normal file
170
tools/common/blfwkdll/blfwkdll.vcxproj
Normal file
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{426D14FE-6F2B-442D-893D-B5730DD6941F}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>blfwkdll</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<ProjectName>blfwkdll</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<CLRSupport>false</CLRSupport>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>BOOTLOADER_HOST;WIN32;_DEBUG;_WINDOWS;_USRDLL;BLFWKDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>../;..\..\..\src;..\..\..\src\include;../../../src/drivers/common;../../../src/bm_usb</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)blfwk-$(Configuration)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>blfwk.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;BLFWKDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>BOOTLOADER_HOST;WIN32;NDEBUG;_WINDOWS;_USRDLL;BLFWKDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>../;..\..\..\src;..\..\..\src\include;../../../src/drivers/common;../../../src/bm_usb</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir)blfwk-$(Configuration)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>blfwk.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;BLFWKDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="blfwkdll.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="blfwkdll.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="blfwk.vcxproj">
|
||||
<Project>{de64a8c3-695a-491f-b3e3-24d6a3057a40}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
27
tools/common/blfwkdll/blfwkdll.vcxproj.filters
Normal file
27
tools/common/blfwkdll/blfwkdll.vcxproj.filters
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="blfwkdll.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="blfwkdll.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
4
tools/common/blfwkdll/blfwkdll.vcxproj.user
Normal file
4
tools/common/blfwkdll/blfwkdll.vcxproj.user
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
Reference in New Issue
Block a user