Commit Graph

11 Commits

Author SHA1 Message Date
Damien George 9af6a275dd stm32/boardctrl: Allow boards to override fatal-error handler.
To override it a board must define MICROPY_BOARD_FATAL_ERROR to a function
that takes a string message and does not return.

Signed-off-by: Damien George <damien@micropython.org>
2022-07-08 23:47:29 +10:00
Damien George d8e7ecd231 stm32/modmachine: Factor out mboot enter code to a function.
Signed-off-by: Damien George <damien@micropython.org>
2022-06-17 13:57:47 +10:00
iabdalkader 0adf0dd3d7 stm32/modmachine: Allow boards to provide custom bootloader code.
And expose the machine_bootloader() C function so it can be used elsewhere.
2022-06-17 13:36:55 +10:00
Damien George 30268c93dc stm32/pendsv: Allow a board to add entries for pendsv_schedule_dispatch.
Signed-off-by: Damien George <damien@micropython.org>
2021-10-20 21:20:18 +11:00
Damien George 69522822de stm32/mpbthciport: Allow a board to hook BT HCI poll functions.
Signed-off-by: Damien George <damien@micropython.org>
2021-10-20 21:20:18 +11:00
Damien George 5f2f9044ff stm32/usbd_cdc_interface: Allow a board to hook into USBD CDC RX events.
Signed-off-by: Damien George <damien@micropython.org>
2021-10-20 21:20:18 +11:00
Damien George a72b8443ca stm32/boardctrl: Add constants for reset mode values.
And use the same boardctrl.h header for both the application and mboot so
these constants are consistent.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 00:31:35 +10:00
Damien George 7b41d7f187 stm32/boardctrl: Give boards control over execution of boot.py,main.py.
This commit simplifies the customisation of the main MicroPython execution
loop (4 macros are reduced to 2), and allows a board to have full control
over the execution (or not) of boot.py and main.py.

For boards that use the default start-up code, there is no functional
change in this commit.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-09 12:44:19 +10:00
Damien George c33c749f64 stm32/boardctrl: Add MICROPY_BOARD_STARTUP hook.
Signed-off-by: Damien George <damien@micropython.org>
2021-03-11 09:04:36 +11:00
Damien George b99300b53e stm32/boardctrl: Define MICROPY_BOARD_EARLY_INIT alongside others.
Signed-off-by: Damien George <damien@micropython.org>
2020-11-11 21:47:13 +11:00
Damien George 4c3976bbca stm32: Add MICROPY_BOARD calls in various places in stm32_main.
For a board to have full configurability of the soft reset loop.

Signed-off-by: Damien George <damien@micropython.org>
2020-11-11 21:41:04 +11:00