mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
all: Update Makefiles and others to build with new ports/ dir layout.
Also renames "stmhal" to "stm32" in documentation and everywhere else.
This commit is contained in:
@@ -8,7 +8,7 @@ endif
|
||||
# If the build directory is not given, make it reflect the board name.
|
||||
BUILD ?= build-$(BOARD)
|
||||
|
||||
include ../py/mkenv.mk
|
||||
include ../../py/mkenv.mk
|
||||
-include mpconfigport.mk
|
||||
include boards/$(BOARD)/mpconfigboard.mk
|
||||
|
||||
@@ -206,7 +206,7 @@ SRC_C = \
|
||||
timer.c \
|
||||
led.c \
|
||||
pin.c \
|
||||
pin_defs_stmhal.c \
|
||||
pin_defs_stm32.c \
|
||||
pin_named_pins.c \
|
||||
bufhelper.c \
|
||||
dma.c \
|
||||
|
||||
@@ -24,7 +24,7 @@ bytecode. The cross-compiler is built and run on the host machine, using:
|
||||
$ make -C mpy-cross
|
||||
```
|
||||
This command should be executed from the root directory of this repository.
|
||||
All other commands below should be executed from the stmhal/ directory.
|
||||
All other commands below should be executed from the ports/stm32/ directory.
|
||||
|
||||
An ARM compiler is required for the build, along with the associated binary
|
||||
utilities. The default compiler is `arm-none-eabi-gcc`, which is available for
|
||||
@@ -71,7 +71,7 @@ Or using `dfu-util` directly:
|
||||
|
||||
ST Discovery or Nucleo boards have a builtin programmer called ST-LINK. With
|
||||
these boards and using Linux or OS X, you have the option to upload the
|
||||
`stmhal` firmware using the `st-flash` utility from the
|
||||
`stm32` firmware using the `st-flash` utility from the
|
||||
[stlink](https://github.com/texane/stlink) project. To do so, connect the board
|
||||
with a mini USB cable to its ST-LINK USB port and then use the make target
|
||||
`deploy-stlink`. For example, if you have the STM32F4DISCOVERY board, you can
|
||||
@@ -101,7 +101,7 @@ a mini USB cable to its ST-LINK USB port and then use the make target
|
||||
$ make BOARD=STM32F4DISC deploy-openocd
|
||||
|
||||
The `openocd` program, which writes the firmware to the target board's flash,
|
||||
is configured via the file `stmhal/boards/openocd_stm32f4.cfg`. This
|
||||
is configured via the file `ports/stm32/boards/openocd_stm32f4.cfg`. This
|
||||
configuration should work for all boards based on a STM32F4xx MCU with a
|
||||
ST-LINKv2 interface. You can override the path to this configuration by setting
|
||||
`OPENOCD_CONFIG` in your Makefile or on the command line.
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
// This board doesn't really have USB, but the stmhal codebase doesn't build
|
||||
// This board doesn't really have USB, but the stm32 codebase doesn't build
|
||||
// without some USB defined, so we leave this on for now.
|
||||
#define USE_USB_FS
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
// This board doesn't really have USB, but the stmhal codebase doesn't build
|
||||
// This board doesn't really have USB, but the stm32 codebase doesn't build
|
||||
// without some USB defined, so we leave this on for now.
|
||||
#define USE_USB_FS
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
// This board doesn't really have USB, but the stmhal codebase doesn't build
|
||||
// This board doesn't really have USB, but the stm32 codebase doesn't build
|
||||
// without some USB defined, so we leave this on for now.
|
||||
#define USE_USB_FS
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "py/builtin.h"
|
||||
|
||||
const char *stmhal_help_text =
|
||||
const char *stm32_help_text =
|
||||
"Welcome to MicroPython!\n"
|
||||
"\n"
|
||||
"For online help please visit http://micropython.org/help/.\n"
|
||||
|
||||
@@ -1 +1 @@
|
||||
../../drivers/display/lcd160cr.py
|
||||
../../../drivers/display/lcd160cr.py
|
||||
@@ -1 +1 @@
|
||||
../../drivers/display/lcd160cr_test.py
|
||||
../../../drivers/display/lcd160cr_test.py
|
||||
@@ -1 +1 @@
|
||||
../../drivers/onewire/onewire.py
|
||||
../../../drivers/onewire/onewire.py
|
||||
@@ -92,7 +92,7 @@
|
||||
#define MICROPY_PY_BUILTINS_INPUT (1)
|
||||
#define MICROPY_PY_BUILTINS_POW3 (1)
|
||||
#define MICROPY_PY_BUILTINS_HELP (1)
|
||||
#define MICROPY_PY_BUILTINS_HELP_TEXT stmhal_help_text
|
||||
#define MICROPY_PY_BUILTINS_HELP_TEXT stm32_help_text
|
||||
#define MICROPY_PY_BUILTINS_HELP_MODULES (1)
|
||||
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
|
||||
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
|
||||
@@ -345,4 +345,4 @@ static inline mp_uint_t disable_irq(void) {
|
||||
// We need to provide a declaration/definition of alloca()
|
||||
#include <alloca.h>
|
||||
|
||||
#define MICROPY_PIN_DEFS_PORT_H "pin_defs_stmhal.h"
|
||||
#define MICROPY_PIN_DEFS_PORT_H "pin_defs_stm32.h"
|
||||
|
||||
@@ -27,7 +27,7 @@ void mp_hal_set_interrupt_char(int c); // -1 to disable
|
||||
|
||||
// timing functions
|
||||
|
||||
#include "stmhal/irq.h"
|
||||
#include "irq.h"
|
||||
|
||||
#define mp_hal_quiet_timing_enter() raise_irq_pri(1)
|
||||
#define mp_hal_quiet_timing_exit(irq_state) restore_irq_pri(irq_state)
|
||||
@@ -44,7 +44,7 @@ static inline mp_uint_t mp_hal_ticks_cpu(void) {
|
||||
|
||||
// C-level pin HAL
|
||||
|
||||
#include "stmhal/pin.h"
|
||||
#include "pin.h"
|
||||
|
||||
#define MP_HAL_PIN_FMT "%q"
|
||||
#define MP_HAL_PIN_MODE_INPUT (0)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// This file contains pin definitions that are specific to the stmhal port.
|
||||
// This file contains pin definitions that are specific to the stm32 port.
|
||||
// This file should only ever be #included by pin.h and not directly.
|
||||
|
||||
enum {
|
||||
Reference in New Issue
Block a user