OSDN Git Service

modify Cortex-M0
authorryuz <ryuz@users.sourceforge.jp>
Mon, 4 Apr 2011 15:00:48 +0000 (00:00 +0900)
committerryuz <ryuz@users.sourceforge.jp>
Mon, 4 Apr 2011 15:00:48 +0000 (00:00 +0900)
23 files changed:
.gitignore
aplfw/build/h8/h8300ha/ch38/Makefile
aplfw/build/sh/sh2/gcc/Makefile
aplfw/sample/sh/cq7144a/gcc/Makefile
cfgrtr/source/apidef.cpp
cfgrtr/source/crealm.cpp
cfgrtr/source/crecyc.cpp
cfgrtr/source/credtq.cpp
cfgrtr/source/creflg.cpp
cfgrtr/source/crembf.cpp
cfgrtr/source/crembx.cpp
cfgrtr/source/crempf.cpp
cfgrtr/source/cremtx.cpp
cfgrtr/source/cresem.cpp
cfgrtr/source/cretsk.cpp
cfgrtr/source/definh.cpp
cfgrtr/source/h4acfg.cpp
kernel/include/arch/proc/arm/arm_v6m/procatr.h
kernel/include/arch/proc/arm/arm_v7m/procatr.h
sample/arm/lpc1114/gcc/Makefile
sample/arm/lpc1114/gcc/link.lds
sample/arm/lpc1114/ostimer.c
sample/arm/lpc1114/system.cfg

index 11c4c8e..79dfd0a 100644 (file)
@@ -10,6 +10,7 @@ kernel_vct.c
 
 # output files
 *.elf
+*.axf
 *.bin
 *.out
 *.hex
index e265efa..fc496c1 100755 (executable)
@@ -2,46 +2,71 @@
 # Hyper Operating System V4 Advance
 #  makefile for H8/300H
 #
-# Copyright (C) 1998-2006 by Project HOS
+# Copyright (C) 1998-2011 by Project HOS
 # http://sourceforge.jp/projects/hos/
 # ----------------------------------------------------------------------------
 
 
 
-# %jp{ターゲット名}
+# --------------------------------------
+#  %jp{各種設定}%en{setting}
+# --------------------------------------
+
+# %jp{ターゲットライブラリ名}%en{target library name}
 TARGET ?= hosaplfw
 
-# %jp{ディレクトリ定義}
+
+# %jp{ディレクトリ定義}%en{directories}
 TOP_DIR            = ../../../../..
 KERNEL_DIR         = $(TOP_DIR)/kernel
 KERNEL_MAKINC_DIR  = $(KERNEL_DIR)/build/common/gmake
 HOSAPLFW_DIR       = $(TOP_DIR)/aplfw
 HOSAPLFW_MKINK_DIR = $(HOSAPLFW_DIR)/build/common/gmake
-OBJS_DIR           = objs_$(TARGET)
 
 
-# %jp{共通設定読込み}
+# %jp{共通定義読込み}%en{common setting}
 include $(KERNEL_MAKINC_DIR)/common.inc
 
 
-# %jp{ã\82¤ã\83³ã\82¯ã\83«ã\83¼ã\83\89ã\83\91ã\82¹è¨­å®\9a}
+# %jp{ã\83\91ã\82¹è¨­å®\9a}%en{add source directories}
 INC_DIRS += $(HOSAPLFW_DIR) $(KERNEL_DIR)/include
+SRC_DIRS += 
+
+
+# %jp{オプションフラグ}%en{option flags}
+CFLAGS  = -CPu=300HA:24
+AFLAGS  = -CPu=300HA:24
+ARFLAGS = 
 
+# %jp{コンパイラ依存の設定読込み}%en{compiler dependent definitions}
+include $(KERNEL_MAKINC_DIR)/ch38_d.inc
+
+# %jp{ライブラリ生成用設定読込み}%en{definitions for library}
+include $(KERNEL_MAKINC_DIR)/maklib_d.inc
 
-# %jp{オプションフラグ}
-CFLAGS  += -CPu=300HA:24
-AFLAGS  += -CPu=300HA:24
-ARFLAGS += 
 
 
+# --------------------------------------
+#  %jp{ソースファイル}%en{source files}
+# --------------------------------------
+
 # %jp{リンク制御対象制御}
 LINK_RENESASSCI = Yes
 
+# %jp{共通ソースの追加}%en{common sources}
+include $(HOSAPLFW_MKINK_DIR)/aplfwsrc.inc
+
+
 
+# --------------------------------------
+#  %jp{ルール定義}%en{rules}
+# --------------------------------------
 
+# %jp{ALL}%en{all}
 .PHONY : all
 all: makelib_all
 
+# %jp{クリーン}%en{clean}
 .PHONY : clean
 clean: makelib_clean
        $(RM) -f *.lst
@@ -53,19 +78,19 @@ depend: makelib_depend
 srccpy: makelib_srccpy
 
 
+# %jp{ライブラリ生成用設定読込み}%en{rules for library}
+include $(KERNEL_MAKINC_DIR)/maklib_r.inc
 
-# %jp{ch38用の設定読込み}
-include $(KERNEL_MAKINC_DIR)/ch38_d.inc
+# %jp{ch38用のルール定義読込み}
+include $(KERNEL_MAKINC_DIR)/ch38_r.inc
 
-# %jp{共通設定読込み}
-include $(KERNEL_MAKINC_DIR)/makelib.inc
-include $(HOSAPLFW_MKINK_DIR)/aplfwsrc.inc
 
 
-# %jp{ch38用のルール定義読込み}
-include $(KERNEL_MAKINC_DIR)/ch38_r.inc
+# --------------------------------------
+#  %jp{依存関係}%en{dependency}
+# --------------------------------------
 
-# %jp{依存関係定義読込み}
+# %jp{依存関係定義読込み}{dependency list of sources}
 include $(HOSAPLFW_MKINK_DIR)/aplfwdep.inc
 
 
index 84dc8e2..5745aeb 100755 (executable)
@@ -2,7 +2,7 @@
 # Hyper Operating System V4 Advance   Application Framework
 #  makefile for SH2
 #
-# Copyright (C) 1998-2007 by Project HOS
+# Copyright (C) 1998-2011 by Project HOS
 # http://sourceforge.jp/projects/hos/
 # ----------------------------------------------------------------------------
 
