#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. Zookeeper命名服务——生成分布式有序且唯一id

    生成分布式有序且唯一id的方法有很多种,使用zookeeper是比较简单的一种方法,只是生成的速度不高,这里只是一个借助zk的版本号生成分布式唯一且有序id的例子. ZkIdGenerator.jav ...

  2. 以python代码解释fork系统调用

    import os print('Process (%s) start...' % os.getpid()) # Only works on Unix/Linux/Mac: pid = os.fork ...

  3. python垃圾回收之分代回收

    可参考vamei的博客和https://www.jianshu.com/p/1e375fb40506

  4. MySQL 5.6.10 跨平台GTID复制实践

    根据业务需要,建立MySQL复制来实现数据冗余. 1:binlog_format   默认值是:statement 有效值: ROW,基于行的复制 STATEMENT 基于语句级别的复制 MASTER ...

  5. RHEL7 -- 使用Chrony设置时间与时钟服务器同步

    Chrony是一个开源的自由软件,它能保持系统时钟与时钟服务器(NTP)同步,让时间保持精确. 它由两个程序组成:chronyd和chronyc. chronyd是一个后台运行的守护进程,用于调整内核 ...

  6. tomcat启动报错:Injection of autowired dependencies failed

    tomcat启动报错:Injectjion of autowired dependencies failed 环境: 操作系统:centos6.5 tomcat: 7.0.52 jdk:openjdk ...

  7. 《高性能MySQL》学习笔记

    第1章 MySQL架构与历史 1.2 并发控制 MySQL在两个层面实现并发控制:服务器层与存储引擎层. 读锁和写锁: 在处理并发读或写时,可以通过实现一个由两种锁组成的系统来解决问题. 这两种锁通常 ...

  8. Android开源库集合(工具)

    图片加载框架: Glide https://github.com/bumptech/glide Android-Universal-Image-Loader https://github.com/no ...

  9. [转] offsetParent 到底是哪一个?

    正文 不同情况 没有已定位的父节点,且自身position:relative的DIV元素的offsetParent为BODY 没有已定位的父节点,且自身position: absolute的DIV元素 ...

  10. Struts2与Spring的Maven依赖冲突

    今天在用Maven集成Struts2+Spring+Hibernate时发现只要不在web模块中声明spring-web的依赖,就会报java.lang.NoClassDefFoundError: [ ...