#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. 第10月第5天 v8

    1. brew install v8 http://www.cnblogs.com/tinyjian/archive/2017/01/17/6294352.html http://blog.csdn. ...

  2. os_mudule_docs

    pydoc os Help on module os: NAME os - OS routines for Mac, NT, or Posix depending on what system we' ...

  3. linux下简单的备份的脚本 2 【转】

    转自:http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=26807463&id=4577034 之前写过linux下简单的 ...

  4. 高通Trustzone and QSEE介绍

    http://blog.csdn.net/iamliuyanlei/article/details/52625968

  5. @PostConstruct和@PreConstruct

    详情参见:https://www.cnblogs.com/landiljy/p/5764515.html 1.@PostConstruct说明 被@PostConstruct修饰的方法会在服务器加载S ...

  6. Matplotlib安装感想

    刚刚安装完numpy,看完书又涉及到matplotlib,哎,安装它浪费了我很多时间,但收获很多呀 下面介绍一下具体的安装过程: (1)http://matplotlib.org/downloads. ...

  7. 【LOJ】#2270. 「SDOI2017」天才黑客

    题解 显然要记录每个点来的状态,这样会扩充出点度的平方条边,就gg了 删掉所有的点,把每个边拆成两个点,连一条边权为c 这个时候我们考虑对于原先的每个点,将所有与其相连边所需要的节点(不管是进入还是出 ...

  8. CSS------div无法覆盖图片全部如何处理

    如图: 代码:(需要将li中的样式属性display设置为inline-block) //获取Url地址中的参数 function getParameter(name) { //正则表达式 var r ...

  9. Spark优化之gc

    对于官方Programming Guides的GC优化一节做了阅读. 在这里记录一下我的理解,可能记录的比较混乱没有条理: 我理解其实GC优化的主要目的就是在你的任务执行中使用更少的内存,进行更少的g ...

  10. 【Java】 大话数据结构(6) 栈的顺序与链式存储

    本文根据<大话数据结构>一书,实现了Java版的栈的顺序存储结构.两栈共享空间.栈的链式存储机构. 栈:限定仅在表尾进行插入和删除操作的线性表. 栈的插入(进栈)和删除(出栈)操作如下图所 ...