index f61240d..438181b 100755 (executable)
@@ -6,10 +6,16 @@
 # http://sourceforge.jp/projects/hos/
 # ----------------------------------------------------------------------------
 
-# %jp{ターゲット名}
+
+# --------------------------------------
+#  %jp{各種設定}%en{setting}
+# --------------------------------------
+
+# %jp{ターゲット名}%en{target name}
 TARGET ?= sample
 
-# %jp{ツール定義}
+
+# %jp{ツール定義}%jp{tools}
 GCC_ARCH   ?= sh-elf-
 CMD_CC     ?= $(GCC_ARCH)gcc
 CMD_ASM    ?= $(GCC_ARCH)gcc
@@ -17,7 +23,7 @@ CMD_LINK   ?= $(GCC_ARCH)gcc
 CMD_OBJCNV ?= $(GCC_ARCH)objcopy
 
 
-# %jp{ディレクトリ定義}
+# %jp{ディレクトリ定義}%en{directories}
 TOP_DIR            = ../../../../..
 KERNEL_DIR         = $(TOP_DIR)/kernel
 KERNEL_CFGRTR_DIR  = $(TOP_DIR)/cfgrtr/build/gcc
@@ -26,54 +32,60 @@ KERNEL_BUILD_DIR   = $(KERNEL_DIR)/build/sh/sh2/gcc
 HOSAPLFW_DIR       = $(TOP_DIR)/aplfw
 HOSAPLFW_INC_DIR   = $(HOSAPLFW_DIR)
 HOSAPLFW_BUILD_DIR = $(HOSAPLFW_DIR)/build/sh/sh2/gcc
-OBJS_DIR           = objs_$(TARGET)
 
 
-# %jp{カーネルフックの設定}
+# %jp{コンフィギュレータ定義}
+KERNEL_CFGRTR = $(KERNEL_CFGRTR_DIR)/h4acfg-sh2
+
+
+# %jp{カーネルフックの設定}%en{kernel hook}
 KERNEL_HOK_TSK = Yes
 KERNEL_HOK_ISR = Yes
 
 
-# %jp{共通定義読込み}
+# %jp{共通定義読込み}%en{common setting}
 include $(KERNEL_MAKINC_DIR)/common.inc
 
 
-# %jp{コンフィギュレータ定義}
-KERNEL_CFGRTR = $(KERNEL_CFGRTR_DIR)/h4acfg-sh2
-
-
-# %jp{ライブラリ定義}
+# %jp{ライブラリ定義}%en{library}
 HOSAPLFW_LIB = $(HOSAPLFW_BUILD_DIR)/hosaplfw.$(EXT_LIB)
 
 
-# %jp{メモリマップ}
+# %jp{デバッグ版の定義変更}%en{Debug}
+ifeq ($(DEBUG),Yes)
+TARGET := $(TARGET)dbg
+HOSAPLFW_LIB = $(HOSAPLFW_BUILD_DIR)/hosaplfwdbg.$(EXT_LIB)
+endif
+
+# %jp{メモリマップ}%en{memory map}
 ifeq ($(MEMMAP),ext)
 # %jp{外部メモリ(モニタプログラム利用を想定)}
 TARGET     := $(TARGET)ext
 LINK_SCRIPT = link_ext.lds
 else
-# %jp{ROM実行}
+# %jp{ROM実行}%en{rom}
 LINK_SCRIPT = link_rom.lds
 endif
 
 
-# %jp{デバッグ版の定義変更}
-ifeq ($(DEBUG),Yes)
-TARGET := $(TARGET)dbg
-HOSAPLFW_LIB = $(HOSAPLFW_BUILD_DIR)/hosaplfwdbg.$(EXT_LIB)
-endif
-
-
-# %jp{フラグ設定}
+# %jp{オプションフラグ}%en{option flags}
 CFLAGS  = -m2
 AFLAGS  = -m2
 LNFLAGS = -m2 -nostartfiles -Wl,-Map,$(TARGET).map,-T$(LINK_SCRIPT)
 
 
-# %jp{出力ファイル名}
+# %jp{出力ファイル名}%en{output file}
 TARGET_EXE = $(TARGET).$(EXT_EXE)
 TARGET_MOT = $(TARGET).$(EXT_MOT)
 
+# %jp{パス設定}%en{add source directories}
+INC_DIRS += $(HOSAPLFW_INC_DIR)
+SRC_DIRS += . ..
+
+# %jp{ライブラリの追加}
+LIBS  += $(HOSAPLFW_LIB)
+
+
 
 # %jp{実行ファイル生成用の設定読込み}
 include $(KERNEL_MAKINC_DIR)/makexe_d.inc
@@ -82,31 +94,25 @@ include $(KERNEL_MAKINC_DIR)/makexe_d.inc
 include $(KERNEL_MAKINC_DIR)/gcc_d.inc
 
 
-# %jp{インクルードディレクトリ}
-INC_DIRS += $(HOSAPLFW_INC_DIR)
-
-
-# %jp{ソースディレクトリ}
-SRC_DIRS += . ..
-
 
-# %jp{アセンブラファイルの追加}
-ASRCS += ./vector.S                    \
-         ./crt0.S
+# --------------------------------------
+#  %jp{ソースファイル}%en{source files}
+# --------------------------------------
 
-# %jp{C言語ファイルの追加}
-CSRCS += ../kernel_cfg.c       \
-         ../main.c                     \
-         ../boot.c                     \
-         ../ostimer.c
+# %jp{アセンブラファイルの追加}%en{assembry sources}
+ASRCS += ./vector.S
+ASRCS += ./crt0.S
 
-# %jp{ライブラリの追加}
-LIBS  += $(HOSAPLFW_LIB)
+# %jp{C言語ファイルの追加}%en{C sources}
+CSRCS += ../kernel_cfg.c
+CSRCS += ../main.c
+CSRCS += ../boot.c
+CSRCS += ../ostimer.c
 
 
 
 # --------------------------------------
-#  %jp{ルール}
+#  %jp{ルール定義}%en{rules}
 # --------------------------------------
 
 .PHONY : all
@@ -147,15 +153,16 @@ $(KERNEL_CFGRTR) : kernel_make
 include $(KERNEL_MAKINC_DIR)/makexe_r.inc
 
 
