#include <stdint.h>

// The type of a pointer into the init table.
typedef void const * table_ptr_t; // The type of an initialization routine. It takes a pointer to the start of
// its entry (after the function pointer) in the init table and returns a
// pointer to after its entry.
typedef table_ptr_t init_fun_t( table_ptr_t ); typedef struct
{
int32_t mOff;
} FAddr; __no_init uint32_t __iar_SB @ r9; uint32_t const * __iar_zero_init3( uint32_t const * p )
{
uint32_t size;
while ( ( size = *p++ ) != )
{
uint32_t d = *p++;
uint32_t * dest; if ( d & )
{
d -= ;
d += __iar_SB;
} dest = (uint32_t*) d; do
{
*dest++ = ;
size -= ;
}while ( size != );
}
return p;
} uint32_t const * __iar_copy_init3( uint32_t const * p )
{
uint32_t size;
while ( ( size = *p++ ) != )
{
uint32_t const * src;
uint32_t d;
uint32_t * dest; src = (uint32_t *) ( (char const *) p + *(int32_t *) p );
p++; d = *p++; if ( d & )
{
d -= ;
d += __iar_SB;
} dest = (uint32_t *) d; do
{
*dest++ = *src++;
size -= ;
}while ( size != );
}
return p;
} #pragma section = "Region$$Table"
void __iar_data_init3( void )
{
FAddr const * pi = __section_begin("Region$$Table");
table_ptr_t pe = __section_end ("Region$$Table");
while ( pi != pe )
{
init_fun_t * fun = (init_fun_t *) ( (uint32_t) pi + pi->mOff );
++pi;
pi = fun( pi );
}
}
Mode_USR  EQU     0x10
Mode_FIQ EQU 0x11
Mode_IRQ EQU 0x12
Mode_SVC EQU 0x13
Mode_ABT EQU 0x17
Mode_UND EQU 0x1B
Mode_SYS EQU 0x1F ; available on ARM Arch 4 and later I_Bit EQU 0x80 ; when I bit is set, IRQ is disabled
F_Bit EQU 0x40 ; when F bit is set, FIQ is disabled __iar_program_start
MSR CPSR_c, #Mode_SYS|F_Bit|I_Bit
ldr sp,=SFE(CSTACK) ; End of CSTACK(user)
BL __iar_data_init3
BL main
B .

IAR EWARM __iar_program_start, __iar_data_init3, __iar_copy_init3, __iar_zero_init3的更多相关文章

  1. IAR EWARM 字体设置

    如果只想简单的设置,可进行如下设置 Tools->IDE Options->Editor->Colors and Fonts->Editor Font->Font 但是这 ...

  2. 安装IAR ewarm

    一  安装准备 (ST方案) 1 嵌入式集成开发环境IAR ewarm 5.41 2 J-Link4.20 3 emberznet-4.3.0协议栈安装包 option1:tools - stm32软 ...

  3. 痞子衡嵌入式:恩智浦i.MX RT1xxx系列MCU硬件那些事(2.5)- 串行NOR Flash下载算法(IAR EWARM篇)

    大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是IAR开发环境下i.MXRT的串行NOR Flash下载算法设计. 在i.MXRT硬件那些事系列之<在串行NOR Flash XI ...

  4. IAR EWARM Checksum Technical Note

    IELFTOOL Checksum - Basic actions EW targets: ARM, RH850, RX, SH, STM8 EW component: General issues ...

  5. IAR EWARM Example Download List

    https://srv.iar.com/ExamplesOnDemand/versions.xml http://netstorage.iar.com/SuppDB/Public/EXAMPLES/0 ...

  6. IAR EWARM Argument variables $PROJ_DIR$ $TOOLKIT_DIR$

    在IAR中的help中输入argument variables时会找到这样的一个列表: Argument variables On many of the pages in the Options d ...

  7. IAR EWARM PRINTF/SCANF FORMATTER

    The linker automatically chooses an appropriate formatter for printf- and scanf-related function bas ...

  8. IAR EWARM : Debugging with CMSIS-DAP

  9. IAR EWARM 关闭纯汇编函数的警告的方法

    /关闭警告 #pragma diag_suppress=Pe940 uint8_t GetMyData(void) { asm(“MOV R0, #0x550F”); } //恢复警告 #pragma ...

随机推荐

  1. UVALive 7456 Least Crucial Node

    题目链接 题意: 给定一个无向图,一个汇集点,问哪一个点是最关键的,如果有多个关键点,输出序号最小的那个. 因为数据量比较小,所以暴力搜索就行,每去掉一个点,寻找和汇集点相连的还剩几个点,以此确定哪个 ...

  2. [转]Centos 安装Sublime text 3

    本文简单介绍在CentOS上安装Sublime text 3, 转自:Centos 安装Sublime text 3 Step 1 :建立软件安装目录 # mkdir /opt # cd /opt S ...

  3. 洛谷4951 地震 bzoj1816扑克牌 洛谷3199最小圈 / 01分数规划

    洛谷4951 地震 #include<iostream> #include<cstdio> #include<algorithm> #define go(i,a,b ...

  4. spring的事务控制

    1.事务介绍 (1)特性:ACID Atomicity(原子性):事务中的所有操作要么全做要么全不做 Consistency(一致性):事务执行的结果使得数据库从一个一致性状态转移到另一个一致性状态 ...

  5. House Robber I & II & III

    House Robber You are a professional robber planning to rob houses along a street. Each house has a c ...

  6. The Smallest Difference

    Given two array of integers(the first array is array A, the second array is arrayB), now we are goin ...

  7. LTE:eMBMS架构

    一个MBSFN区域是由一个或多个传输相同内容的小区组成的特殊区域.如图1所示,小区8和9都属于MBSFN区域C.一个MBSFN区域可由多个小区组成,一个小区也可以属于多个(至多8个,从36.331中的 ...

  8. python 搭建http服务器和ftp服务器

    默认安装版本为pytho2.7 http服务器搭建: 进入要开放访问的目录下,执行命令:python -m SimpleHTTPServer 9000 显示上述表示安装成功,且http服务的端口为:9 ...

  9. webpack2.0学习

    1.进到指定的目录下,新建自己的文件名 mkdir webpack-test 创建你的项目名称或者你己有的项目名称cd webpack-test npm initnpm install webpack ...

  10. Java 基本语法---Java数组

    Java 基本语法---Java数组 0. 概述 数组:相同类型的数据 按照顺序 组成的一种 引用数据类型 . 数据类型:基本数据类型 + 引用数据类型: 引用数据类型:类 + 接口 + 数组 : 一 ...