Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ STACK_MODE_PROCESS EQU 2048
;*************************************************************************
AREA SectionForStackBottom, DATA, NOINIT
StackBottom DCD 0
AREA SectionForStackTop, DATA, NOINIT
AREA SectionForStackTop, DATA, NOINIT, ALIGN=3
StackTop DCD 0
AREA SectionForHeapBegin, DATA, NOINIT
HeapBegin DCD 0
Expand Down
6 changes: 6 additions & 0 deletions DeviceCode/Targets/Native/STM32F4/processor_selector.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@ ERROR - WE SHOULD NOT INCLUDE THIS HEADER IF NOT BUILDING A STM32F2/F4 PLATFORM
// communicaiton facilities
/////////////////////////////////////////////////////////

// disable conflicting and overly generic macro definitions
#undef FLASH
#undef CRC
#undef HASH

// CMSIS-Core SOC Specific header
#include "stm32f4xx.h"

// disable conflicting and overly generic macro definitions
#undef FLASH
#undef CRC
#undef HASH
#endif
2 changes: 1 addition & 1 deletion DeviceCode/pal/COM/sockets_lwip_os/sockets_lwip.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ struct Sockets_LWIP_Driver
BOOL m_usingSSL;

static void MulticastDiscoveryRespond(void* arg);
static void Sockets_LWIP_Driver::MulticastDiscoverySchedule();
static void MulticastDiscoverySchedule();

static void CloseDebuggerSocket();
static void OnDebuggerTimeout(void* arg);
Expand Down
2 changes: 1 addition & 1 deletion DeviceCode/pal/OpenSSL/OpenSSL_1_0_0/tinyclr/ssl_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct OPENSSL_TYPE__FILE
extern OPENSSL_TYPE__FILE SSL_STDERR;
extern OPENSSL_TYPE__FILE SSL_STDOUT;
extern OPENSSL_TYPE__FILE SSL_STDIN;
#if defined(__RENESAS__)
#if defined(__RENESAS__) || defined(__CC_ARM)
extern "C" volatile int errno;
#else
extern "C" int errno;
Expand Down
4 changes: 3 additions & 1 deletion DeviceCode/pal/PKCS11/pkcs11.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ extern "C" {
/* All the various Cryptoki types and #define'd values are in the
* file pkcs11t.h. */
#include "pkcs11t.h"

#ifdef __CC_ARM
#undef __PASTE
#endif
#define __PASTE(x,y) x##y


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ HRESULT LWIP_SOCKETS_Driver::UpdateAdapterConfiguration( UINT32 interfaceIndex,
}

BOOL fEnableDhcp = (0 != (config->flags & SOCK_NETWORKCONFIGURATION_FLAGS_DHCP));
BOOL fDynamicDns = (0 != (config->flags & SOCK_NETWORKCONFIGURATION_FLAGS_DYNAMIC_DNS));
//BOOL fDynamicDns = (0 != (config->flags & SOCK_NETWORKCONFIGURATION_FLAGS_DYNAMIC_DNS));
BOOL fDhcpStarted;

struct netif *pNetIf = netif_find_interface(g_LWIP_SOCKETS_Driver.m_interfaces[interfaceIndex].m_interfaceNumber);
Expand Down
38 changes: 38 additions & 0 deletions Framework/CorDebug/vs11/CorDebug.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CorDebug", "CorDebug.csproj", "{85DC9C08-FE2A-4D64-84D7-D01E2105D869}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger", "..\..\Debugger\Debugger.csproj", "{D9DCA6FB-680F-4355-ABEF-128DB02721E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUsb", "..\..\Debugger\WinUsb\WinUsb.csproj", "{DAEB83A4-5868-4725-A15D-85F75DB87EAC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildTasks", "..\..\Tools\BuildTasks\BuildTasks.csproj", "{9B3D156D-B9D2-4F9C-BFDF-91FC42EE1280}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{85DC9C08-FE2A-4D64-84D7-D01E2105D869}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85DC9C08-FE2A-4D64-84D7-D01E2105D869}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85DC9C08-FE2A-4D64-84D7-D01E2105D869}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85DC9C08-FE2A-4D64-84D7-D01E2105D869}.Release|Any CPU.Build.0 = Release|Any CPU
{D9DCA6FB-680F-4355-ABEF-128DB02721E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9DCA6FB-680F-4355-ABEF-128DB02721E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9DCA6FB-680F-4355-ABEF-128DB02721E6}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{D9DCA6FB-680F-4355-ABEF-128DB02721E6}.Release|Any CPU.Build.0 = Debug|Any CPU
{DAEB83A4-5868-4725-A15D-85F75DB87EAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAEB83A4-5868-4725-A15D-85F75DB87EAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAEB83A4-5868-4725-A15D-85F75DB87EAC}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{DAEB83A4-5868-4725-A15D-85F75DB87EAC}.Release|Any CPU.Build.0 = Debug|Any CPU
{9B3D156D-B9D2-4F9C-BFDF-91FC42EE1280}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B3D156D-B9D2-4F9C-BFDF-91FC42EE1280}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B3D156D-B9D2-4F9C-BFDF-91FC42EE1280}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{9B3D156D-B9D2-4F9C-BFDF-91FC42EE1280}.Release|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Implementation for MCBSTM32F400 board
//
// *** Block Storage Configuration for External M29W640FB NOR Flash ***
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include <tinyhal.h>