-# %jp{shc用のルール定義読込み}
+# %jp{コンパイラ依存のルール定義読込み}%en{rules for compiler}
 include $(KERNEL_MAKINC_DIR)/gcc_r.inc
 
 
 
 # --------------------------------------
-#  %jp{依存関係}
+#  %jp{依存関係}%en{dependency}
 # --------------------------------------
 
+$(TARGET_EXE): $(LINK_SCRIPT)
 $(OBJS_DIR)/sample.$(EXT_OBJ): ../sample.c ../kernel_id.h
 
 
index ef6800d..e13b27b 100755 (executable)
@@ -25,7 +25,7 @@ CApiDef::CApiDef()
        m_iDefaultMaxId = 0;
        m_iMaxId        = -1;
        m_iObjs         = 0;
-       m_iResObj       = 0;
+       m_iResObj       = -1;
        for ( i = 0; i < API_MAX_OBJS; i++ )
        {
                m_pParamPacks[i] = NULL;
@@ -87,7 +87,7 @@ int CApiDef::AddParams(const char* pszParams)
                                iErr = CFG_ERR_SYNTAX;
                                break;
                        }
-                       
+
                        // ブロック切り出し
                        iErr = CAnalyze::SearchChar(szParamBlock, pszParams, '}');
                        if ( iErr != CFG_ERR_OK )
@@ -142,7 +142,7 @@ int CApiDef::AutoId(void)
        bool blUsedId[65536];
        int iId;
        int i;
-       
+
        if ( m_iObjs > 0 )
        {
                // 変数初期化
@@ -150,7 +150,7 @@ int CApiDef::AutoId(void)
                {
                        blUsedId[i] = false;
                }
-               
+
                // 固定値指定のIDをサーチ
                for ( i = 0; i < m_iObjs; i++ )
                {
@@ -191,13 +191,13 @@ int CApiDef::AutoId(void)
                        m_iMaxId = iId;
                }
        }
-       
+
        // 最大ID番号を予約オブジェクト数分増加
-       if ( m_iResObj > 0 && m_iMaxId < m_iObjs + m_iResObj )
+       if ( m_iResObj >= 0 && m_iMaxId < m_iObjs + m_iResObj )
        {
                m_iMaxId = m_iObjs + m_iResObj;
        }
-       
+
        // 指定が無い場合はデフォルト値に設定
        if ( m_iMaxId < 0 )
        {
index 9ec562d..a9e4a75 100755 (executable)
@@ -1,7 +1,7 @@
 // ---------------------------------------------------------------------------
 //  Hyper Operating System V4 Advance  configurator
 //    CRE_ALM API
-//                                                                            
+//
 //                                    Copyright (C) 1998-2010 by Project HOS
 //                                    http://sourceforge.jp/projects/hos/
 // ---------------------------------------------------------------------------
@@ -28,7 +28,7 @@ CApiCreAlm::CApiCreAlm()
 {
        // %jp{デフォルトの最大ID設定}
        m_iDefaultMaxId = _KERNEL_DEF_TMAX_ALMID;
-       
+
        // パラメーター構文設定
        m_iParamSyntax[0] = 0;          // 単独パラメーター
        m_iParamSyntax[1] = 3;          // 3パラメーターのブロック
@@ -63,7 +63,7 @@ int CApiCreAlm::AnalyzeApi(const char* pszApiName, const char* pszParams)
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
@@ -81,7 +81,7 @@ int CApiCreAlm::AnalyzeApi(const char* pszApiName, const char* pszParams)
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
index 7181551..7a82d15 100755 (executable)
@@ -1,7 +1,7 @@
 // ---------------------------------------------------------------------------
 //  Hyper Operating System V4 Advance  configurator
 //    CRE_CYC API
-//                                                                            
+//
 //                                    Copyright (C) 1998-2010 by Project HOS
 //                                    http://sourceforge.jp/projects/hos/
 // ---------------------------------------------------------------------------
@@ -32,7 +32,7 @@ CApiCreCyc::CApiCreCyc()
 {
        // %jp{デフォルトの最大ID設定}
        m_iDefaultMaxId = _KERNEL_DEF_TMAX_CYCID;
-       
+
        // パラメーター構文設定
        m_iParamSyntax[0] = 0;          // 単独パラメーター
        m_iParamSyntax[1] = 5;          // 5パラメーターのブロック
@@ -56,17 +56,17 @@ int CApiCreCyc::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_MULTIDEF;
                }
 
-               if ( m_iResObj > 0 )
+               if ( m_iResObj >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
@@ -79,16 +79,20 @@ int CApiCreCyc::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
 
+               if ( m_iResObj < 0 )
+               {
+                       m_iResObj = 0;
+               }
                m_iResObj += iId;
 
                return CFG_ERR_OK;
@@ -120,7 +124,7 @@ void CApiCreCyc::WriteId(FILE* fp)
                                m_iId[i]);
                }
        }
-       
+
        // %jp{ID最大値定義を出力}
        fprintf( fp,
                "\n"
@@ -242,7 +246,7 @@ void  CApiCreCyc::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #else
        // %jp{ポインタ配列&統合CYCCB}
@@ -269,7 +273,7 @@ void  CApiCreCyc::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #endif
 #endif
@@ -330,7 +334,7 @@ void  CApiCreCyc::WriteCfgIni(FILE* fp)
        for ( int i = 0; i < m_iObjs; i++ )
        {
                fprintf(fp, "\t_kernel_cyccb_blk_%d.cyccb_ro = &_kernel_cyccb_ro_blk_%d;\n", m_iId[i], m_iId[i]);
-       }       
+       }
 #endif
 }
 
index 4388c86..cd4568f 100755 (executable)
@@ -1,9 +1,9 @@
 // ---------------------------------------------------------------------------
-//  Hyper Operating System V4  コンフィギュレーター                           
-//    CRE_DTQ API の処理                                                      
-//                                                                            
-//                                    Copyright (C) 1998-2003 by Project HOS  
-//                                    http://sourceforge.jp/projects/hos/     
+//  Hyper Operating System V4  コンフィギュレーター
+//    CRE_DTQ API の処理
+//
+//                                    Copyright (C) 1998-2003 by Project HOS
+//                                    http://sourceforge.jp/projects/hos/
 // ---------------------------------------------------------------------------
 
 
