/**************************************************************************
** *
** FILE : cstart.c *
** *
** DESCRIPTION : *
** The system startup code initializes the processor's registers *
** and the application C variables. *
** *
** Copyright 1996-2010 Altium BV *
** *
**************************************************************************/
#include "cstart.h" /* include configuration */
#include <stdlib.h>
#include <stdbool.h>
#ifdef __CPU__
#include __SFRFILE__(__CPU__)
#endif
#pragma weak exit
#pragma extern _Exit
#pragma profiling off /* prevent profiling information on cstart */
#pragma tradeoff 4 /* preset tradeoff level (for size) */
#pragma runtime BCM /* disable runtime error checking for cstart */
#pragma nomisrac /* disable MISRA-C checking */
#if __USE_ARGC_ARGV
static char argcv[__ARGCV_BUFSIZE];
extern int _argcv( const char *, size_t );
#endif
/* linker definitions */
extern __far void _lc_ue_ustack[]; /* user stack end */
extern __far void _lc_ue_istack[]; /* interrupt stack end */
extern __far void _lc_u_int_tab[]; /* interrupt table */
extern __far void _lc_u_trap_tab[]; /* trap table */
extern __far void _SMALL_DATA_[]; /* centre of A0 addressable area */
extern __far void _LITERAL_DATA_[]; /* centre of A1 addressable area */
extern __far void _A8_DATA_[]; /* centre of A8 addressable area */
extern __far void _A9_DATA_[]; /* centre of A9 addressable area */
/* external functions */
extern void _c_init(void); /* C initialization function */
extern void _call_init(void); /* call a user function before main() */
extern void _endinit(void); /* call a user function with protection switched off */
/* library references */
#pragma extern main
extern int main( int argc, char *argv[] );
/* prototype */
extern void inline _endinit_clear(void);
extern void inline _endinit_set (void);
#if __PROF_ENABLE__
extern void __prof_init( void );
#endif
#if __CLOCKS_PER_SEC_INIT
static void setclockpersec( void );
extern unsigned long long setfoschz( unsigned long long );
#endif
/*********************************************************************************
* _reset() - reset vector
*********************************************************************************/
#pragma section code libc.reset
void _START( void )
{
/* temporarily switch off the workaround for si-bug cpu_tc065,
this can safely be done, since this function is not called
normally anyhow
*/
__asm(".if\t@DEF('__CPU_TC065__')\n$CPU_TC065\tOFF\n\t.endif" );
__asm("j\t__init_sp");
__asm(".if\t@DEF('__CPU_TC065__')\n$CPU_TC065\tON\n\t.endif" );
/*
* Set default Boot Configuration Value
*/
#ifndef __EBU_BOOTCFG_VALUE
# define __EBU_BOOTCFG_VALUE 0x800C
#endif
/*
* Set address for the Boot Configuration Value
* to 'Boot memory Offset Address + alignment'
*/
#if !(__EBU_BOOTCFG_VALUE & 0x1)
/*
* Address Alignment is off
*/
__asm(".align\t4");
#else
/*
* Address Alignment is on and 16 bit wide memory
*/
#if ( !(__EBU_BOOTCFG_VALUE & 0x8000) )
__asm(".align\t8");
#else
/*
* Address Alignment is on and 32 bit wide memory
*/
__asm(".align\t16");
#endif
#endif
__asm(".word\t%0"::"i"(__EBU_BOOTCFG_VALUE));
/* add a nop if necessary to avoid a warning by the assembler
actually this code will never be reached
*/
__asm(".if\t@DEF('__CPU_TC048__')\n\tnop\n\t.endif" );
}
/*********************************************************************************
* _cstart() - initialize stackpointer
*********************************************************************************/
#pragma section code restore
void __init_sp( void )
{
/* The initialization of the stackpointer is done in a seperate function,
because it must be executed in a function which has no stack use.
When a function uses a stack it will be updated at the start of the
function. In this function, however, the stackpointer has an irrelevant
value at the start of the function. A starting value for the stackpointer
is determined and written in this function. The update to the
stackpointer at the start of the function would therefore be undone.
*/
/*
* CPU_TC.033 workaround:
* The stack pointers are aligned to quad-word boundary to workaround these
* functional problems CPU_TC.033.
* Also the C compiler workaround for the appropriate CPU function problem
* need to be enabled with --silicon-bug=cpu-tc033, to align circular
* buffers on a quad-word boundary and to size all stack frames to an integral
* number of quad-words.
*/
#if __CPU_TC033_INITIAL__
# define STACK_ALIGN 0xfffffff0
#else
# define STACK_ALIGN 0xfffffff8
#endif
/*
* Load user stack pointer.
* Disable this if not started from RESET vector. (E.g.
* ROM monitors require to keep in control of vectors)
*/
#if __USP_INIT
unsigned int sp = (unsigned int)(_lc_ue_ustack) & STACK_ALIGN;
__asm("mov.a\tsp,%0"::"d"(sp));
#endif
__asm("j\t_start");
}
/*********************************************************************************
* _cstart() - startup code
*********************************************************************************/
void _start( void )
{
/* Do a dsync before changing any of the csfr values, thus any previous
* background state gets flushed first. Required for applications that jump
* to the reset address.
*/
__dsync();
/* Set the PSW to its reset value in case of a warm start */
#if __USER_STACK
__mtcr(PSW, 0x00000980); /* clear PSW.IS */
#else
__mtcr(PSW, 0x00000b80);
#endif
/* Set the PCXS and PCXO to its reset value in case of a warm start */
unsigned int pcxi = __mfcr(PCXI);
pcxi &= 0xfff00000;
__mtcr(PCXI, pcxi);
/*
* Clear the ENDINIT bit in the WDT_CON0 register in order
* to disable the write-protection for registers protected
* via the EndInit feature (for example: WDT_CON1).
*/
_endinit_clear();
/*
* Disable the Watchdog if requested. Watchdog is enabled by default.
* The Watchdog is disabled after ENDINIT is set by _endinit_set().
*/
#if __WATCHDOG_DISABLE
WDT_CON1.U |= 0x8;
_endinit_set();
_endinit_clear();
#endif
/*
* PMI_TC.003 workaround:
* The TLB-A and TLB-B mappings are set to a page size of 16KB.
*/
#if __PMI_TC003_INITIAL__ && defined MMU_CON
unsigned int mmu_con = __mfcr(MMU_CON);
mmu_con &= 0xffffffe1;
没有合适的资源?快使用搜索试试~ 我知道了~
ADC_2.rar_Tricore_tricore dsp
共71个文件
opt:8个
d:8个
c:7个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
1 下载量 86 浏览量
2022-09-24
18:58:49
上传
评论
收藏 462KB RAR 举报
温馨提示
英飞凌TRICORE系列DSP,ADC自动扫描采样方式多通道
资源详情
资源评论
资源推荐
收起资源包目录
ADC_2.rar (71个子文件)
ADC_2
ADC_2.rtf 41KB
cstart.c 38KB
MAIN.c 15KB
MConfig 398B
sync_on_halt.c 12KB
ADC_2.dpt 498KB
ADC_2.lsl 3KB
DConfig 166B
ADC_2.dav 588KB
IO.c 15KB
MAIN.h 7KB
cstart.h 10KB
GPTA0.c 21KB
ADC_2.simulator.launch 2KB
ADC0.c 24KB
ADC_2.board.launch 4KB
.project 573B
ADC.dpt 498KB
.cproject 34KB
IO.h 77KB
ADC_INT.c 4KB
ADC.dav 589KB
TC1797Regs.h 1.2MB
GPTA0.h 3KB
ADC0.h 8KB
Lauterbach
Micro.cmm 2KB
Menu.cmm 309B
FLASH
t32.cmm 783B
Run.cmm 2KB
t32.cmm.bak 675B
Run_pjt_3.2r3.cmm 1KB
Test.cmm 410B
Oscilloscope.cmm 14KB
ADC.rtf 40KB
Debug
cstart.o 28KB
GPTA0.src 47KB
.GPTA0.o.opt 404B
.IO.o.d 198B
subdir.mk 5KB
ADC0.src 49KB
MAIN.o 9KB
.MAIN.o.d 214B
IO.src 42KB
.ADC_2.elf.opt 354B
ADC_INT.o 3KB
console.log 1KB
IO.o 8KB
GPTA0.o 5KB
ADC_INT.src 12KB
ADC_2.mdf 1KB
.ADC0.o.d 214B
sync_on_halt.o 8KB
.GPTA0.o.d 222B
makefile 1KB
sync_on_halt.src 34KB
ADC_2.elf 47KB
.IO.o.opt 392B
.ADC_INT.o.opt 412B
.ADC0.o.opt 400B
MAIN.src 39KB
cstart.src 109KB
.cstart.o.d 352B
ADC0.o 6KB
.ADC_2.elf.d 986B
.sync_on_halt.o.d 256B
ADC_2.mapxml 25KB
.MAIN.o.opt 400B
.sync_on_halt.o.opt 432B
.ADC_INT.o.d 238B
.cstart.o.opt 408B
ADC_2.hex 8KB
共 71 条
- 1
weixin_42651887
- 粉丝: 76
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
- 林周瑜-论文.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0