#define FLASH_BYTES_PER_SECTOR 2
#define FLASH_SECTOR_WRITE_TYPICAL_TIME_USEC 1400 // not used
#define FLASH_BLOCK_ERASE_ACTUAL_TIME_USEC 800000 // not used
#define FLASH_BLOCK_ERASE_MAX_TIME_USEC 6000000 // not used

#define FLASH_ADDRESS1 0x60000000
#define FLASH_BLOCK1_COUNT 8
#define FLASH_BLOCK1_BYTES_PER_BLOCK 8192

#define FLASH_ADDRESS2 0x60010000
#define FLASH_BLOCK2_COUNT 127
#define FLASH_BLOCK2_BYTES_PER_BLOCK 65536

// EBIU Information

#define M29W640FB__SIZE_IN_BYTES 0x00800000 // 8MB
#define M29W640FB__WP_GPIO_PIN GPIO_PIN_NONE
#define M29W640FB__WP_ACTIVE FALSE

// BlockDeviceInformation

#define M29W640FB__IS_REMOVABLE FALSE
#define M29W640FB__SUPPORTS_XIP TRUE
#define M29W640FB__WRITE_PROTECTED FALSE
#define M29W640FB__SUPP_COPY_BACK FALSE
#define M29W640FB__NUM_REGIONS 2


const BlockRange g_M29W640FB_BlockRange1[] =
{
{ BlockRange::BLOCKTYPE_CODE, 0, 7 }, // 64KB
};

const BlockRange g_M29W640FB_BlockRange2[] =
{
{ BlockRange::BLOCKTYPE_CODE, 0, 1 }, // 64KB

{ BlockRange::BLOCKTYPE_DEPLOYMENT, 1, 126 }, // 8064KB
};


const BlockRegionInfo g_M29W640FB_BlkRegion[M29W640FB__NUM_REGIONS] =
{
{
FLASH_ADDRESS1, // ByteAddress Start; // Starting Sector address
FLASH_BLOCK1_COUNT, // UINT32 NumBlocks; // total number of blocks in this region
FLASH_BLOCK1_BYTES_PER_BLOCK, // UINT32 BytesPerBlock; // Total number of bytes per block
ARRAYSIZE_CONST_EXPR(g_M29W640FB_BlockRange1),
g_M29W640FB_BlockRange1,
},
{
FLASH_ADDRESS2, // ByteAddress Start; // Starting Sector address
FLASH_BLOCK2_COUNT, // UINT32 NumBlocks; // total number of blocks in this region
FLASH_BLOCK2_BYTES_PER_BLOCK, // UINT32 BytesPerBlock; // Total number of bytes per block
ARRAYSIZE_CONST_EXPR(g_M29W640FB_BlockRange2),
g_M29W640FB_BlockRange2,
}
};

const BlockDeviceInfo g_M29W640FB_DeviceInfo=
{
{
M29W640FB__IS_REMOVABLE, // BOOL Removable;
M29W640FB__SUPPORTS_XIP, // BOOL SupportsXIP;
M29W640FB__WRITE_PROTECTED, // BOOL WriteProtected;
M29W640FB__SUPP_COPY_BACK // BOOL SupportsCopyBack
},
FLASH_SECTOR_WRITE_TYPICAL_TIME_USEC, // UINT32 MaxSectorWrite_uSec;
FLASH_BLOCK_ERASE_ACTUAL_TIME_USEC, // UINT32 MaxBlockErase_uSec;
FLASH_BYTES_PER_SECTOR, // UINT32 BytesPerSector;

M29W640FB__SIZE_IN_BYTES, // UINT32 Size;

M29W640FB__NUM_REGIONS, // UINT32 NumRegions;
g_M29W640FB_BlkRegion, // const BlockRegionInfo* pRegions;
};


struct BLOCK_CONFIG g_M29W640FB_BS_Config =
{
{
M29W640FB__WP_GPIO_PIN, // GPIO_PIN Pin;
M29W640FB__WP_ACTIVE, // BOOL ActiveState;
},

&g_M29W640FB_DeviceInfo, // BlockDeviceinfo
};

struct BlockStorageDevice g_M29W640FB_BS;

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AssemblyName>M29W640FB_blconfig_MCBSTM32F400</AssemblyName>
<Size>
</Size>
<ProjectGuid>{45FE123C-8BC4-4ACA-A1AD-ECDC2F4EBF59}</ProjectGuid>
<Description>Block storage configuration for external NOR flash M29W640FB on the MCBSTM32F400</Description>
<Level>HAL</Level>
<LibraryFile>M29W640FB_blconfig_MCBSTM32F400.$(LIB_EXT)</LibraryFile>
<ProjectPath>$(SPOCLIENT)\Solutions\MCBSTM32F400\DeviceCode\Blockstorage\M29W640FB\dotNetMF.proj</ProjectPath>
<ManifestFile>M29W640FB_blconfig_MCBSTM32F400.$(LIB_EXT).manifest</ManifestFile>
<Groups>Solutions\MCBSTM32F400</Groups>
<LibraryCategory>
<MFComponent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="BlockStorageConfig_HAL" Guid="{497F59BB-55D3-404e-B958-A6284806D184}" ProjectPath="" xmlns="">
<VersionDependency xmlns="http://schemas.microsoft.com/netmf/InventoryFormat.xsd">
<Major>4</Major>
<Minor>0</Minor>
<Revision>0</Revision>
<Build>0</Build>
<Extra />
<Date>2014-11-13</Date>
</VersionDependency>
<ComponentType xmlns="http://schemas.microsoft.com/netmf/InventoryFormat.xsd">LibraryCategory</ComponentType>
</MFComponent>
</LibraryCategory>
<Documentation>
</Documentation>
<PlatformIndependent>False</PlatformIndependent>
<CustomSpecific>MCBSTM32F400</CustomSpecific>
<Required>False</Required>
<IgnoreDefaultLibPath>False</IgnoreDefaultLibPath>
<IsStub>False</IsStub>
<Directory>Solutions\MCBSTM32F400\DeviceCode\BlockStorage\M29W640FB</Directory>
<OutputType>Library</OutputType>
<PlatformIndependentBuild>false</PlatformIndependentBuild>
<Version>4.0.0.0</Version>
</PropertyGroup>
<Import Project="$(SPOCLIENT)\tools\targets\Microsoft.SPOT.System.Settings" />
<PropertyGroup />
<ItemGroup>
<Compile Include="M29W640FB_blconfig.cpp" />
</ItemGroup>
<ItemGroup />
<Import Project="$(SPOCLIENT)\tools\targets\Microsoft.SPOT.System.Targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@

#include <tinyhal.h>

//--//


#define FLASH_MANUFACTURER_CODE 0x0000 // not used
#define FLASH_DEVICE_CODE 0x0000 // not used
#define FLASH_BASE_ADDRESS1 0x08000000
Expand All @@ -34,8 +31,6 @@
#define FLASH_SECTOR_WRITE_MAX_TIME_USEC 100 // not used
#define FLASH_BLOCK_ERASE_ACTUAL_TIME_USEC 10000 // not used

//--//

// EBIU Information

#define STM32F4__CHIP_SELECT 0
Expand All @@ -47,12 +42,6 @@
#define STM32F4__WP_GPIO_PIN GPIO_PIN_NONE
#define STM32F4__WP_ACTIVE FALSE



