• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

BASIC compiler/interpreter for PIC32MX/MZ-80K


Commit MetaInfo

修訂aa09df1005a8a6c4ae1be00d1229c4337c89a4cb (tree)
時間2019-05-13 12:23:49
作者Katsumi <kmorimatsu@sour...>
CommiterKatsumi

Log Message

Revise comments in clib template.

Change Summary

差異

--- a/mips/clib/clib.c
+++ b/mips/clib/clib.c
@@ -36,7 +36,9 @@ const void* const clibdata[]={
3636 * This function will be called when initializing library,
3737 * and used to exchange data between MachiKania BASIC and this library.
3838 * This is only a function placed in .machikania_clib section for providing
39- * static start address at 0xA0000100.
39+ * static start address at 0xA0008000. When editing this function is required,
40+ * the size of kseg2_program_mem and address of kseg0_program_mem
41+ * in linker script must be changed.
4042 */
4143 void* CLIBINIT clib_init(void** data){
4244 // Store pointer to data
--- a/mips/clib/clib.h
+++ b/mips/clib/clib.h
@@ -4,12 +4,15 @@
44 * *
55 ***********************************/
66
7+
8+// Definition of data and program area.
9+// See also linker library.
10+// When expansion of data area size is required, edit following value
11+// as well as kseg1_data_mem in linker script.
712 #define CLIB_PROGMRAM_MEM 0xA0008000
813 #define CLIB_DATA_MEM_SIZE 0x0080
914 #define CLIB_DATA_MEM (CLIB_PROGMRAM_MEM-CLIB_DATA_MEM_SIZE)
1015
11-
12-
1316 // Global variables
1417 // These must be defined by user
1518 extern const void* const functions[];
@@ -26,9 +29,9 @@ void init(void);
2629 malloc(int size);
2730 calloc(int size);
2831 */
29-extern void** g_data;
3032 #define malloc(x) clib_calloc(((x)+3)>>2,g_data)
3133 #define calloc(x) clib_calloc(((x)+3)>>2,g_data)
34+extern void** g_data;
3235 void* clib_calloc(int size, void** g_data);
3336
3437 /*
--- a/mips/clib/example.c
+++ b/mips/clib/example.c
@@ -26,8 +26,6 @@ char* test_private(int param1){
2626 }
2727 }
2828 char* test_public(int param1){
29- void* test=malloc(16);
30- free(test);
3129 return test_private(param1);
3230 }
3331
--- a/mips/clib/nbproject/private/private.xml
+++ b/mips/clib/nbproject/private/private.xml
@@ -5,6 +5,7 @@
55 <group>
66 <file>file:/C:/Users/kmorimatsu/Documents/At%20Home/PIC/PIC32/PIC32MX370F512H/clib/clib.X/clib.h</file>
77 <file>file:/C:/Users/kmorimatsu/Documents/At%20Home/PIC/PIC32/PIC32MX370F512H/clib/clib.X/clib.c</file>
8+ <file>file:/C:/Users/kmorimatsu/Documents/At%20Home/PIC/PIC32/PIC32MX370F512H/clib/clib.X/clib_p32MX370F512H.ld</file>
89 <file>file:/C:/Users/kmorimatsu/Documents/At%20Home/PIC/PIC32/PIC32MX370F512H/clib/clib.X/example.c</file>
910 </group>
1011 </open-files>