资源简介
《玩转.NET Micro Framework 移植-基于STM32F10x处理器》一书所有的源代码。其它更多的资源可以访问我的blog:http://blog.csdn.net/norains
谢谢!
代码片段和文件信息
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation. All rights reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include
#include “stm32f10x_conf.h“
#include “INTC_Adapter.h“
//--//
extern uint32_t ARM_Vectors;
//--//
// this is the first C function called after bootstrapping ourselves into ram
// these define the region to zero initialize
extern UINT32 Image$$ER_RAM_RW$$ZI$$base;
extern UINT32 Image$$ER_RAM_RW$$ZI$$Length;
// here is the execution address/length of code to move from FLASH to RAM
#define IMAGE_RAM_RO_base Image$$ER_RAM_RO$$base
#define IMAGE_RAM_RO_LENGTH Image$$ER_RAM_RO$$Length
extern UINT32 IMAGE_RAM_RO_base;
extern UINT32 IMAGE_RAM_RO_LENGTH;
// here is the execution address/length of data to move from FLASH to RAM
extern UINT32 Image$$ER_RAM_RW$$base;
extern UINT32 Image$$ER_RAM_RW$$Length;
// here is the load address of the RAM code/data
#define LOAD_RAM_RO_base Load$$ER_RAM_RO$$base
extern UINT32 LOAD_RAM_RO_base;
extern UINT32 Load$$ER_RAM_RW$$base;
//--//
void InitVectorTab()
{
//Set the vector table address to the NVIC_VT0 register which is definition in the xml setting file
volatile UINT32 *pNVIC = &SCB->VTOR;
*pNVIC = reinterpret_cast(&ARM_Vectors);
//Initialize the INTC which is connected with the vector table
INTC_Initialize();
//Ensure completion of memory access
__DSB();
}
#pragma arm section code = “SectionForBootstrapOperations“ //Begin
static void __section(SectionForBootstrapOperations)Prepare_Copy( UINT16* src UINT16* dst UINT32 len )
{
if(dst != src)
{
while(len)
{
*dst++ = *src++;
len -= 2;
}
}
}
static void __section(SectionForBootstrapOperations)Prepare_Zero( UINT16* dst UINT32 len )
{
while(len)
{
*dst++ = 0;
len -= 2;
}
}
//---------------------------------------------------------------------------------
//Description
// The length in the original PrepareImageRegions function must be mulriple of 4
//or the code would be crashed and the IMAGE_RAM_RO_LENGTH sometimes is not mulriple of 4
//so I rewrite the function to copy data. I copy the data 2-Byte by 2-Byte. If copy
//as Byte uintit also crash.
//------------------------------------------------------------------------------------
void __section(SectionForBootstrapOperations) PrepareImageRegionsEx()
{
//
// Copy RAM RO regions into proper location.
//
{
UINT16* src = (UINT16*)&LOAD_RAM_RO_base;
UINT16* dst = (UINT16*)&IMAGE_RAM_RO_base;
UINT32 len = (UINT32 )&IMAGE_RAM_RO_LENGTH;
- 上一篇:Typora MD编辑器
- 下一篇:SPEC CPU 介绍、测试、调优
相关资源
-
Windows .NET fr
amework API 帮助文档2 - 深入浅出AutoCAD.NET二次开发 .李冠亿
- 零死角玩转STM32—F103霸道.pdf
- Microsoft.NET框架程序设计(修订版)
- ArcGIS Server开发指南基于Flex和.Net
- .net RBAC通用权限设计与实现完整源码
- NXOpen .net API referenceNX6
- 精通.NET互操作完整光盘
- .net教务管理系统
- 医药管理系统 源码+实验报告
- 零死角玩转STM32—F103指南者.zip
- Visual Basic.NET程序设计朱小平 曾文权
- 药店管理系统有源代码
- 21个项目玩转深度学习
- ikvmbin-0.44.0.5.zip
- 零死角玩转STM32(完整打包)
- .net三层架构登录注册源码母版页的使
- NET微服务指南.rar
- 轻松玩转STM32微控制器-杨百军
- 《勇敢的芯伴你玩转Xilinx FPGA》.pdf
- windows server 2012 r2 专业版,解决不能安
- FastReport.Net.2020.2.13完美和谐版内附精
-
.netfr
amework4.6.2离线安装及所需证书 - DotNet Memory Profiler5.6 官方版本 + 使用手
- 著名的.Net界面控件:DotNetBar 14.1.0.0
- ghcms(jb51.net).rar
- DWGdirect.Net_and_ActiveX_3.3.0.rar
- ADO.NET数据库应用开发.pdf
- Visual Basic.NET程序设计教程第2版 龚沛
- 零死角玩转STM32—基于F103 [指南者] 开
评论
共有 条评论