@@ -29,7 +29,7 @@ CApiCreDtq::CApiCreDtq()
 {
        // %jp{デフォルトの最大ID設定}
        m_iDefaultMaxId = _KERNEL_DEF_TMAX_DTQID;
-       
+
        // パラメーター構文設定
        m_iParamSyntax[0] = 0;          // 単独パラメーター
        m_iParamSyntax[1] = 3;          // 3パラメーターのブロック
@@ -53,17 +53,17 @@ int CApiCreDtq::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_MULTIDEF;
                }
 
-               if ( m_iResObj > 0 )
+               if ( m_iResObj >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
@@ -76,7 +76,7 @@ int CApiCreDtq::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
@@ -86,11 +86,15 @@ int CApiCreDtq::AnalyzeApi(const char* pszApiName, const char* pszParams)
                        return CFG_ERR_PARAM;
                }
 
+               if ( m_iResObj < 0 )
+               {
+                       m_iResObj = 0;
+               }
                m_iResObj += iId;
 
                return CFG_ERR_OK;
        }
-       
+
        return CFG_ERR_NOPROC;
 }
 
@@ -107,8 +111,8 @@ void CApiCreDtq::WriteId(FILE* fp)
 
        // %jp{コメントを出力}
        fputs("\n\n/* Data queue object ID definetion */\n\n", fp);
-       
-       
+
+
        // %jp{ID定義を出力}
        for ( i = 0; i < m_iObjs; i++ )
        {
@@ -121,7 +125,7 @@ void CApiCreDtq::WriteId(FILE* fp)
                                m_iId[i]);
                }
        }
-       
+
        // %jp{ID最大値定義を出力}
        fprintf( fp,
                "\n"
@@ -183,8 +187,8 @@ void  CApiCreDtq::WriteCfgDef(FILE* fp)
                        }
                }
        }
-       
-       
+
+
        if ( m_iMaxId > 0 )
        {
 #if _KERNEL_DTQCB_ALGORITHM == _KERNEL_DTQCB_ALG_BLKARRAY
@@ -208,7 +212,7 @@ void  CApiCreDtq::WriteCfgDef(FILE* fp)
                        }
                }
                fprintf(fp, "\t};\n");
-               
+
                // %jp{ROM部出力}
                fprintf(fp, "\nconst _KERNEL_T_DTQCB_RO _kernel_dtqcb_ro_tbl[%d] =\n\t{\n", m_iMaxId);
                for ( i = 1; i <= m_iMaxId; i++ )
@@ -282,7 +286,7 @@ void  CApiCreDtq::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #else
        // %jp{ポインタ配列&統合DTQCB}
@@ -309,7 +313,7 @@ void  CApiCreDtq::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #endif
 #endif
@@ -366,7 +370,7 @@ void CApiCreDtq::WriteDtqcbRom(FILE *fp, int iObj)
                }
                else
                {
-                       fprintf(fp, "(%s), ", m_pParamPacks[iObj]->GetParam(CREDTQ_DTQ));       
+                       fprintf(fp, "(%s), ", m_pParamPacks[iObj]->GetParam(CREDTQ_DTQ));
                }
        }
 #endif
index 34322a1..1282b59 100755 (executable)
@@ -1,9 +1,9 @@
 // ---------------------------------------------------------------------------
-//  Hyper Operating System V4a  コンフィギュレーター                           
-//    CRE_FLG API の処理                                                      
-//                                                                            
-//                                    Copyright (C) 1998-2009 by Project HOS  
-//                                    http://sourceforge.jp/projects/hos/     
+//  Hyper Operating System V4a  コンフィギュレーター
+//    CRE_FLG API の処理
+//
+//                                    Copyright (C) 1998-2009 by Project HOS
+//                                    http://sourceforge.jp/projects/hos/
 // ---------------------------------------------------------------------------
 
 
@@ -27,7 +27,7 @@ CApiCreFlg::CApiCreFlg()
 {
        // %jp{デフォルトの最大ID設定}
        m_iDefaultMaxId = _KERNEL_DEF_TMAX_FLGID;
-       
+
        // パラメーター構文設定
        m_iParamSyntax[0] = 0;          // 単独パラメーター
        m_iParamSyntax[1] = 2;          // 2パラメーターのブロック
@@ -51,12 +51,12 @@ int CApiCreFlg::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_MULTIDEF;
                }
-               
-               if ( m_iResObj > 0 )
+
+               if ( m_iResObj >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
@@ -74,16 +74,20 @@ int CApiCreFlg::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
 
+               if ( m_iResObj < 0 )
+               {
+                       m_iResObj = 0;
+               }
                m_iResObj += iId;
 
                return CFG_ERR_OK;
@@ -97,7 +101,7 @@ int CApiCreFlg::AnalyzeApi(const char* pszApiName, const char* pszParams)
 void CApiCreFlg::WriteId(FILE* fp)
 {
        int i;
-       
+
        if ( m_iMaxId <= 0 )
        {
                return;
@@ -272,7 +276,7 @@ void  CApiCreFlg::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
 
        }
 #endif
index 043f6e1..ad73994 100755 (executable)
@@ -1,9 +1,9 @@
 // ---------------------------------------------------------------------------
-//  Hyper Operating System V4  コンフィギュレーター                           
-//    CRE_MBF API の処理                                                      
-//                                                                            
-//                                    Copyright (C) 1998-2003 by Project HOS  
-//                                    http://sourceforge.jp/projects/hos/     
+//  Hyper Operating System V4  コンフィギュレーター
+//    CRE_MBF API の処理
+//
+//                                    Copyright (C) 1998-2003 by Project HOS
+//                                    http://sourceforge.jp/projects/hos/
 // ---------------------------------------------------------------------------
 
 
@@ -53,12 +53,12 @@ int CApiCreMbf::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_MULTIDEF;
                }
 
-               if ( m_iResObj > 0 )
+               if ( m_iResObj >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
@@ -76,21 +76,25 @@ int CApiCreMbf::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
 
+               if ( m_iResObj < 0 )
+               {
+                       m_iResObj = 0;
+               }
                m_iResObj += iId;
 
                return CFG_ERR_OK;
        }
-       
+
        return CFG_ERR_NOPROC;
 }
 
index a5fbc86..f963485 100755 (executable)
@@ -1,9 +1,9 @@
 // ---------------------------------------------------------------------------
-//  Hyper Operating System V4  コンフィギュレーター                           
-//    CRE_MBX API の処理                                                      
-//                                                                            
-//                                    Copyright (C) 1998-2003 by Project HOS  
-//                                    http://sourceforge.jp/projects/hos/     
+//  Hyper Operating System V4  コンフィギュレーター
+//    CRE_MBX API の処理
+//
+//                                    Copyright (C) 1998-2003 by Project HOS
+//                                    http://sourceforge.jp/projects/hos/
 // ---------------------------------------------------------------------------
 
 
@@ -27,8 +27,8 @@
 CApiCreMbx::CApiCreMbx()
 {
        // %jp{デフォルトの最大ID設定}
-       m_iDefaultMaxId = _KERNEL_TMAX_MBXID;
-       
+       m_iDefaultMaxId = _KERNEL_DEF_TMAX_MBXID;
+
        // パラメーター構文設定
        m_iParamSyntax[0] = 0;          // 単独パラメーター
        m_iParamSyntax[1] = 3;          // 3パラメーターのブロック
@@ -53,12 +53,12 @@ int CApiCreMbx::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_MULTIDEF;
                }
 
-               if ( m_iResObj > 0 )
+               if ( m_iResObj >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
@@ -76,16 +76,20 @@ int CApiCreMbx::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
 
+               if ( m_iResObj < 0 )
+               {
+                       m_iResObj = 0;
+               }
                m_iResObj += iId;
 
                return CFG_ERR_OK;
@@ -115,7 +119,7 @@ void  CApiCreMbx::WriteCfgDef(FILE* fp)
        {
                return;
        }
-       
+
        // コメント出力
        fputs(
                "\n\n\n"
@@ -221,7 +225,7 @@ void  CApiCreMbx::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #else
        // %jp{ポインタ配列&統合MBXCB}
@@ -248,7 +252,7 @@ void  CApiCreMbx::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #endif
 #endif
index 372ea7d..55c60e5 100755 (executable)
@@ -1,9 +1,9 @@
 // ---------------------------------------------------------------------------
-//  Hyper Operating System V4  コンフィギュレーター                           
-//    CRE_MPF API の処理                                                      
-//                                                                            
-//                                    Copyright (C) 1998-2003 by Project HOS  
-//                                    http://sourceforge.jp/projects/hos/     
+//  Hyper Operating System V4  コンフィギュレーター
+//    CRE_MPF API の処理
+//
+//                                    Copyright (C) 1998-2003 by Project HOS
+//                                    http://sourceforge.jp/projects/hos/
 // ---------------------------------------------------------------------------
 
 
@@ -28,8 +28,8 @@
 CApiCreMpf::CApiCreMpf()
 {
        // %jp{デフォルトの最大ID設定}
-       m_iDefaultMaxId = _KERNEL_TMAX_MPFID;
-       
+       m_iDefaultMaxId = _KERNEL_DEF_TMAX_MPFID;
+
        // パラメーター構文設定
        m_iParamSyntax[0] = 0;          // 単独パラメーター
        m_iParamSyntax[1] = 4;          // 4パラメーターのブロック
@@ -54,12 +54,12 @@ int CApiCreMpf::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_MULTIDEF;
                }
 
-               if ( m_iResObj > 0 )
+               if ( m_iResObj >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
@@ -77,21 +77,25 @@ int CApiCreMpf::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
 
+               if ( m_iResObj < 0 )
+               {
+                       m_iResObj = 0;
+               }
                m_iResObj += iId;
 
                return CFG_ERR_OK;
        }
-       
+
        return CFG_ERR_NOPROC;
 }
 
@@ -124,7 +128,7 @@ void  CApiCreMpf::WriteCfgDef(FILE* fp)
                "/*   create fixed size memory-pool objects    */\n"
                "/* ------------------------------------------ */\n"
                , fp);
-       
+
        // %jp{メモリプール領域出力}
        for ( i = 0; i < m_iObjs; i++ )
        {
@@ -139,7 +143,7 @@ void  CApiCreMpf::WriteCfgDef(FILE* fp)
                                m_pParamPacks[i]->GetParam(CREMPF_BLKSZ));
                }
        }
-       
+
 
 #if _KERNEL_MPFCB_ALGORITHM == _KERNEL_MPFCB_ALG_BLKARRAY
 #if _KERNEL_MPFCB_SPLIT_RO
@@ -236,7 +240,7 @@ void  CApiCreMpf::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #else
        // ポインタ配列&統合MPFCB
@@ -263,11 +267,11 @@ void  CApiCreMpf::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #endif
 #endif
-       
+
        // %jp{タスク情報出力}
        fprintf(
                fp,
@@ -341,5 +345,5 @@ void  CApiCreMpf::WriteCfgStart(FILE* fp)
 
 
 // ---------------------------------------------------------------------------
-//  Copyright (C) 1998-2003 by Project HOS                                    
+//  Copyright (C) 1998-2003 by Project HOS
 // ---------------------------------------------------------------------------
index 8064db6..cfb99f1 100755 (executable)
@@ -1,9 +1,9 @@
 // ---------------------------------------------------------------------------
-//  Hyper Operating System V4a Advance configurator                           
-//    CRE_MTX API の処理                                                      
-//                                                                            
-//                                    Copyright (C) 1998-2009 by Project HOS  
-//                                    http://sourceforge.jp/projects/hos/     
+//  Hyper Operating System V4a Advance configurator
+//    CRE_MTX API の処理
+//
+//                                    Copyright (C) 1998-2009 by Project HOS
+//                                    http://sourceforge.jp/projects/hos/
 // ---------------------------------------------------------------------------
 
 
@@ -27,7 +27,7 @@ CApiCreMtx::CApiCreMtx()
 {
        // %jp{デフォルトの最大ID設定}
        m_iDefaultMaxId = _KERNEL_DEF_TMAX_MTXID;
-       
+
        // %jp{パラメーター構文設定}
        m_iParamSyntax[0] = 0;          // %jp{単独パラメーター}
        m_iParamSyntax[1] = 2;          // %jp{2パラメーターのブロック}
@@ -52,11 +52,16 @@ int CApiCreMtx::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_MULTIDEF;
                }
 
+               if ( m_iResObj >= 0 )
+               {
+                       return CFG_ERR_DEF_CONFLICT;
+               }
+
                if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
@@ -66,7 +71,29 @@ int CApiCreMtx::AnalyzeApi(const char* pszApiName, const char* pszParams)
 
                return CFG_ERR_OK;
        }