//--//



// BlockDeviceInformation

#define STM32F4__IS_REMOVABLE FALSE
Expand All @@ -61,19 +50,6 @@
#define STM32F4__SUPP_COPY_BACK FALSE
#define STM32F4__NUM_REGIONS 3



//--//

#if defined(BUILD_RTM)
#define MEMORY_BLOCKTYPE_SPECIAL BlockRange::BLOCKTYPE_DEPLOYMENT
#else
#define MEMORY_BLOCKTYPE_SPECIAL BlockRange::BLOCKTYPE_FILESYSTEM
#endif

//--//


const BlockRange g_STM32F4_BlockRange1[] =
{
{ BlockRange::BLOCKTYPE_BOOTSTRAP , 0, 2 }, // 08000000 bootloader 48k
Expand All @@ -88,10 +64,9 @@ const BlockRange g_STM32F4_BlockRange2[] =
const BlockRange g_STM32F4_BlockRange3[] =
{
{ BlockRange::BLOCKTYPE_CODE , 0, 2 }, // 08020000 CLR 384k
{ BlockRange::BLOCKTYPE_DEPLOYMENT, 3, 6 }, // 08080000 deployment 512k
{ BlockRange::BLOCKTYPE_CODE , 3, 6 }, // 08080000 CLR 512k
};


const BlockRegionInfo g_STM32F4_BlkRegion[STM32F4__NUM_REGIONS] =
{
{
Expand Down Expand Up @@ -119,10 +94,6 @@ const BlockRegionInfo g_STM32F4_BlkRegion[STM32F4__NUM_REGIONS] =
}
};


//--//


const BlockDeviceInfo g_STM32F4_DeviceInfo=
{
{
Expand All @@ -141,7 +112,6 @@ const BlockDeviceInfo g_STM32F4_DeviceInfo=
g_STM32F4_BlkRegion, // const BlockRegionInfo* pRegions;
};


struct MEMORY_MAPPED_NOR_BLOCK_CONFIG g_STM32F4_BS_Config =
{
{ // BLOCK_CONFIG
Expand Down Expand Up @@ -171,18 +141,5 @@ struct MEMORY_MAPPED_NOR_BLOCK_CONFIG g_STM32F4_BS_Config =
FLASH_DEVICE_CODE, // UINT32 DeviceCode;
};

//--//


#if defined(ADS_LINKER_BUG__NOT_ALL_UNUSED_VARIABLES_ARE_REMOVED)
#pragma arm section rodata = "g_STM32F4_BS"
#endif

struct BlockStorageDevice g_STM32F4_BS;

#if defined(ADS_LINKER_BUG__NOT_ALL_UNUSED_VARIABLES_ARE_REMOVED)
#pragma arm section rodata
#endif

//--//

Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@ extern struct BlockStorageDevice g_STM32F4_BS;
extern struct IBlockStorageDevice g_STM32F4_Flash_DeviceTable;
extern struct BLOCK_CONFIG g_STM32F4_BS_Config;

extern struct BlockStorageDevice g_M29W640FB_BS;
extern struct IBlockStorageDevice g_M29W640FB_Flash_DeviceTable;
extern struct BLOCK_CONFIG g_M29W640FB_BS_Config;


void BlockStorage_AddDevices() {
BlockStorageList::AddDevice( &g_STM32F4_BS,
BlockStorageList::AddDevice( &g_STM32F4_BS,
&g_STM32F4_Flash_DeviceTable,
&g_STM32F4_BS_Config, FALSE );
BlockStorageList::AddDevice( &g_M29W640FB_BS,
&g_M29W640FB_Flash_DeviceTable,
&g_M29W640FB_BS_Config, FALSE );
}

17 changes: 17 additions & 0 deletions Solutions/MCBSTM32F400/DeviceCode/Crypto/PKCS11_Config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <PAL\PKCS11\CryptokiPAL.h>

extern CK_SLOT_INFO g_OpenSSL_SlotInfo;
extern CryptokiToken g_OpenSSL_Token;


CryptokiSlot g_CryptokiSlots[] =
{
{
&g_OpenSSL_SlotInfo,
&g_OpenSSL_Token,
},
};

const UINT32 g_CryptokiSlotCount = ARRAYSIZE(g_CryptokiSlots);


Loading