Changeset 374 for asp3_tinet_ecnl_arm/trunk/asp3_dcre/target
- Timestamp:
- Apr 5, 2019, 9:26:53 PM (5 years ago)
- Location:
- asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc/Makefile.target
r352 r374 30 30 endif 31 31 32 CDEFS := $(CDEFS) -DUSE_ARM_FPU 33 COPTS := $(COPTS) -mfloat-abi=hard 34 32 35 # 33 36 # MPCoreの種類の定義 … … 55 58 CDEFS := $(CDEFS) -DTOPPERS_EXECUTE_ON_ROM 56 59 #LDSCRIPT = $(TARGETDIR)/gr_peach_rom.ld 57 LDSCRIPT = $(SRCDIR)/mbed/targets/TARGET_RENESAS/TARGET_RZ _A1H/device/TOOLCHAIN_GCC_ARM/RZA1H.ld60 LDSCRIPT = $(SRCDIR)/mbed/targets/TARGET_RENESAS/TARGET_RZA1XX/TARGET_RZ_A1H/device/TOOLCHAIN_GCC_ARM/RZA1H.ld 58 61 else 59 62 CDEFS := $(CDEFS) -DTOPPERS_EXECUTE_ON_RAM -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc/cfg_dmy.c
r352 r374 1 1 #include "MBRZA1H.h" 2 #include <stdlib.h> 2 3 3 IRQHandler _kernel_inh_table[R enesas_RZ_A1_IRQ_MAX+1];4 IRQHandler _kernel_inh_table[RZ_A1_IRQ_MAX+1]; 4 5 uint32_t _kernel_excpt_nest_count = 0; 5 6 … … 23 24 { 24 25 } 26 25 27 void _kernel_irq_handler() 26 28 { … … 31 33 } 32 34 33 void _ start()35 void __libc_init_array() 34 36 { 35 37 } 38 39 void *memset(void *dst, int c, size_t size) 40 { 41 return NULL; 42 } 43 44 void *memcpy(void *dst, void * src, size_t size) 45 { 46 return NULL; 47 } 48 49 int main() 50 { 51 } 52 53 void exit(int exitcd) 54 { 55 } -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc/tSIOPortGRPeach.cdl
r352 r374 50 50 */ 51 51 import_C("gr_peach.h"); 52 import_C(" rza1.h");52 import_C("device.h"); 53 53 54 54 /* 55 55 * FIFO内蔵シリアルコミュニケーションインタフェース用 簡易SIOドライバ 56 56 */ 57 import("t SCIF.cdl");57 import("tMbedSerial.cdl"); 58 58 59 59 /* … … 73 73 call sSIOPort cSIOPort; 74 74 [inline] entry siSIOCBR eiSIOCBR; 75 76 /*77 * 割込み要求ライン操作のための結合78 */79 call sInterruptRequest cRxInterruptRequest;80 call sInterruptRequest cTxInterruptRequest;81 75 }; 82 76 … … 85 79 * ト)のセルタイプ 86 80 */ 87 [active]88 81 composite tSIOPortGRPeach { 89 82 /* … … 97 90 */ 98 91 attr { 99 uintptr_t baseAddress; /* ベースアドレス */ 100 INTNO rxInterruptNumber; /* 受信割込み番号 */ 101 INTNO txInterruptNumber; /* 送信割込み番号 */ 102 PRI isrPriority = 1; /* ISR優先度 */ 103 PRI interruptPriority = -4; /* 割込み優先度 */ 92 int32_t tx; /* 送信Pin */ 93 int32_t rx; /* 受信Pin */ 104 94 uint32_t baudRate = 115200; /* ボーレートの設定値 */ 105 95 }; … … 108 98 * SIOドライバ 109 99 */ 110 cell tSCIF SCIF { 111 baseAddress = composite.baseAddress; 100 cell tMbedSerial MbedSerial { 101 tx = composite.tx; 102 rx = composite.rx; 112 103 baudRate = composite.baudRate; 113 104 ciSIOCBR = SIOPortMain.eiSIOCBR; … … 119 110 cell tSIOPortGRPeachMain SIOPortMain { 120 111 ciSIOCBR => composite.ciSIOCBR; 121 cSIOPort = SCIF.eSIOPort; 122 cRxInterruptRequest = RxInterruptRequest.eInterruptRequest; 123 cTxInterruptRequest = TxInterruptRequest.eInterruptRequest; 112 cSIOPort = MbedSerial.eSIOPort; 124 113 }; 125 114 composite.eSIOPort => SIOPortMain.eSIOPort; 126 127 /*128 * SIOの受信割込みサービスルーチンと割込み要求ライン129 */130 cell tISR RxISRInstance {131 interruptNumber = composite.rxInterruptNumber;132 isrPriority = composite.isrPriority;133 ciISRBody = SCIF.eiRxISR;134 };135 cell tInterruptRequest RxInterruptRequest {136 interruptNumber = composite.rxInterruptNumber;137 interruptPriority = composite.interruptPriority;138 };139 140 /*141 * SIOの受信割込みサービスルーチンと割込み要求ライン142 */143 cell tISR TxISRInstance {144 interruptNumber = composite.txInterruptNumber;145 isrPriority = composite.isrPriority;146 ciISRBody = SCIF.eiTxISR;147 };148 cell tInterruptRequest TxInterruptRequest {149 interruptNumber = composite.txInterruptNumber;150 interruptPriority = composite.interruptPriority;151 };152 115 }; 153 116 … … 157 120 * サンプルプログラムが使うポートが,SIOPortTarget1に固定されているた 158 121 * め,ポート1とポート3を入れ換えている.具体的には,SIOPortTarget1は 159 * SCIFのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に,160 * SIOPortTarget3は SCIFのチャネル0につながっている.122 * MbedSerialのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に, 123 * SIOPortTarget3はMbedSerialのチャネル0につながっている. 161 124 */ 162 125 [prototype] 163 126 cell tSIOPortGRPeach SIOPortTarget1 { 164 127 /* 属性の設定 */ 165 baseAddress = C_EXP("SCIF2_BASE"); 166 rxInterruptNumber = C_EXP("INTNO_SCIF2_RXI"); 167 txInterruptNumber = C_EXP("INTNO_SCIF2_TXI"); 128 tx = C_EXP("P6_3"); 129 rx = C_EXP("P6_2"); 168 130 }; 169 131 … … 171 133 cell tSIOPortGRPeach SIOPortTarget2 { 172 134 /* 属性の設定 */ 173 baseAddress = C_EXP("SCIF1_BASE"); 174 rxInterruptNumber = C_EXP("INTNO_SCIF1_RXI"); 175 txInterruptNumber = C_EXP("INTNO_SCIF1_TXI"); 135 tx = C_EXP("P2_5"); 136 rx = C_EXP("P2_6"); 176 137 }; 177 138 … … 179 140 cell tSIOPortGRPeach SIOPortTarget3 { 180 141 /* 属性の設定 */ 181 baseAddress = C_EXP("SCIF0_BASE"); 182 rxInterruptNumber = C_EXP("INTNO_SCIF0_RXI"); 183 txInterruptNumber = C_EXP("INTNO_SCIF0_TXI"); 142 tx = C_EXP("P4_12"); 143 rx = C_EXP("P4_13"); 184 144 }; 185 145 … … 187 147 cell tSIOPortGRPeach SIOPortTarget4 { 188 148 /* 属性の設定 */ 189 baseAddress = C_EXP("SCIF3_BASE"); 190 rxInterruptNumber = C_EXP("INTNO_SCIF3_RXI"); 191 txInterruptNumber = C_EXP("INTNO_SCIF3_TXI"); 149 tx = C_EXP("P2_14"); 150 rx = C_EXP("P2_15"); 192 151 }; 193 152 … … 195 154 cell tSIOPortGRPeach SIOPortTarget5 { 196 155 /* 属性の設定 */ 197 baseAddress = C_EXP("SCIF4_BASE"); 198 rxInterruptNumber = C_EXP("INTNO_SCIF4_RXI"); 199 txInterruptNumber = C_EXP("INTNO_SCIF4_TXI"); 156 tx = C_EXP("P4_14"); 157 rx = C_EXP("P4_15"); 200 158 }; 201 159 … … 203 161 cell tSIOPortGRPeach SIOPortTarget6 { 204 162 /* 属性の設定 */ 205 baseAddress = C_EXP("SCIF5_BASE"); 206 rxInterruptNumber = C_EXP("INTNO_SCIF5_RXI"); 207 txInterruptNumber = C_EXP("INTNO_SCIF5_TXI"); 163 tx = C_EXP("P5_3"); 164 rx = C_EXP("P5_4"); 208 165 }; 209 166 … … 211 168 cell tSIOPortGRPeach SIOPortTarget7 { 212 169 /* 属性の設定 */ 213 baseAddress = C_EXP("SCIF6_BASE"); 214 rxInterruptNumber = C_EXP("INTNO_SCIF6_RXI"); 215 txInterruptNumber = C_EXP("INTNO_SCIF6_TXI"); 170 tx = C_EXP("P8_8"); 171 rx = C_EXP("P8_9"); 216 172 }; 217 173 … … 219 175 cell tSIOPortGRPeach SIOPortTarget8 { 220 176 /* 属性の設定 */ 221 baseAddress = C_EXP("SCIF7_BASE"); 222 rxInterruptNumber = C_EXP("INTNO_SCIF7_RXI"); 223 txInterruptNumber = C_EXP("INTNO_SCIF7_TXI"); 224 }; 177 tx = C_EXP("P5_0"); 178 rx = C_EXP("P5_1"); 179 }; 180 181 [prototype] 182 cell tSIOPortGRPeach SIOPortTarget9 { 183 /* 属性の設定 */ 184 tx = C_EXP("P8_14"); 185 rx = C_EXP("P8_15"); 186 }; 187 188 [prototype] 189 cell tSIOPortGRPeach SIOPortTarget10 { 190 /* 属性の設定 */ 191 tx = C_EXP("P8_13"); 192 rx = C_EXP("P8_11"); 193 }; 194 195 [prototype] 196 cell tSIOPortGRPeach SIOPortTarget11 { 197 /* 属性の設定 */ 198 tx = C_EXP("P11_10"); 199 rx = C_EXP("P11_11"); 200 }; 201 202 [prototype] 203 cell tSIOPortGRPeach SIOPortTarget12 { 204 /* 属性の設定 */ 205 tx = C_EXP("P6_6"); 206 rx = C_EXP("P6_7"); 207 }; 208 209 [prototype] 210 cell tSIOPortGRPeach SIOPortTarget13 { 211 /* 属性の設定 */ 212 tx = C_EXP("P5_6"); 213 rx = C_EXP("P5_7"); 214 }; 215 216 [prototype] 217 cell tSIOPortGRPeach SIOPortTarget14 { 218 /* 属性の設定 */ 219 tx = C_EXP("P11_1"); 220 rx = C_EXP("P11_2"); 221 }; 222 223 [prototype] 224 cell tSIOPortGRPeach SIOPortTarget15 { 225 /* 属性の設定 */ 226 tx = C_EXP("P7_4"); 227 rx = C_EXP("P7_5"); 228 }; -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc/tSIOPortGRPeachMain_inline.h
r352 r374 57 57 */ 58 58 cSIOPort_open(); 59 60 /*61 * SIOの割込みマスクを解除する.62 */63 cRxInterruptRequest_enable();64 cTxInterruptRequest_enable();65 59 } 66 60 … … 77 71 */ 78 72 cSIOPort_close(); 79 80 /*81 * SIOの割込みをマスクする.82 */83 cRxInterruptRequest_disable();84 cTxInterruptRequest_disable();85 73 } 86 74 -
asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel_impl.c
r352 r374 47 47 #include "arm.h" 48 48 #include "rza1.h" 49 #include "scif.h" 50 #include "core_pl310.h" 51 #include "us_ticker_api.h" 49 50 /* 51 * C++のグローバルコンストラクタ呼び出し 52 */ 53 void __libc_init_array() 54 { 55 /* グローバルコンストラクタでOS APIを呼び出す場合は、 56 タスクが起動してから行う */ 57 } 52 58 53 59 /* … … 209 215 * セルタイプtPutLogGRPeach内に実装されている関数を直接呼び出す. 210 216 */ 211 extern void 217 extern void tPutLogGRPeach_initialize(void); 212 218 213 219 /* … … 294 300 rza1_config_port(RZA1_PORT_P(6), led, set); 295 301 } 296 297 void us_ticker_init(void)298 {299 }300 301 uint32_t us_ticker_read()302 {303 ER ret;304 SYSTIM now;305 306 ret = get_tim(&now);307 if(ret != E_OK)308 return 0;309 310 return now;311 }312 313 void us_ticker_set_interrupt(timestamp_t timestamp)314 {315 Asm("bkpt #0");316 }317 318 void us_ticker_disable_interrupt(void)319 {320 }321 322 void us_ticker_clear_interrupt(void)323 {324 }325 326 void wait(float s)327 {328 wait_us(s * 1000000.0f);329 }330 331 void wait_ms(int ms)332 {333 wait_us(ms * 1000);334 }335 336 void wait_us(int us)337 {338 ER ret;339 340 ret = dly_tsk(us);341 if (ret == E_CTX){342 uint32_t start = us_ticker_read();343 while ((us_ticker_read() - start) < (uint32_t)us);344 }345 }346 347 //#include <errno.h>348 #define ENOSYS 38349 350 __attribute__((weak))351 long SYS_poll()352 {353 return -ENOSYS;354 }355 356 __attribute__((weak))357 long SYS_open()358 {359 return -ENOSYS;360 }361 362 __attribute__((weak))363 void SYS_set_tid_address()364 {365 return 0;//-ENOSYS;366 }367 368 __attribute__((weak))369 void SYS_mmap2()370 {371 return 0;//-ENOSYS;372 }373 374 __attribute__((weak))375 void ARM_SYS_set_tls(long a)376 {377 __asm__ __volatile__("mcr p15,0,%0,c13,c0,3" :: "r"(a));378 return 0;379 }380 381 __attribute__((weak))382 void SYS_exit_group()383 {384 ext_ker();385 }386 387 __attribute__((weak))388 void SYS_exit()389 {390 ext_ker();391 }
Note:
See TracChangeset
for help on using the changeset viewer.