-       
+       else if ( strcmp(pszApiName, "KERNEL_RSV_MTXID") == 0 )
+       {
+               int iId;
+
+               if ( m_iMaxId >= 0 )
+               {
+                       return CFG_ERR_DEF_CONFLICT;
+               }
+
+               if ( (iId = atoi(pszParams)) < 0 )
+               {
+                       return CFG_ERR_PARAM;
+               }
+
+               if ( m_iResObj < 0 )
+               {
+                       m_iResObj = 0;
+               }
+               m_iResObj += iId;
+
+               return CFG_ERR_OK;
+       }
+
        return CFG_ERR_NOPROC;
 }
 
@@ -80,10 +107,10 @@ void CApiCreMtx::WriteId(FILE* fp)
        {
                return;
        }
-       
+
        // %jp{コメントを出力}
        fputs("\n\n/* Mtxaphore object ID definetion */\n\n", fp);
-       
+
        // %jp{ID定義を出力}
        for ( i = 0; i < m_iObjs; i++ )
        {
@@ -96,7 +123,7 @@ void CApiCreMtx::WriteId(FILE* fp)
                                m_iId[i]);
                }
        }
-       
+
        // %jp{ID最大値定義を出力}
        fprintf( fp,
                "\n"
@@ -122,7 +149,7 @@ void  CApiCreMtx::WriteCfgDef(FILE* fp)
                return;
 #endif
        }
-       
+
        // %jp{コメント出力}
        fputs(
                "\n\n\n"
@@ -228,7 +255,7 @@ void  CApiCreMtx::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #else
        // %jp{ポインタ配列&統合MTXCB}
@@ -255,7 +282,7 @@ void  CApiCreMtx::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #endif
 #endif
@@ -320,7 +347,7 @@ void  CApiCreMtx::WriteCfgIni(FILE* fp)
        for ( int i = 0; i < m_iObjs; i++ )
        {
                fprintf(fp, "\t_kernel_mtxcb_blk_%d.mtxcb_ro = &_kernel_mtxcb_ro_blk_%d;\n", m_iId[i], m_iId[i]);
-       }       
+       }
 #endif
 }
 
index 2f160cf..376d3f4 100755 (executable)
@@ -1,9 +1,9 @@
 // ---------------------------------------------------------------------------
-//  Hyper Operating System V4 Advance configurator                           
-//    CRE_SEM API の処理                                                      
-//                                                                            
-//                                    Copyright (C) 1998-2006 by Project HOS  
-//                                    http://sourceforge.jp/projects/hos/     
+//  Hyper Operating System V4 Advance configurator
+//    CRE_SEM API の処理
+//
+//                                    Copyright (C) 1998-2006 by Project HOS
+//                                    http://sourceforge.jp/projects/hos/
 // ---------------------------------------------------------------------------
 
 
@@ -28,7 +28,7 @@ CApiCreSem::CApiCreSem()
 {
        // %jp{デフォルトの最大ID設定}
        m_iDefaultMaxId = _KERNEL_DEF_TMAX_SEMID;
-       
+
        // %jp{パラメーター構文設定}
        m_iParamSyntax[0] = 0;          // %jp{単独パラメーター}
        m_iParamSyntax[1] = 3;          // %jp{3パラメーターのブロック}
@@ -52,44 +52,48 @@ int CApiCreSem::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_MULTIDEF;
                }
 
-               if ( m_iResObj > 0 )
+               if ( m_iResObj >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
-               
+
                if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
-               
+
                m_iMaxId = iId;
-               
+
                return CFG_ERR_OK;
        }
        else if ( strcmp(pszApiName, "KERNEL_RSV_SEMID") == 0 )
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
-               
+
+               if ( m_iResObj < 0 )
+               {
+                       m_iResObj = 0;
+               }
                m_iResObj += iId;
 
                return CFG_ERR_OK;
        }
-       
+
        return CFG_ERR_NOPROC;
 }
 
@@ -98,7 +102,7 @@ int CApiCreSem::AnalyzeApi(const char* pszApiName, const char* pszParams)
 void CApiCreSem::WriteId(FILE* fp)
 {
        int i;
-       
+
        if ( m_iMaxId <= 0 )
        {
                return;
@@ -106,8 +110,8 @@ void CApiCreSem::WriteId(FILE* fp)
 
        // %jp{コメントを出力}
        fputs("\n\n/* Semaphore object ID definetion */\n\n", fp);
-       
-       
+
+
        // %jp{ID定義を出力}
        for ( i = 0; i < m_iObjs; i++ )
        {
@@ -120,7 +124,7 @@ void CApiCreSem::WriteId(FILE* fp)
                                m_iId[i]);
                }
        }
-       
+
        // %jp{ID最大値定義を出力}
        fprintf( fp,
                "\n"
@@ -247,7 +251,7 @@ void  CApiCreSem::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #else
        // %jp{ポインタ配列&統合SEMCB}
@@ -274,7 +278,7 @@ void  CApiCreSem::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #endif
 #endif
@@ -320,7 +324,7 @@ void  CApiCreSem::WriteCfgIni(FILE* fp)
        {
                return;
        }
-       
+
 #if _KERNEL_SEMCB_ALGORITHM == _KERNEL_SEMCB_ALG_PTRARRAY && _KERNEL_SEMCB_SPLIT_RO
        if ( m_iObjs <= 0 )
        {
@@ -331,7 +335,7 @@ void  CApiCreSem::WriteCfgIni(FILE* fp)
        for ( int i = 0; i < m_iObjs; i++ )
        {
                fprintf(fp, "\t_kernel_semcb_blk_%d.semcb_ro = &_kernel_semcb_ro_blk_%d;\n", m_iId[i], m_iId[i]);
-       }       
+       }
 #endif
 }
 
index eccc5c2..a0cc18d 100755 (executable)
@@ -1,9 +1,9 @@
 // ---------------------------------------------------------------------------
