Przeglądaj źródła

【update】for armclang

guozhanxin 2 lat temu
rodzic
commit
a809ea7b24
3 zmienionych plików z 4 dodań i 2 usunięć
  1. 2 2
      SConscript
  2. 1 0
      port/mpgetcharport.c
  3. 1 0
      port/mphalport.h

+ 2 - 2
SConscript

@@ -24,9 +24,9 @@ path   += [cwd + '/port/modules/machine']
 
 LOCAL_CCFLAGS = ''
 
-if rtconfig.CROSS_TOOL == 'gcc':
+if rtconfig.PLATFORM in ['gcc', 'armclang']:
     LOCAL_CCFLAGS += ' -std=gnu99'
-elif rtconfig.CROSS_TOOL == 'keil':
+elif rtconfig.PLATFORM in ['keil']:
     LOCAL_CCFLAGS += ' --c99 --gnu'
 
 group = DefineGroup('MicroPython', src, depend = ['PKG_USING_MICROPYTHON'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS)

+ 1 - 0
port/mpgetcharport.c

@@ -29,6 +29,7 @@
 #include <rtthread.h>
 #include <rtdevice.h>
 #include <rthw.h>
+#include "py/runtime.h"
 #include "lib/utils/interrupt_char.h"
 #include "mpgetcharport.h"
 

+ 1 - 0
port/mphalport.h

@@ -32,6 +32,7 @@
 extern void mp_hal_set_interrupt_char (int c);
 extern void mp_pin_od_write(void *machine_pin, int stat);
 extern void mp_hal_pin_open_set(void *machine_pin, int mode);
+extern char* mp_hal_pin_get_name(void *machine_pin);
 extern void mp_hal_stdout_tx_strn_stream(const char *str, size_t len);
 
 #define mp_hal_quiet_timing_enter()         MICROPY_BEGIN_ATOMIC_SECTION()