Build fixes thanks to jepler

This commit is contained in:
Scott Shawcroft 2021-05-06 09:04:56 -07:00
parent 59c2787702
commit 71d2536725
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
3 changed files with 2 additions and 20 deletions

View File

@ -55,24 +55,6 @@ CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -iquote $(TOP)/extmod/u
$(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-missing-declarations -Wno-missing-prototypes -Wno-unused-parameter -Wno-float-equal -Wno-sign-compare -Wno-cast-align -Wno-shadow -DCIRCUITPY
endif
# External modules written in C.
ifneq ($(USER_C_MODULES),)
# pre-define USERMOD variables as expanded so that variables are immediate
# expanded as they're added to them
SRC_USERMOD :=
CFLAGS_USERMOD :=
LDFLAGS_USERMOD :=
$(foreach module, $(wildcard $(USER_C_MODULES)/*/micropython.mk), \
$(eval USERMOD_DIR = $(patsubst %/,%,$(dir $(module))))\
$(info Including User C Module from $(USERMOD_DIR))\
$(eval include $(module))\
)
SRC_MOD += $(patsubst $(USER_C_MODULES)/%.c,%.c,$(SRC_USERMOD))
CFLAGS_MOD += $(CFLAGS_USERMOD)
LDFLAGS_MOD += $(LDFLAGS_USERMOD)
endif
# py object files
PY_CORE_O_BASENAME = $(addprefix py/,\
mpstate.o \

View File

@ -64,7 +64,7 @@ mp_obj_t camera_imageformat_type_to_obj(camera_imageformat_t format) {
return (mp_obj_t)MP_ROM_PTR(&camera_imageformat_rgb565_obj);
case IMAGEFORMAT_NONE:
default:
return (mp_obj_t)MP_ROM_PTR(&mp_const_none_obj);
return MP_ROM_NONE;
}
}

View File

@ -76,7 +76,7 @@ mp_obj_t gnss_satellitesystem_type_to_obj(gnss_satellitesystem_t system) {
return (mp_obj_t)MP_ROM_PTR(&gnss_satellitesystem_qzss_l1s_obj);
case SATELLITESYSTEM_NONE:
default:
return (mp_obj_t)MP_ROM_PTR(&mp_const_none_obj);
return MP_ROM_NONE;
}
}