-//  Hyper Operating System V4 Advance Configulator                          
-//    CRE_TSK API                                                      
-//                                                                            
-//                                    Copyright (C) 1998-2006 by Project HOS  
-//                                    http://sourceforge.jp/projects/hos/     
+//  Hyper Operating System V4 Advance Configulator
+//    CRE_TSK API
+//
+//                                    Copyright (C) 1998-2006 by Project HOS
+//                                    http://sourceforge.jp/projects/hos/
 // ---------------------------------------------------------------------------
 
 
@@ -56,44 +56,48 @@ int CApiCreTsk::AnalyzeApi(const char* pszApiName, const char* pszParams)
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_MULTIDEF;
                }
 
-               if ( m_iResObj > 0 )
+               if ( m_iResObj >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
-               
-               if ( (iId = atoi(pszParams)) <= 0 )
+
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
-               
+
                m_iMaxId = iId;
-               
+
                return CFG_ERR_OK;
        }
        else if ( strcmp(pszApiName, "KERNEL_RSV_TSKID") == 0 )
        {
                int iId;
 
-               if ( m_iMaxId > 0 )
+               if ( m_iMaxId >= 0 )
                {
                        return CFG_ERR_DEF_CONFLICT;
                }
 
-               if ( (iId = atoi(pszParams)) <= 0 )
+               if ( (iId = atoi(pszParams)) < 0 )
                {
                        return CFG_ERR_PARAM;
                }
 
+               if ( m_iResObj < 0 )
+               {
+                       m_iResObj = 0;
+               }
                m_iResObj += iId;
 
                return CFG_ERR_OK;
        }
-       
+
        return CFG_ERR_NOPROC;
 }
 
@@ -102,7 +106,7 @@ int CApiCreTsk::AnalyzeApi(const char* pszApiName, const char* pszParams)
 void CApiCreTsk::WriteId(FILE* fp)
 {
        int i;
-       
+
        // %jp{コメントを出力}
        fputs("\n\n/* Task object ID definetion */\n\n", fp);
 
@@ -118,7 +122,7 @@ void CApiCreTsk::WriteId(FILE* fp)
                                m_iId[i]);
                }
        }
-       
+
        // %jp{ID最大値定義を出力}
        fprintf( fp,
                "\n"
@@ -136,7 +140,7 @@ void CApiCreTsk::WriteCfgDef(FILE* fp)
 {
        const char* pszParam;
        int         i;
-       
+
        // %jp{コメント出力}
        fputs(
                "\n\n\n"
@@ -144,8 +148,8 @@ void CApiCreTsk::WriteCfgDef(FILE* fp)
                "/*          create task objects               */\n"
                "/* ------------------------------------------ */\n\n"
                , fp);
-       
-       
+
+
        // %jp{スタック領域出力}
        for ( i = 0; i < m_iObjs; i++ )
        {
@@ -159,7 +163,7 @@ void CApiCreTsk::WriteCfgDef(FILE* fp)
                                m_pParamPacks[i]->GetParam(CRETSK_STKSZ));
                }
        }
-       
+
 
 #if _KERNEL_TCB_ALGORITHM == _KERNEL_TCB_ALG_BLKARRAY
 #if _KERNEL_TCB_SPLIT_RO
@@ -256,7 +260,7 @@ void CApiCreTsk::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #else
        // ポインタ配列&統合TCB
@@ -283,11 +287,11 @@ void CApiCreTsk::WriteCfgDef(FILE* fp)
                                fprintf(fp, "\t\tNULL,\n");
                        }
                }
-               fprintf(fp, "\t};\n");          
+               fprintf(fp, "\t};\n");
        }
 #endif
 #endif
-       
+
        // %jp{タスク情報出力}
        fprintf(
                fp,
@@ -314,7 +318,7 @@ void CApiCreTsk::WriteTcbRam(FILE *fp, int iObj)
        fprintf(fp, "0, 0, ");                          /* %jp{キューに接続する為のオブジェクト} */
 #endif
 #endif
-       
+
 #if _KERNEL_TCB_TOQOBJ
        fprintf(fp, "0, 0, 0, ");                       /* %jp{タイムアウトキュー} */
 #endif
@@ -352,7 +356,7 @@ void CApiCreTsk::WriteTcbRam(FILE *fp, int iObj)
 #endif
 
 #if _KERNEL_TCB_MTXHDL
-       fprintf(fp, "0, ");                                     /* %jp{所有するミューテックスのリスト} */        
+       fprintf(fp, "0, ");                                     /* %jp{所有するミューテックスのリスト} */
 #endif
 
 #if _KERNEL_TCB_ERCD
@@ -445,7 +449,7 @@ void  CApiCreTsk::WriteCfgIni(FILE* fp)
        for ( int i = 0; i < m_iObjs; i++ )
        {
                fprintf(fp, "\t_kernel_tcb_blk_%d.tcb_ro = &_kernel_tcb_ro_blk_%d;\n", m_iId[i], m_iId[i]);
-       }       
+       }
 #endif
 }
 
@@ -469,5 +473,5 @@ void  CApiCreTsk::WriteCfgStart(FILE* fp)
 
 
 // ---------------------------------------------------------------------------
-//  Copyright (C) 1998-2006 by Project HOS                                    
+//  Copyright (C) 1998-2006 by Project HOS
 // ---------------------------------------------------------------------------
index 5ad3377..1f34c10 100755 (executable)
@@ -59,7 +59,7 @@ int CApiDefInh::AutoId(void)
 // %jp{cfgファイル定義部書き出し}
 void  CApiDefInh::WriteCfgDef(FILE* fp)
 {
-#ifndef _KERNEL_PROCATR_ARM_CORTEX_M3
+#if !(defined(_KERNEL_PROCATR_ARM_ARMV6M) || defined(_KERNEL_PROCATR_ARM_ARMV7M))
        int i, j;
 
        // コメント出力
@@ -111,7 +111,7 @@ void  CApiDefInh::WriteCfgStart(FILE* fp)
 
 void  CApiDefInh::WriteVecter(FILE* fp, CApiIntStack *pIntStack)
 {
-#ifdef _KERNEL_PROCATR_ARM_CORTEX_M3
+#if defined(_KERNEL_PROCATR_ARM_ARMV6M) || defined(_KERNEL_PROCATR_ARM_ARMV7M)
        int i, j;
 
        // コメント出力
index 2348e19..77d6d1b 100755 (executable)
@@ -146,12 +146,12 @@ int main(int argc, char *argv[])
                        }
                        s_szIdFile = argv[i];
                }
