Fix build issues
H7 compatibility problems in port.c and peripherals/exti NRF build failures due to new use of const for PinAlarm pin objects Isolated board flash overage on blackpill_with_flash, remove audio modules
This commit is contained in:
parent
9fe8d61656
commit
bab5a22f0c
@ -50,7 +50,7 @@ static bool pins_configured = false;
|
||||
extern uint32_t reset_reason_saved;
|
||||
extern void dbg_dump_GPIOregs(void);
|
||||
|
||||
void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, mcu_pin_obj_t *pin, bool value, bool edge, bool pull) {
|
||||
void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, const mcu_pin_obj_t *pin, bool value, bool edge, bool pull) {
|
||||
if (edge) {
|
||||
mp_raise_ValueError(translate("Cannot wake on pin edge. Only level."));
|
||||
}
|
||||
@ -62,7 +62,7 @@ void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, mcu
|
||||
self->pull = pull;
|
||||
}
|
||||
|
||||
mcu_pin_obj_t *common_hal_alarm_pin_pinalarm_get_pin(alarm_pin_pinalarm_obj_t *self) {
|
||||
const mcu_pin_obj_t *common_hal_alarm_pin_pinalarm_get_pin(alarm_pin_pinalarm_obj_t *self) {
|
||||
return self->pin;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
mcu_pin_obj_t *pin;
|
||||
const mcu_pin_obj_t *pin;
|
||||
bool value;
|
||||
bool pull;
|
||||
} alarm_pin_pinalarm_obj_t;
|
||||
|
@ -17,4 +17,7 @@ MCU_PACKAGE = UFQFPN48
|
||||
LD_COMMON = boards/common_default.ld
|
||||
LD_FILE = boards/STM32F411_nvm_nofs.ld
|
||||
|
||||
# Too big for the flash
|
||||
CIRCUITPY_AUDIOCORE = 0
|
||||
CIRCUITPY_AUDIOPWMIO = 0
|
||||
CIRCUITPY_SYNTHIO = 0
|
||||
|
@ -24,6 +24,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_PINALARM_H
|
||||
#define MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_PINALARM_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "py/objtuple.h"
|
||||
|
||||
@ -39,3 +42,5 @@ void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_ob
|
||||
void alarm_pin_pinalarm_prepare_for_deep_sleep(void);
|
||||
mp_obj_t alarm_pin_pinalarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *alarms);
|
||||
bool alarm_pin_pinalarm_woke_us_up(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_PINALARM_H
|
||||
|
@ -24,6 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_TIMEALARM_H
|
||||
#define MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_TIMEALARM_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
@ -40,3 +42,5 @@ void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_
|
||||
void alarm_time_timealarm_reset(void);
|
||||
|
||||
void alarm_time_timealarm_prepare_for_deep_sleep(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_TIMEALARM_H
|
||||
|
@ -32,6 +32,8 @@
|
||||
|
||||
#include "peripherals/exti.h"
|
||||
|
||||
#if !(CPY_STM32H7)
|
||||
|
||||
STATIC bool stm_exti_reserved[STM32_GPIO_PORT_SIZE];
|
||||
STATIC bool stm_exti_never_reset[STM32_GPIO_PORT_SIZE];
|
||||
STATIC void (*stm_exti_callback[STM32_GPIO_PORT_SIZE])(uint8_t num);
|
||||
@ -145,3 +147,5 @@ void EXTI15_10_IRQHandler(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -175,6 +175,7 @@ safe_mode_t port_init(void) {
|
||||
HAL_Init(); // Turns on SysTick
|
||||
__HAL_RCC_SYSCFG_CLK_ENABLE();
|
||||
|
||||
#if CPY_STM32F4
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
HAL_PWR_EnableBkUpAccess();
|
||||
|
||||
@ -194,6 +195,8 @@ safe_mode_t port_init(void) {
|
||||
__HAL_RCC_BACKUPRESET_FORCE();
|
||||
__HAL_RCC_BACKUPRESET_RELEASE();
|
||||
|
||||
#endif
|
||||
|
||||
stm32_peripherals_clocks_init();
|
||||
stm32_peripherals_gpio_init();
|
||||
stm32_peripherals_rtc_init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user