⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sys_support.s

📁 符合日本著名的ITRON规范的开源操作系统。 TOPPERS/JSP内核就是TOPPERS工程按μITRON4.0研发的第一个 软件
💻 S
字号:
/* *  TOPPERS/JSP Kernel *      Toyohashi Open Platform for Embedded Real-Time Systems/ *      Just Standard Profile Kernel *  *  Copyright (C) 2000-2002 by Embedded and Real-Time Systems Laboratory *                              Toyohashi Univ. of Technology, JAPAN *  Copyright (C) 2005 by Freelines CO.,Ltd  *  *  惧淡螟侯涪荚は·笆布の (1)×(4) の掘凤か·Free Software Foundation  *  によって给山されている GNU General Public License の Version 2 に淡 *  揭されている掘凤を塔たす眷圭に嘎り·塑ソフトウェア∈塑ソフトウェア *  を猖恃したものを崔むˉ笆布票じ∷を蝗脱ˇ剩澜ˇ猖恃ˇ浩芹邵∈笆布· *  网脱と钙ぶ∷することを痰浸で钓满するˉ *  (1) 塑ソフトウェアをソ〖スコ〖ドの妨で网脱する眷圭には·惧淡の螟侯 *      涪山绩·この网脱掘凤および布淡の痰瘦沮惮年が·そのままの妨でソ〖 *      スコ〖ド面に崔まれていることˉ *  (2) 塑ソフトウェアを·ライブラリ妨及など·戮のソフトウェア倡券に蝗 *      脱できる妨で浩芹邵する眷圭には·浩芹邵に燃うドキュメント∈网脱 *      荚マニュアルなど∷に·惧淡の螟侯涪山绩·この网脱掘凤および布淡 *      の痰瘦沮惮年を非很することˉ *  (3) 塑ソフトウェアを·怠达に寥み哈むなど·戮のソフトウェア倡券に蝗 *      脱できない妨で浩芹邵する眷圭には·肌のいずれかの掘凤を塔たすこ *      とˉ *    (a) 浩芹邵に燃うドキュメント∈网脱荚マニュアルなど∷に·惧淡の螟 *        侯涪山绩·この网脱掘凤および布淡の痰瘦沮惮年を非很することˉ *    (b) 浩芹邵の妨轮を·侍に年める数恕によって·TOPPERSプロジェクトに *        鼠桂することˉ *  (4) 塑ソフトウェアの网脱により木儡弄または粗儡弄に栏じるいかなる禄 *      巢からも·惧淡螟侯涪荚およびTOPPERSプロジェクトを倘勒することˉ *  *  塑ソフトウェアは·痰瘦沮で捏丁されているものであるˉ惧淡螟侯涪荚お *  よびTOPPERSプロジェクトは·塑ソフトウェアに簇して·その努脱材墙拉も *  崔めて·いかなる瘦沮も乖わないˉまた·塑ソフトウェアの网脱により木 *  儡弄または粗儡弄に栏じたいかなる禄巢に簇しても·その勒扦を砷わないˉ *  *  @(#) $Id: sys_support.S,v 1.2 2005/12/12 09:08:16 honda Exp $ *//* *	タ〖ゲットシステム巴赂モジュ〖ル アセンブリ咐胳婶∈TK-850ES/KJ1+脱∷ */#define	_MACRO_ONLY#include "jsp_kernel.h"#include "v850asm.inc"#define Set(x,y,z) Lea x, r6; Lea y, r7; st.##z r7, 0[r6]/* *  你レベルのタ〖ゲットシステム巴赂の介袋步 * *  スタ〖トアップモジュ〖ルの面で·メモリの介袋步の涟に钙び叫されるˉ */	.text	.globl hardware_init_hookhardware_init_hook:	/* システムウェイトコントロ〖ルレジスタ¨5MHz∵4=20MHz箕 */	Set(VSWC,  0x01,   b)	/* 瘦割された泼年レジスタへのアクセス	   プロセッサクロックコントロ〖ルレジスタ¨メインクロックのfxx叫蜗(PCC=0) */	lea	PRCMD, r6	lea	PCC, r7	st.b	r0, 0[r6]	st.b	r0, 0[r7]	nop	nop	nop	nop	nop	Set(PLLCTL,0x03,   h)   /* PLLコントロ〖ルレジスタ¨PLL瓢侯 */	Set(WDTM2, 0x07,   b)   /* WDTM2 stop */#if 0	/* 嘲婶バスの肋年¨	     CS0に嘲婶SRAMを笼肋した眷圭の徊雇。ここではバスはセパレ〖トバスで、	     12ns墒のSRAMで0waitで瓢侯することを簿年した肋年。	 */	Set(EXIMC, 0x01,   b)	/* 嘲婶バスインタ〖フェイスモ〖ドレジスタ¨セパレ〖トバス */	Set(PMC9,  0xFFFF, h)	/* P9モ〖ドコントロ〖ルレジスタ¨A0-A15叫蜗 */	Set(PMCCS, 0x01,   b)	/* PCSモ〖ドコントロ〖ルレジスタ¨C0叫蜗 */	Set(PMCCT, 0x53,   b)	/* PCTモ〖ドコントロ〖ルレジスタ¨RD/WR/ASTB叫蜗 */	Set(PMCDH, 0xFF,   b)	/* PDHモ〖ドコントロ〖ルレジスタ¨A16-A23叫蜗 */	Set(PMCDL, 0xFFFF, h)	/* PDLモ〖ドコントロ〖ルレジスタ¨AD0-AD15叫蜗 */	Set(DWC0,  0x7770, h)	/* デ〖タウェイト扩告レジスタ¨CS0wait=0 */	Set(AWC,   0xFFFC, h)	/* アドレスウェイト扩告レジスタ¨CS0wait=0 */	Set(BCC,   0xAAA8, h)	/* バスサイクル扩告レジスタ¨CS0wait=0 */#endif	jmp		r31	/* 筛洁充哈み借妄とスぺ〖サ〖 */	.macro StandardInterruptEntry name	.globl \name\name:	jr	vector_handler	nop;nop;nop;nop;nop;nop	.endm	.macro ReservedInterruptEntry	nop;nop;nop;nop;nop;nop;nop;nop	.endm/* * 充哈みハンドラ婶尸の年盗 * 		とりあえず办舱疥に礁める。 */	.section	".vectors","ax"	.align      4	.globl      __reset__reset:	jr	start	nop;nop;nop;nop;nop;nop	StandardInterruptEntry NMI	StandardInterruptEntry INTWDT1	StandardInterruptEntry INTWDT2	StandardInterruptEntry TRAP0	StandardInterruptEntry TRAP1	StandardInterruptEntry DBG/*#-------------------------------------------------------------------  #	SECURITY_ID  #-------------------------------------------------------------------*//*	.section	"SECURITY_ID" */	.word	0xffffffff	/* --0-3 byte code,Address is 0x70-0x73 */	.word	0xffffffff	/* --4-7 byte code,Address is 0x74-0x77 */	.hword	0xffff		/* --8-9 byte code,Address is 0x78-0x79 *//*#-------------------------------------------------------------------  #	OPTION_BYTES  #-------------------------------------------------------------------*//*	.section	"OPTION_BYTES" */	.hword	0x0000		/* --0-1 byte code,Address is 0x7a-0x7b */	.hword	0x0000		/* --2-3 byte code,Address is 0x7c-0x7d */	.hword	0x0000		/* --4-5 byte code,Address is 0x7e-0x7f */	StandardInterruptEntry INTWDTM1	StandardInterruptEntry INTP0	StandardInterruptEntry INTP1	StandardInterruptEntry INTP2	StandardInterruptEntry INTP3	StandardInterruptEntry INTP4	StandardInterruptEntry INTP5	StandardInterruptEntry INTP6	StandardInterruptEntry INTTM000	StandardInterruptEntry INTTM001	StandardInterruptEntry INTTM010	StandardInterruptEntry INTTM011	StandardInterruptEntry INTTM50	StandardInterruptEntry INTTM51	StandardInterruptEntry INTCSI00	StandardInterruptEntry INTCSI01	StandardInterruptEntry INTSRE0	StandardInterruptEntry INTSR0	StandardInterruptEntry INTST0	StandardInterruptEntry INTSRE1	StandardInterruptEntry INTSR1	StandardInterruptEntry INTST1	StandardInterruptEntry INTTMH0	StandardInterruptEntry INTTMH1	StandardInterruptEntry INTCSIA0	StandardInterruptEntry INTIIC0	StandardInterruptEntry INTAD	StandardInterruptEntry INTKR	StandardInterruptEntry INTWTI	StandardInterruptEntry INTWT	StandardInterruptEntry INTBRG	StandardInterruptEntry INTTM020	StandardInterruptEntry INTTM021	StandardInterruptEntry INTTM030	StandardInterruptEntry INTTM031	StandardInterruptEntry INTCSIA1	StandardInterruptEntry INTTM040	StandardInterruptEntry INTTM041	StandardInterruptEntry INTTM050	StandardInterruptEntry INTTM051	StandardInterruptEntry INTCSI02	StandardInterruptEntry INTSRE2	StandardInterruptEntry INTSR2	StandardInterruptEntry INTST2	StandardInterruptEntry INTIIC1	ReservedInterruptEntry 	ReservedInterruptEntry 	ReservedInterruptEntry 	ReservedInterruptEntry 	ReservedInterruptEntry 	StandardInterruptEntry INTTP0OV	StandardInterruptEntry INTTP0CC0	StandardInterruptEntry INTTP0CC1/* * 删擦脱光拉墙?タイマ *  (海搀は删擦脱フリ〖ランニングタイマを侯らずに木儡タイマカウンタをのぞく) */Function _vxget_tim	Lea	TM00, r7	ld.h	0[r7], r8	st.w	r8, 0[r6]	mov	r0, r10	jmp	r31

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -