Skip to content

Commit e973acd

Browse files
committed
Merge branch 'master' of github.com:micropython/micropython
2 parents 780e54c + 939c2e7 commit e973acd

100 files changed

Lines changed: 500 additions & 155 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bare-arm/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ INC += -I$(PY_SRC)
1313
INC += -I$(BUILD)
1414

1515
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
16-
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) $(COPT)
16+
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
1717

1818
#Debugging/Optimization
1919
ifeq ($(DEBUG), 1)
@@ -22,7 +22,7 @@ else
2222
CFLAGS += -Os -DNDEBUG
2323
endif
2424

25-
LDFLAGS = --nostdlib -T stm32f405.ld
25+
LDFLAGS = -nostdlib -T stm32f405.ld
2626
LIBS =
2727

2828
SRC_C = \

py/asmthumb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
#include <assert.h>
2929
#include <string.h>
3030

31-
#include "misc.h"
3231
#include "mpconfig.h"
32+
#include "misc.h"
3333
#include "asmthumb.h"
3434

3535
// wrapper around everything in this file

py/asmx64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
#include <assert.h>
3030
#include <string.h>
3131

32-
#include "misc.h"
3332
#include "mpconfig.h"
33+
#include "misc.h"
3434

3535
// wrapper around everything in this file
3636
#if MICROPY_EMIT_X64

py/binary.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
#include <string.h>
3030
#include <assert.h>
3131

32-
#include "misc.h"
3332
#include "mpconfig.h"
33+
#include "misc.h"
3434
#include "qstr.h"
3535
#include "obj.h"
3636
#include "binary.h"

py/builtin.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ mp_obj_t mp_builtin_abs(mp_obj_t o_in) {
113113
} else {
114114
return o_in;
115115
}
116+
#if MICROPY_PY_BUILTINS_COMPLEX
116117
} else if (MP_OBJ_IS_TYPE(o_in, &mp_type_complex)) {
117118
mp_float_t real, imag;
118119
mp_obj_complex_get(o_in, &real, &imag);
119120
return mp_obj_new_float(MICROPY_FLOAT_C_FUN(sqrt)(real*real + imag*imag));
121+
#endif
120122
#endif
121123
} else {
122124
assert(0);
@@ -154,7 +156,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_any_obj, mp_builtin_any);
154156

155157
STATIC mp_obj_t mp_builtin_bin(mp_obj_t o_in) {
156158
mp_obj_t args[] = { MP_OBJ_NEW_QSTR(MP_QSTR__brace_open__colon__hash_b_brace_close_), o_in };
157-
return mp_obj_str_format(ARRAY_SIZE(args), args);
159+
return mp_obj_str_format(MP_ARRAY_SIZE(args), args);
158160
}
159161

160162
MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_bin_obj, mp_builtin_bin);

py/builtintables.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626

2727
#include <stdlib.h>
2828

29-
#include "misc.h"
3029
#include "mpconfig.h"
30+
#include "misc.h"
3131
#include "qstr.h"
3232
#include "obj.h"
3333
#include "builtin.h"
@@ -44,7 +44,7 @@ STATIC const mp_map_elem_t mp_builtin_object_table[] = {
4444
{ MP_OBJ_NEW_QSTR(MP_QSTR_bool), (mp_obj_t)&mp_type_bool },
4545
{ MP_OBJ_NEW_QSTR(MP_QSTR_bytes), (mp_obj_t)&mp_type_bytes },
4646
{ MP_OBJ_NEW_QSTR(MP_QSTR_bytearray), (mp_obj_t)&mp_type_bytearray },
47-
#if MICROPY_PY_BUILTINS_FLOAT
47+
#if MICROPY_PY_BUILTINS_COMPLEX
4848
{ MP_OBJ_NEW_QSTR(MP_QSTR_complex), (mp_obj_t)&mp_type_complex },
4949
#endif
5050
{ MP_OBJ_NEW_QSTR(MP_QSTR_dict), (mp_obj_t)&mp_type_dict },
@@ -150,8 +150,8 @@ const mp_obj_dict_t mp_builtin_object_dict_obj = {
150150
.map = {
151151
.all_keys_are_qstrs = 1,
152152
.table_is_fixed_array = 1,
153-
.used = ARRAY_SIZE(mp_builtin_object_table),
154-
.alloc = ARRAY_SIZE(mp_builtin_object_table),
153+
.used = MP_ARRAY_SIZE(mp_builtin_object_table),
154+
.alloc = MP_ARRAY_SIZE(mp_builtin_object_table),
155155
.table = (mp_map_elem_t*)mp_builtin_object_table,
156156
},
157157
};
@@ -195,8 +195,8 @@ const mp_obj_dict_t mp_builtin_module_dict_obj = {
195195
.map = {
196196
.all_keys_are_qstrs = 1,
197197
.table_is_fixed_array = 1,
198-
.used = ARRAY_SIZE(mp_builtin_module_table),
199-
.alloc = ARRAY_SIZE(mp_builtin_module_table),
198+
.used = MP_ARRAY_SIZE(mp_builtin_module_table),
199+
.alloc = MP_ARRAY_SIZE(mp_builtin_module_table),
200200
.table = (mp_map_elem_t*)mp_builtin_module_table,
201201
},
202202
};

py/compile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
#include <assert.h>
3232
#include <math.h>
3333

34-
#include "misc.h"
3534
#include "mpconfig.h"
35+
#include "misc.h"
3636
#include "qstr.h"
3737
#include "lexer.h"
3838
#include "parse.h"
@@ -111,8 +111,8 @@ STATIC const mp_map_elem_t mp_constants_table[] = {
111111
STATIC const mp_map_t mp_constants_map = {
112112
.all_keys_are_qstrs = 1,
113113
.table_is_fixed_array = 1,
114-
.used = ARRAY_SIZE(mp_constants_table),
115-
.alloc = ARRAY_SIZE(mp_constants_table),
114+
.used = MP_ARRAY_SIZE(mp_constants_table),
115+
.alloc = MP_ARRAY_SIZE(mp_constants_table),
116116
.table = (mp_map_elem_t*)mp_constants_table,
117117
};
118118

py/emitbc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
#include <string.h>
3131
#include <assert.h>
3232

33-
#include "misc.h"
3433
#include "mpconfig.h"
34+
#include "misc.h"
3535
#include "qstr.h"
3636
#include "lexer.h"
3737
#include "parse.h"

py/emitcommon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
#include <stdint.h>
2929
#include <assert.h>
3030

31-
#include "misc.h"
3231
#include "mpconfig.h"
32+
#include "misc.h"
3333
#include "qstr.h"
3434
#include "lexer.h"
3535
#include "parse.h"

py/emitcpy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
#include <string.h>
3131
#include <assert.h>
3232

33-
#include "misc.h"
3433
#include "mpconfig.h"
34+
#include "misc.h"
3535
#include "qstr.h"
3636
#include "lexer.h"
3737
#include "parse.h"

0 commit comments

Comments
 (0)