Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mortezag committed Mar 9, 2015
0 parents commit c0d38ea
Show file tree
Hide file tree
Showing 7,912 changed files with 1,845,582 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Disable eol normalization
* -text
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Build results
BuildOutput/
bin/
obj/
*.cache
*.log
*_assemblyinfo.txt
*.feedback

# CMSIS and CMSIS_RTX
/DeviceCode/Cores/arm/CMSIS/
/DeviceCode/Cores/arm/CMSIS_RTX/
!/DeviceCode/Cores/arm/CMSIS_RTX/dotNetMF.proj

# WinPCAP
/DeviceCode/Targets/OS/Win32/DeviceCode/WinPcap_Eth/Dependencies/WpdPack/
46 changes: 46 additions & 0 deletions Application/EraseDeployment/EraseDeployment.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation. All rights reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


#include <stdio.h>
#include <string.h>
#include <ctype.h>

#include "tinyhal.h"

HAL_DECLARE_NULL_HEAP();

void ApplicationEntryPoint()
{
int nSects = 0;
const FLASH_SECTOR *sects;

CPU_InitializeCommunication();

Flash_EnumerateSectors( nSects, sects );

//--//

hal_printf( "Erasing deployment...........\r\n" );

Flash_ChipReadOnly( FALSE );
for(int i = 0; i < nSects; i++)
{
if((sects[ i ].Usage & MEMORY_USAGE_MASK) == MEMORY_USAGE_DEPLOYMENT)
{
hal_printf( "Erasing sector %d (0x%08x)\r\n", i, (UINT32)sects[ i ].Start );
if(!Flash_IsSectorErased( &sects[ i ] ))
{
Flash_EraseSector( &sects[ i ] );
}
}
}
Flash_ChipReadOnly( TRUE );

hal_printf( "Erasing deployment finished!\r\n" );

// allowing extra wait so that we can see the print statement!
Events_WaitForEvents( 0, (UINT32)10000 );
CPU_Reset();
}
29 changes: 29 additions & 0 deletions Application/EraseDeployment/dotNetMF.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">

<PropertyGroup>
<Directory>Application\EraseDeployment</Directory>
</PropertyGroup>

<Import Project="$(SPOCLIENT)\tools\targets\Microsoft.SPOT.System.Settings" />

<PropertyGroup>
<OutputType>Executable</OutputType>
<ADD_LOAD_IMAGE_CRC>false</ADD_LOAD_IMAGE_CRC>
<AssemblyName>EraseDeployment</AssemblyName>
<ExtraTargets>BuildSigFiles</ExtraTargets>
<EXEScatterFileDefinition>$(SRC_DIR)\scatterfile_definition.xml</EXEScatterFileDefinition>
</PropertyGroup>

<Import Project="$(SPOCLIENT)\DeviceCode\Targets\$(TARGETCODEBASETYPE)\$(TARGETCODEBASE)\$(PLATFORM)\Drivers_$(PLATFORM).proj" Condition="Exists('$(SPOCLIENT)\DeviceCode\Targets\$(TARGETCODEBASETYPE)\$(TARGETCODEBASE)\$(PLATFORM)\Drivers_$(PLATFORM).proj')" />

<ItemGroup>
<Compile Include="EraseDeployment.cpp" />

<InputLibs Include="$(PLATFORM_INDEPENDENT_LIB_DIR)\CRC.$(LIB_EXT)"/>

<ScatterFileReferences Include="$(SPOCLIENT)\DeviceCode\Targets\$(TARGETCODEBASETYPE)\$(TARGETCODEBASE)\$(PLATFORM)\scatterfile_tools.xml"/>
</ItemGroup>

<Import Project="$(SPOCLIENT)\tools\targets\Microsoft.SPOT.System.Targets" />

</Project>
6 changes: 6 additions & 0 deletions Application/EraseDeployment/scatterfile_definition.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<ScatterFile>

<Include File="%SPOCLIENT%\DeviceCode\Targets\%TARGETCODEBASETYPE%\%TARGETCODEBASE%\%PLATFORM%\scatterfile_tools.xml"/>

</ScatterFile>
Loading

0 comments on commit c0d38ea

Please sign in to comment.