Sfoglia il codice sorgente

【完善】Scons 配置,移除 -include "port/mpy_project_cfg.h" 配置。

Signed-off-by: armink <armink.ztl@gmail.com>
armink 8 anni fa
parent
commit
359f636ec7
3 ha cambiato i file con 9 aggiunte e 11 eliminazioni
  1. 1 5
      SConscript
  2. 7 6
      port/file.c
  3. 1 0
      port/mpconfigport.h

+ 1 - 5
SConscript

@@ -15,11 +15,7 @@ path    = [cwd + '/']
 path   += [cwd + '/port']
 path   += [cwd + '/port']
 path   += [cwd + '/lib/netutils']
 path   += [cwd + '/lib/netutils']
 
 
-if rtconfig.CROSS_TOOL == 'keil':
-    LOCAL_CCFLAGS = ' -I "port/mpy_project_cfg.h"'
-else :
-    LOCAL_CCFLAGS = ' -include "port/mpy_project_cfg.h"'
-
+LOCAL_CCFLAGS = ''
 
 
 if rtconfig.CROSS_TOOL == 'gcc':
 if rtconfig.CROSS_TOOL == 'gcc':
     LOCAL_CCFLAGS += ' -std=c99'
     LOCAL_CCFLAGS += ' -std=c99'

+ 7 - 6
port/file.c

@@ -24,6 +24,13 @@
  * THE SOFTWARE.
  * THE SOFTWARE.
  */
  */
 
 
+#include "py/mpconfig.h"
+#include "py/runtime.h"
+#include "py/stream.h"
+#include "py/builtin.h"
+#include "py/mphal.h"
+#include "fdfile.h"
+
 #include <stdio.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <fcntl.h>
@@ -31,12 +38,6 @@
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/types.h>
 
 
-#include "py/runtime.h"
-#include "py/stream.h"
-#include "py/builtin.h"
-#include "py/mphal.h"
-#include "fdfile.h"
-
 #if MICROPY_PY_IO
 #if MICROPY_PY_IO
 
 
 #ifdef _WIN32
 #ifdef _WIN32

+ 1 - 0
port/mpconfigport.h

@@ -26,6 +26,7 @@
 
 
 #include <rtthread.h>
 #include <rtthread.h>
 #include <stdint.h>
 #include <stdint.h>
+#include <stdio.h>
 #include <libc/libc_errno.h>
 #include <libc/libc_errno.h>
 
 
 // options to control how MicroPython is built
 // options to control how MicroPython is built