-               else if ( strcmp(argv[i], "-vect") == 0 )
+               else if ( strcmp(argv[i], "-vct") == 0 )
                {
                        i++;
                        if ( i >= argc )
                        {
-                               fprintf(stderr, "option error \"-vect\"\n");
+                               fprintf(stderr, "option error \"-vct\"\n");
                                PrintUsage();
                                return 1;
                        }
@@ -234,7 +234,7 @@ int main(int argc, char *argv[])
 
        fclose(fpCfg);
 
-#ifdef _KERNEL_PROCATR_ARM_CORTEX_M3
+#if defined(_KERNEL_PROCATR_ARM_ARMV6M) || defined(_KERNEL_PROCATR_ARM_ARMV7M)
        // ベクタファイルオープン
        FILE* fpVct;
        if ( (fpVct = fopen(s_szVctFile, "w")) == NULL )
index 36c9e1c..d118fd9 100644 (file)
@@ -13,7 +13,7 @@
 #define _KERNEL__arch__proc__arm__arm_v6m__procatr_h__
 
 
-#define _KERNEL_PROCATR_ARM_CORTEX_M3
+#define _KERNEL_PROCATR_ARM_ARMV6M
 
 
 /* %jp{プロセッサアーキテクチャ定義のあるインクルードパス} */
@@ -35,7 +35,7 @@
 #define _KERNEL_PROCATR_SPT_MULTINT                    TRUE            /**< %jp{多重割込みに対応しているか?} */
 
 #define _KERNEL_PROCATR_TMIN_INHNO                     0                       /**< %jp{割込みハンドラ番号の最小値} */
-#define _KERNEL_PROCATR_TMAX_INHNO                     255                     /**< %jp{割込みハンドラ番号の最大値} */
+#define _KERNEL_PROCATR_TMAX_INHNO                     47                      /**< %jp{割込みハンドラ番号の最大値} */
 
 #define _KERNEL_PROCATR_TMIN_EXCNO                     0                       /**< %jp{CPU例外ハンドラ番号の最小値} */
 #define _KERNEL_PROCATR_TMAX_EXCNO                     15                      /**< %jp{CPU例外ハンドラ番号の最大値} */
index 84f1d98..2663206 100644 (file)
@@ -13,7 +13,7 @@
 #define _KERNEL__arch__proc__arm__arm_v7m__procatr_h__
 
 
-#define _KERNEL_PROCATR_ARM_CORTEX_M3
+#define _KERNEL_PROCATR_ARM_ARMV7M
 
 
 /* %jp{プロセッサアーキテクチャ定義のあるインクルードパス} */
index ebfacc7..28118e3 100644 (file)
@@ -6,10 +6,6 @@
 # ----------------------------------------------------------------------------
 
 
-KERNEL_DEBUG ?= Yes
-DEBUG        ?= Yes
-
-
 # --------------------------------------
 #  %jp{各種設定}{setting}
 # --------------------------------------
@@ -99,7 +95,7 @@ TARGET_HEX = $(TARGET).$(EXT_HEX)
 
 
 # %jp{C言語ファイルの追加}%en{C sources}
-CSRCS += ./kernel_vct.c
+CSRCS += ../kernel_vct.c
 CSRCS += ../kernel_cfg.c
 CSRCS += ../main.c
 CSRCS += ../sample.c
@@ -136,9 +132,9 @@ mostlyclean: clean kernel_clean
 
 
 # %jp{コンフィギュレータ実行}%en{configurator}
-../kernel_cfg.c ../kernel_id.h kernel_vct.c: ../system.cfg $(KERNEL_CFGRTR)
+../kernel_cfg.c ../kernel_id.h ../kernel_vct.c: ../system.cfg $(KERNEL_CFGRTR)
        cpp -E ../system.cfg ../system.i
-       $(KERNEL_CFGRTR) ../system.i -c ../kernel_cfg.c -i ../kernel_id.h
+       $(KERNEL_CFGRTR) ../system.i -c ../kernel_cfg.c -i ../kernel_id.h -vct ../kernel_vct.c
 
 
 # %jp{実行ファイル生成用設定読込み}%en{rules for exection file}
index 77f2410..f8e7bef 100644 (file)
@@ -3,8 +3,8 @@ ENTRY(_kernel_reset_handler)
 
 MEMORY
 {
-       vector : o = 0x00000000, l = 0x00001000
-       ro     : o = 0x00001000, l = 0x00007000
+       vector : o = 0x00000000, l = 0x000000c0
+       ro     : o = 0x000000c0, l = 0x00007f40
        rw     : o = 0x10000000, l = 0x00002000
 }
 
index c31e4aa..eb82fa4 100644 (file)
@@ -23,7 +23,7 @@
 void OsTimer_Initialize(VP_INT exinf)
 {
        /* %jp{タイマ動作開始} */
-       *REG_SRVR  = 1000000;
+       *REG_SRVR  = 480000;
        *REG_SCUVR = 0;
        *REG_SCSR  = 0x00000007;
 
index 10fe2f0..cefca9e 100644 (file)
 KERNEL_HEP_MEM(256, NULL);
 KERNEL_SYS_STK(256, NULL);
 KERNEL_INT_STK(512, NULL);
-KERNEL_MAX_TSKID(5);
-KERNEL_MAX_SEMID(7);
-KERNEL_MAX_FLGID(0);
-KERNEL_MAX_MBXID(0);
-KERNEL_MAX_MPFID(0);
-KERNEL_MAX_MTXID(0);
+KERNEL_RSV_TSKID(0);
+KERNEL_RSV_SEMID(0);
+KERNEL_RSV_FLGID(0);
+KERNEL_RSV_DTQID(0);
+KERNEL_RSV_MBXID(0);
+KERNEL_RSV_MPFID(0);
+KERNEL_RSV_MTXID(0);
+KERNEL_RSV_CYCID(0);
 
 
 /* %jp{OSタイマの設定}%en{OS timer} */