Skip to content

Commit c0d38ea

Browse files
committed
Initial commit
0 parents  commit c0d38ea

File tree

7,912 files changed

+1845582
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,912 files changed

+1845582
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Disable eol normalization
2+
* -text

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Build results
2+
BuildOutput/
3+
bin/
4+
obj/
5+
*.cache
6+
*.log
7+
*_assemblyinfo.txt
8+
*.feedback
9+
10+
# CMSIS and CMSIS_RTX
11+
/DeviceCode/Cores/arm/CMSIS/
12+
/DeviceCode/Cores/arm/CMSIS_RTX/
13+
!/DeviceCode/Cores/arm/CMSIS_RTX/dotNetMF.proj
14+
15+
# WinPCAP
16+
/DeviceCode/Targets/OS/Win32/DeviceCode/WinPcap_Eth/Dependencies/WpdPack/
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4+
5+
6+
#include <stdio.h>
7+
#include <string.h>
8+
#include <ctype.h>
9+
10+
#include "tinyhal.h"
11+
12+
HAL_DECLARE_NULL_HEAP();
13+
14+
void ApplicationEntryPoint()
15+
{
16+
int nSects = 0;
17+
const FLASH_SECTOR *sects;
18+
19+
CPU_InitializeCommunication();
20+
21+
Flash_EnumerateSectors( nSects, sects );
22+
23+
//--//
24+
25+
hal_printf( "Erasing deployment...........\r\n" );
26+
27+
Flash_ChipReadOnly( FALSE );
28+
for(int i = 0; i < nSects; i++)
29+
{
30+
if((sects[ i ].Usage & MEMORY_USAGE_MASK) == MEMORY_USAGE_DEPLOYMENT)
31+
{
32+
hal_printf( "Erasing sector %d (0x%08x)\r\n", i, (UINT32)sects[ i ].Start );
33+
if(!Flash_IsSectorErased( &sects[ i ] ))
34+
{
35+
Flash_EraseSector( &sects[ i ] );
36+
}
37+
}
38+
}
39+
Flash_ChipReadOnly( TRUE );
40+
41+
hal_printf( "Erasing deployment finished!\r\n" );
42+
43+
// allowing extra wait so that we can see the print statement!
44+
Events_WaitForEvents( 0, (UINT32)10000 );
45+
CPU_Reset();
46+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
2+
3+
<PropertyGroup>
4+
<Directory>Application\EraseDeployment</Directory>
5+
</PropertyGroup>
6+
7+
<Import Project="$(SPOCLIENT)\tools\targets\Microsoft.SPOT.System.Settings" />
8+
9+
<PropertyGroup>
10+
<OutputType>Executable</OutputType>
11+
<ADD_LOAD_IMAGE_CRC>false</ADD_LOAD_IMAGE_CRC>
12+
<AssemblyName>EraseDeployment</AssemblyName>
13+
<ExtraTargets>BuildSigFiles</ExtraTargets>
14+
<EXEScatterFileDefinition>$(SRC_DIR)\scatterfile_definition.xml</EXEScatterFileDefinition>
15+
</PropertyGroup>
16+
17+
<Import Project="$(SPOCLIENT)\DeviceCode\Targets\$(TARGETCODEBASETYPE)\$(TARGETCODEBASE)\$(PLATFORM)\Drivers_$(PLATFORM).proj" Condition="Exists('$(SPOCLIENT)\DeviceCode\Targets\$(TARGETCODEBASETYPE)\$(TARGETCODEBASE)\$(PLATFORM)\Drivers_$(PLATFORM).proj')" />
18+
19+
<ItemGroup>
20+
<Compile Include="EraseDeployment.cpp" />
21+
22+
<InputLibs Include="$(PLATFORM_INDEPENDENT_LIB_DIR)\CRC.$(LIB_EXT)"/>
23+
24+
<ScatterFileReferences Include="$(SPOCLIENT)\DeviceCode\Targets\$(TARGETCODEBASETYPE)\$(TARGETCODEBASE)\$(PLATFORM)\scatterfile_tools.xml"/>
25+
</ItemGroup>
26+
27+
<Import Project="$(SPOCLIENT)\tools\targets\Microsoft.SPOT.System.Targets" />
28+
29+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<ScatterFile>
3+
4+
<Include File="%SPOCLIENT%\DeviceCode\Targets\%TARGETCODEBASETYPE%\%TARGETCODEBASE%\%PLATFORM%\scatterfile_tools.xml"/>
5+
6+
</ScatterFile>

0 commit comments

Comments
 (0)