Merge pull request #2808 from k0d/stm32f7_os

Enables os on STM32F7
This commit is contained in:
hierophect 2020-04-27 17:06:20 -04:00 committed by GitHub
commit 2b1d3c2399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -110,6 +110,8 @@ CFLAGS += $(MCU_FLAGS_$(MCU_SERIES))
# Select HAL file for distribution via mpconfigport # Select HAL file for distribution via mpconfigport
CFLAGS += -DSTM32_HAL_H='<stm32$(MCU_SERIES_LOWER)xx_hal.h>' CFLAGS += -DSTM32_HAL_H='<stm32$(MCU_SERIES_LOWER)xx_hal.h>'
CFLAGS += -DSTM32_SERIES_LOWER='"stm32$(MCU_SERIES_LOWER)"'
# Floating point settings # Floating point settings
ifeq ($(MCU_VARIANT),$(filter $(MCU_VARIANT),STM32F765xx STM32F767xx STM32F769xx STM32H743xx)) ifeq ($(MCU_VARIANT),$(filter $(MCU_VARIANT),STM32F765xx STM32F767xx STM32F769xx STM32H743xx))
CFLAGS += -mfpu=fpv5-d16 -mfloat-abi=hard CFLAGS += -mfpu=fpv5-d16 -mfloat-abi=hard

View File

@ -32,15 +32,15 @@
#include "py/mperrno.h" #include "py/mperrno.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "stm32f4xx_hal.h" #include STM32_HAL_H
#include "peripherals/periph.h" #include "peripherals/periph.h"
STATIC const qstr os_uname_info_fields[] = { STATIC const qstr os_uname_info_fields[] = {
MP_QSTR_sysname, MP_QSTR_nodename, MP_QSTR_sysname, MP_QSTR_nodename,
MP_QSTR_release, MP_QSTR_version, MP_QSTR_machine MP_QSTR_release, MP_QSTR_version, MP_QSTR_machine
}; };
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_sysname_obj, "stm32f4"); STATIC const MP_DEFINE_STR_OBJ(os_uname_info_sysname_obj, STM32_SERIES_LOWER);
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_nodename_obj, "stm32f4"); STATIC const MP_DEFINE_STR_OBJ(os_uname_info_nodename_obj, STM32_SERIES_LOWER);
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_release_obj, MICROPY_VERSION_STRING); STATIC const MP_DEFINE_STR_OBJ(os_uname_info_release_obj, MICROPY_VERSION_STRING);
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_version_obj, MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE); STATIC const MP_DEFINE_STR_OBJ(os_uname_info_version_obj, MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE);

View File

@ -22,7 +22,7 @@ ifeq ($(MCU_SERIES),H7)
CIRCUITPY_ANALOGIO = 0 CIRCUITPY_ANALOGIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 0 CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_PULSEIO = 0 CIRCUITPY_PULSEIO = 0
CIRCUITPY_OS = 0 CIRCUITPY_OS = 1
CIRCUITPY_NVM = 0 CIRCUITPY_NVM = 0
CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOIO = 0
@ -41,7 +41,7 @@ ifeq ($(MCU_SERIES),F7)
CIRCUITPY_ANALOGIO = 0 CIRCUITPY_ANALOGIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 0 CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_PULSEIO = 1 CIRCUITPY_PULSEIO = 1
CIRCUITPY_OS = 0 CIRCUITPY_OS = 1
CIRCUITPY_NVM = 0 CIRCUITPY_NVM = 0
CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOIO = 0