OSDN Git Service

(none)
authorryuz <ryuz>
Fri, 17 Nov 2006 15:18:00 +0000 (15:18 +0000)
committerryuz <ryuz>
Fri, 17 Nov 2006 15:18:00 +0000 (15:18 +0000)
aplfw/apl/hello/hello.c
aplfw/driver/serial/renesas/scidrv.c
aplfw/sample/h8/ae-3069-lan/ch38/gmake.mak
aplfw/sample/h8/ae-3069-lan/sample.c
aplfw/sample/h8/ae-3069-lan/system.cfg
kernel/include/config/cfgknl.h
kernel/include/core/sys.h
kernel/source/arch/proc/h8/h8300ha/ch38/kint_hdr.src
kernel/source/object/inh/end_inh.c

index f1b0429..667cdf3 100755 (executable)
@@ -8,11 +8,19 @@ int Hello_Main(int argc, char *argv[])
 {
        int i;
 
-       StdIo_PutString("Hello!\r\n");
+       StdIo_PutString("Hello!\r\n\r");
+
        StdIo_PrintFormat("argc = %d\r\n", argc);
-       for ( i = 0; i < argc; i++ )
+       for ( i = 0; i < argc + 1; i++ )
        {
-               StdIo_PrintFormat("argv[%d](%d) %s\r\n", i, strlen(argv[i]), argv[i]);
+               if ( argv[i] == NULL )
+               {
+                       StdIo_PrintFormat("argv[%d] = NULL\r\n", i);
+               }
+               else
+               {
+                       StdIo_PrintFormat("argv[%d](%d) %s\r\n", i, (int)strlen(argv[i]), argv[i]);
+               }
        }
 
        return 0;
index 03f4e8c..222ea99 100755 (executable)
@@ -148,10 +148,15 @@ int SciDrv_Write(C_SCIDRV *self, const void *pData, int iSize)
 void SciDrv_IsrRecvErr(VPARAM Param)
 {
        C_SCIDRV *self;
-
+       int c;
+       
        self = (C_SCIDRV *)Param;
-
-       SciHal_RecvChar(&self->SciHal);
+       
+       while ( (c = SciHal_RecvChar(&self->SciHal)) >= 0 )
+       {
+               StreamBuf_SendChar(&self->StmBuf, c);
+       }
+       SysEvt_Set(self->hEvtRecv);
 }
 
 /* 受信割り込み */
index bd48a6a..bac7d24 100755 (executable)
@@ -4,12 +4,13 @@ TARGET ?= sample
 
 ifeq ($(ROM),Yes)
 TARGET := $(TARGET)_rom
-ADDR_VECT = 0
-ADDR_ROM  = 0FFC140
-ADDR_RAM  = 0FFE140
+ADDR_VECT = 0000000
+ADDR_ROM  = 0000100
+ADDR_RAM  = 0400000
 else
 ADDR_VECT = 0FFC040
-ADDR_ROM  = 0400000
+#ADDR_ROM  = 0400000
+ADDR_ROM  = 0FFC140
 ADDR_RAM  = 0410000
 endif
 
@@ -25,9 +26,14 @@ KERNEL_BUILD_DIR = $(KERNEL_DIR)/build/h8/h8300ha/ch38
 APLFW_BUILD_DIR  = $(APLFW_DIR)/build/h8/h8300ha/ch38
 
 KERNEL_CFG  = $(OS_DIR)/cfgrtr/build/gcc/h4acfg-h8300ha.exe
+
+ifeq ($(DEBUG),Yes)
+KERNEL_LIB  = $(KERNEL_BUILD_DIR)/libhosv4adbg.lib
+APLFW_LIB   = $(APLFW_BUILD_DIR)/hosaplfwdbg.lib
+else
 KERNEL_LIB  = $(KERNEL_BUILD_DIR)/libhosv4a.lib
 APLFW_LIB   = $(APLFW_BUILD_DIR)/hosaplfw.lib
-
+endif
 
 # Tools
 CC     = ch38
@@ -57,7 +63,7 @@ VPATH = .:..:$(SRC_DIR)/driver/renesas
 all: mkdir_objs mk_kernel mk_aplfw $(TARGET).abs
 
 
-$(TARGET).abs: $(OBJS) $(STD_LIBS) $(OS_LIBS)
+$(TARGET).abs: $(OBJS) $(KERNEL_LIB) $(APLFW_LIB) $(STD_LIBS)
        echo rom D=R                                      > $(OBJS_DIR)/subcmd.txt
        echo -OPtimize                                   >> $(OBJS_DIR)/subcmd.txt
        echo list $(TARGET).map                          >> $(OBJS_DIR)/subcmd.txt
index 6a73f6b..ea36ef4 100755 (executable)
 #include "system/sysapi/sysapi.h"
 #include "system/process/process.h"
 #include "system/file/filesys.h"
+#include "system/file/stdfile.h"
 #include "system/command/command.h"
 #include "system/shell/shell.h"
 #include "driver/serial/renesas/scifile.h"
 #include "apl/hello/hello.h"
 
 
-long     g_SystemHeap[16 * 1024 / sizeof(long)];
+#define SYSCR          ((volatile unsigned char *)0xfee012)
+#define IPRB           ((volatile unsigned char *)0xfee019)
+
+/* long     g_SystemHeap[16 * 1024 / sizeof(long)]; */
 C_SCIDRV g_SciDrv[2];
 
 
@@ -35,14 +39,19 @@ void Sample_Startup(VP_INT exinf)
        T_PROCESS_INFO   ProcInfo;
        HANDLE           hFile;
        
+       /*************************/
+       /*       固有設定        */
+       /*************************/
+       *SYSCR &= ~0x08;                /* UIビットを割込みマスクに使う */
+       *IPRB  |=  0x0e;                /* SCI1の割り込み優先度を上げる */
        
        /*************************/
        /*       初期化          */
        /*************************/
        
        /* システム初期化 */
-       System_Initialize(g_SystemHeap, sizeof(g_SystemHeap));
-       
+/*     System_Initialize(g_SystemHeap, sizeof(g_SystemHeap));  */
+       System_Initialize((void *)0x00500000, 0x00100000);
        
        /*************************/
        /*     デバドラ登録      */
@@ -90,6 +99,8 @@ void Sample_Startup(VP_INT exinf)
 /* システムプロセス */
 int System_Boot(VPARAM Param)
 {
+       StdIo_PutString("\r\nHOS Application Platform  Ver 0.01\r\n");
+       
        /* シェル起動 */
        return Command_Execute("hsh");
 }
index f6a6189..d8172fd 100755 (executable)
@@ -10,7 +10,8 @@
 
 
 /* %jp{カーネル独自の設定}%en{kernel} */
-KERNEL_HEP_MEM(4096, NULL);
+/* KERNEL_HEP_MEM(0x80000, 0x480000); */
+KERNEL_HEP_MEM(8192, NULL);
 KERNEL_MAX_TSKID(16);
 KERNEL_MAX_SEMID(16);
 KERNEL_MAX_FLGID(16);
index 7825714..a90f10f 100755 (executable)
@@ -66,7 +66,7 @@ C言語構文(例えばtypedefなど)はこの中には記載せず、マクロ
 /* ---------------------------------------------- */
 
 /* %jp{遅延プロシージャーコール} */
-#define _KERNEL_CFG_DPC                                        TRUE                            /**< Deferred Procedure Call */
+#define _KERNEL_CFG_DPC                                        FALSE                           /**< Deferred Procedure Call */
 
 /* %jp{対称型マルチプロセッサ対応[未実装]} */
 #define _KERNEL_CFG_SMP                                        FALSE                           /**< Symmetric Multiple Processor */
index c1ba7a8..59a93b3 100755 (executable)
@@ -130,7 +130,7 @@ extern _KERNEL_T_SYSCB _kernel_syscb;
 #else                                  /* %jp{バズロック型の場合} */
 
 #define _KERNEL_ENTER_SVC()                                    do { _KERNEL_DIS_INT(); } while (0)
-#define _KERNEL_LEAVE_SVC()                                    do { if (!(_KERNEL_SYS_GET_STST() & _KERNEL_TSS_DINT)){ _KERNEL_ENA_INT(); } } while (0)
+#define _KERNEL_LEAVE_SVC()                                    do { if (!(_KERNEL_SYS_GET_STST() & (_KERNEL_TSS_LOC | _KERNEL_TSS_SYS))){ _KERNEL_ENA_INT(); } } while (0)
 
 #endif
 
index 4312e12..156f474 100755 (executable)
@@ -24,7 +24,7 @@
 ; -----------------------------------------------
 ;  割り込み処理
 ;
-;  割り込み発生時は er0 を push した後、er0 に
+;  割り込み発生時は er0 を push した後、r0l に
 ;  割り込み番号をセットして、ここにジャンプする
 ; -----------------------------------------------
 __kernel_int_hdr:
index 442d4d0..5de013c 100755 (executable)
@@ -24,10 +24,14 @@ void _kernel_end_inh(void)
 {
        /* %jp{割り込みコンテキストを抜ける} */
        _KERNEL_SYS_CLR_CTX();
-       
+
+       _KERNEL_ENA_INT();                      /* %jp{割込み許可} */
+
        /* %jp{サービスコール処理の実施} */
        _KERNEL_ENTER_SVC();    /* %jp{サービスコールに入る}%en{enter service-call} */
        _KERNEL_LEAVE_SVC();    /* %jp{サービスコールに入る}%en{enter service-call} */
+
+       _KERNEL_DIS_INT();                      /* %jp{割込み禁止} */
 }