diff --git a/build/tests/el/el-1/ARM7/src/sample1.c b/build/tests/el/el-1/ARM7/src/sample1.c index 87667fd..40371c9 100644 --- a/build/tests/el/el-1/ARM7/src/sample1.c +++ b/build/tests/el/el-1/ARM7/src/sample1.c @@ -7,7 +7,8 @@ #include "sample1.h" #include "dlltest.h" - #define PRINTDEBUG( ...) ((void)0) +#define PRINTDEBUG OS_TPrintf +// #define PRINTDEBUG( ...) ((void)0) #define _DLL_LINK_DYNAMIC_ (1) @@ -94,15 +95,32 @@ void TwlSpMain( void) { ElDesc dll_desc; u32 i; + OSHeapHandle heapHandle; u32 free_bytes, free_blocks, total_blocks; u8 rslt; u32 len; int result; - // vmsk_log(LOG_UPTO(LOG_INFO), LOG_UPTO(LOG_EMERG)) ; - PRINTDEBUG( "Sample program starts (exinf = %d).\n", (INT) exinf); - PRINTDEBUG( "printf test 0.03 = %f\n", 0.03); + // OS初期化 + OS_Init(); + + OS_InitTick(); + OS_InitAlarm(); + // PXI初期化、ARM9と同期 + PXI_Init(); + + // ヒープ領域設定 +// heapHandle = InitializeAllocateSystem(); + + (void)OS_EnableIrq(); + (void)OS_EnableInterrupts(); + + OS_InitThread(); + + + // vmsk_log(LOG_UPTO(LOG_INFO), LOG_UPTO(LOG_EMERG)) ; + PRINTDEBUG( "Sample program starts.\n"); /**/ PRINTDEBUG("Sample program starts.\n"); @@ -144,7 +162,8 @@ void TwlSpMain( void) /*----------*/ - fd = po_open( (byte*)"\\libdlltest.a", (PO_CREAT|PO_BINARY|PO_WRONLY), PS_IREAD); +// fd = po_open( (byte*)"\\libdlltest.a", (PO_CREAT|PO_BINARY|PO_WRONLY), PS_IREAD); + fd = po_open( (byte*)"\\libsampledll_sp.twl.a", (PO_CREAT|PO_BINARY|PO_WRONLY), PS_IREAD); if( fd < 0) { PRINTDEBUG( "po_open failed.\n"); while( 1) {}; diff --git a/build/tests/el/el-1/ARM7/src/staticsymlist.c b/build/tests/el/el-1/ARM7/src/staticsymlist.c index 1e288df..247b73a 100644 --- a/build/tests/el/el-1/ARM7/src/staticsymlist.c +++ b/build/tests/el/el-1/ARM7/src/staticsymlist.c @@ -3,42 +3,40 @@ #ifndef __STATIC_SYM_LIST__ #define __STATIC_SYM_LIST__ -#include +#include #include /*-------------------------------- extern symbol --------------------------------*/ -extern int no_data; -extern void __aeabi_unwind_cpp_pr0( void); -//extern void Lib$$Request$$armlib( void); + /*-------------------------------- symbol structure --------------------------------*/ -ElAdrEntry AdrEnt_no_data = { +ElAdrEntry AdrEnt_OS_TPrintf = { (void*)NULL, - (char*)"no_data\0", - (void*)&no_data, - 0, - 0, -}; -/* -ElAdrEntry AdrEnt_Lib$$Request$$armlib = { - (void*)NULL, - (char*)"Lib$$Request$$armlib\0", - (void*)Lib$$Request$$armlib, + (char*)"OS_TPrintf\0", + (void*)OS_TPrintf, 1, 0, -};*/ +}; +ElAdrEntry AdrEnt_OS_Printf = { + (void*)NULL, + (char*)"OS_Printf\0", + (void*)OS_Printf, + 1, + 0, +}; + /*-------------------------------- API --------------------------------*/ void elAddStaticSym( void) { - elAddAdrEntry( &AdrEnt_no_data); -// elAddAdrEntry( &AdrEnt_Lib$$Request$$armlib); + elAddAdrEntry( &AdrEnt_OS_TPrintf); + elAddAdrEntry( &AdrEnt_OS_Printf); } #endif /*__STATIC_SYM_LIST__*/ diff --git a/tools/makelst/makelst.c b/tools/makelst/makelst.c index 10b43b5..c71a31f 100644 --- a/tools/makelst/makelst.c +++ b/tools/makelst/makelst.c @@ -223,8 +223,8 @@ int main(int argc, char *argv[]) file_write( "#ifndef __STATIC_SYM_LIST__\n", CSourceFilep); file_write( "#define __STATIC_SYM_LIST__\n", CSourceFilep); file_write( "\n", CSourceFilep); - file_write( "#include \n", CSourceFilep); - file_write( "#include \n", CSourceFilep); + file_write( "#include \n", CSourceFilep); + file_write( "#include \n", CSourceFilep); file_write( "\n", CSourceFilep); EL_ResolveAllLibrary(); //抽出シンボルのマーキング