Skip to content

Commit 386ab58

Browse files
committed
Change the board information used in the header to be board specific.
1 parent dea22b0 commit 386ab58

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

atmel-samd/boards/arduino_zero/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
#define MICROPY_HW_LED1 PIN_PA17 // red
33
#define UART_REPL
44
// #define USB_REPL
5+
6+
#define MICROPY_HW_BOARD_NAME "Arduino Zero"
7+
#define MICROPY_HW_MCU_NAME "samd21g18"

atmel-samd/boards/feather_m0_ble/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
#define MICROPY_HW_LED1 PIN_PA17 // red
33
// #define UART_REPL
44
#define USB_REPL
5+
6+
#define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 BLE"
7+
#define MICROPY_HW_MCU_NAME "samd21g18"

atmel-samd/mpconfigport.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#include <stdint.h>
22

3+
#ifndef __INCLUDED_MPCONFIGPORT_H
4+
#define __INCLUDED_MPCONFIGPORT_H
5+
36
// options to control how Micro Python is built
47

58
#define MICROPY_QSTR_BYTES_IN_HASH (1)
@@ -74,12 +77,13 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
7477
#define MICROPY_PORT_BUILTINS \
7578
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
7679

80+
81+
// board specific definitions
82+
#include "mpconfigboard.h"
83+
7784
// We need to provide a declaration/definition of alloca()
7885
#include <alloca.h>
7986

80-
#define MICROPY_HW_BOARD_NAME "atmel-samd"
81-
#define MICROPY_HW_MCU_NAME "samd21"
82-
8387
#ifdef __linux__
8488
#define MICROPY_MIN_USE_STDOUT (1)
8589
#endif
@@ -94,3 +98,5 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
9498
#define MICROPY_PORT_ROOT_POINTERS \
9599
const char *readline_hist[8]; \
96100
vstr_t *repl_line;
101+
102+
#endif // __INCLUDED_MPCONFIGPORT_H

0 commit comments

Comments
 (0)