Skip to content

Commit

Permalink
ports: Fix incorrect identifiers on Arduino boards.
Browse files Browse the repository at this point in the history
This commit changes the Arduino board identifiers to correspond to their
official names.  This helps to identify boards at runtime.  At the moment
the Arduino Portenta H7 is reported as PORTENTA which is unfortunate as now
there is another Portenta board (Portenta C33) supported in MicroPython.

Also made the other identifiers for flash and network name consistent,
removed the incorrectly used MICROPY_PY_SYS_PLATFORM identifiers, and added
missing MICROPY_PY_NETWORK_HOSTNAME_DEFAULT identifiers.

Boards affected:
- stm32: ARDUINO_PORTENTA_H7, ARDUINO_GIGA, ARDUINO_NICLA_VISION
- renesas-ra: ARDUINO_PORTENTA_C33
- esp32: ARDUINO_NANO_ESP32
- rp2: ARDUINO_NANO_RP2040_CONNECT

Signed-off-by: Sebastian Romero <s.romero@arduino.cc>
  • Loading branch information
sebromero authored and dpgeorge committed Nov 17, 2023
1 parent a968888 commit 6f01933
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
3 changes: 3 additions & 0 deletions ports/esp32/boards/ARDUINO_NANO_ESP32/mpconfigboard.h
@@ -1,6 +1,9 @@
#define MICROPY_HW_BOARD_NAME "Arduino Nano ESP32"
#define MICROPY_HW_MCU_NAME "ESP32S3"

// Network config
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-nano-esp32"

#define MICROPY_PY_MACHINE_DAC (0)

#define MICROPY_HW_I2C0_SCL (12)
Expand Down
6 changes: 5 additions & 1 deletion ports/renesas-ra/boards/ARDUINO_PORTENTA_C33/mpconfigboard.h
Expand Up @@ -5,10 +5,14 @@
*/

// MCU config
#define MICROPY_HW_BOARD_NAME "PORTENTA C33"
#define MICROPY_HW_BOARD_NAME "Arduino Portenta C33"
#define MICROPY_HW_MCU_NAME "RA6M5"
#define MICROPY_HW_MCU_SYSCLK 200000000
#define MICROPY_HW_MCU_PCLK 100000000
#define MICROPY_HW_FLASH_FS_LABEL "Portenta C33"

// Network config
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-portenta-c33"

// module config
#define MICROPY_EMIT_THUMB (1)
Expand Down
3 changes: 3 additions & 0 deletions ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/mpconfigboard.h
Expand Up @@ -4,6 +4,9 @@
#define MICROPY_HW_BOARD_NAME "Arduino Nano RP2040 Connect"
#define MICROPY_HW_FLASH_STORAGE_BYTES (8 * 1024 * 1024)

// Network config
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-nano-rp2040-connect"

// Enable networking.
#define MICROPY_PY_NETWORK (1)

Expand Down
8 changes: 5 additions & 3 deletions ports/stm32/boards/ARDUINO_GIGA/mpconfigboard.h
Expand Up @@ -4,10 +4,12 @@
* Copyright (c) 2023 Arduino SA
*/

#define MICROPY_HW_BOARD_NAME "GIGA"
#define MICROPY_HW_BOARD_NAME "Arduino GIGA R1 WiFi"
#define MICROPY_HW_MCU_NAME "STM32H747"
#define MICROPY_PY_SYS_PLATFORM "Giga"
#define MICROPY_HW_FLASH_FS_LABEL "Giga"
#define MICROPY_HW_FLASH_FS_LABEL "GIGA R1 WiFi"

// Network config
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-giga-r1-wifi"

#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
#define UINT_FMT "%u"
Expand Down
8 changes: 5 additions & 3 deletions ports/stm32/boards/ARDUINO_NICLA_VISION/mpconfigboard.h
Expand Up @@ -4,10 +4,12 @@
* Copyright (c) 2023 Arduino SA
*/

#define MICROPY_HW_BOARD_NAME "NICLAVISION"
#define MICROPY_HW_BOARD_NAME "Arduino Nicla Vision"
#define MICROPY_HW_MCU_NAME "STM32H747"
#define MICROPY_PY_SYS_PLATFORM "Nicla Vision"
#define MICROPY_HW_FLASH_FS_LABEL "niclavision"
#define MICROPY_HW_FLASH_FS_LABEL "Nicla Vision"

// Network config
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-nicla-vision"

#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
#define UINT_FMT "%u"
Expand Down
8 changes: 4 additions & 4 deletions ports/stm32/boards/ARDUINO_PORTENTA_H7/mpconfigboard.h
Expand Up @@ -4,12 +4,12 @@
* Copyright (c) 2022 Arduino SA
*/

#define MICROPY_HW_BOARD_NAME "PORTENTA"
#define MICROPY_HW_BOARD_NAME "Arduino Portenta H7"
#define MICROPY_HW_MCU_NAME "STM32H747"
#define MICROPY_PY_SYS_PLATFORM "Portenta"
#define MICROPY_HW_FLASH_FS_LABEL "portenta"
#define MICROPY_HW_FLASH_FS_LABEL "Portenta H7"

#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "Portenta"
// Network config
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-portenta-h7"

#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
#define UINT_FMT "%u"
Expand Down

0 comments on commit 6f01933

Please sign in to comment.