Skip to content

Commit 6f01933

Browse files
sebromerodpgeorge
authored andcommitted
ports: Fix incorrect identifiers on Arduino boards.
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>
1 parent a968888 commit 6f01933

File tree

6 files changed

+25
-11
lines changed

6 files changed

+25
-11
lines changed

ports/esp32/boards/ARDUINO_NANO_ESP32/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#define MICROPY_HW_BOARD_NAME "Arduino Nano ESP32"
22
#define MICROPY_HW_MCU_NAME "ESP32S3"
33

4+
// Network config
5+
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-nano-esp32"
6+
47
#define MICROPY_PY_MACHINE_DAC (0)
58

69
#define MICROPY_HW_I2C0_SCL (12)

ports/renesas-ra/boards/ARDUINO_PORTENTA_C33/mpconfigboard.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
*/
66

77
// MCU config
8-
#define MICROPY_HW_BOARD_NAME "PORTENTA C33"
8+
#define MICROPY_HW_BOARD_NAME "Arduino Portenta C33"
99
#define MICROPY_HW_MCU_NAME "RA6M5"
1010
#define MICROPY_HW_MCU_SYSCLK 200000000
1111
#define MICROPY_HW_MCU_PCLK 100000000
12+
#define MICROPY_HW_FLASH_FS_LABEL "Portenta C33"
13+
14+
// Network config
15+
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-portenta-c33"
1216

1317
// module config
1418
#define MICROPY_EMIT_THUMB (1)

ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#define MICROPY_HW_BOARD_NAME "Arduino Nano RP2040 Connect"
55
#define MICROPY_HW_FLASH_STORAGE_BYTES (8 * 1024 * 1024)
66

7+
// Network config
8+
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-nano-rp2040-connect"
9+
710
// Enable networking.
811
#define MICROPY_PY_NETWORK (1)
912

ports/stm32/boards/ARDUINO_GIGA/mpconfigboard.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
* Copyright (c) 2023 Arduino SA
55
*/
66

7-
#define MICROPY_HW_BOARD_NAME "GIGA"
7+
#define MICROPY_HW_BOARD_NAME "Arduino GIGA R1 WiFi"
88
#define MICROPY_HW_MCU_NAME "STM32H747"
9-
#define MICROPY_PY_SYS_PLATFORM "Giga"
10-
#define MICROPY_HW_FLASH_FS_LABEL "Giga"
9+
#define MICROPY_HW_FLASH_FS_LABEL "GIGA R1 WiFi"
10+
11+
// Network config
12+
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-giga-r1-wifi"
1113

1214
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
1315
#define UINT_FMT "%u"

ports/stm32/boards/ARDUINO_NICLA_VISION/mpconfigboard.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
* Copyright (c) 2023 Arduino SA
55
*/
66

7-
#define MICROPY_HW_BOARD_NAME "NICLAVISION"
7+
#define MICROPY_HW_BOARD_NAME "Arduino Nicla Vision"
88
#define MICROPY_HW_MCU_NAME "STM32H747"
9-
#define MICROPY_PY_SYS_PLATFORM "Nicla Vision"
10-
#define MICROPY_HW_FLASH_FS_LABEL "niclavision"
9+
#define MICROPY_HW_FLASH_FS_LABEL "Nicla Vision"
10+
11+
// Network config
12+
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-nicla-vision"
1113

1214
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
1315
#define UINT_FMT "%u"

ports/stm32/boards/ARDUINO_PORTENTA_H7/mpconfigboard.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
* Copyright (c) 2022 Arduino SA
55
*/
66

7-
#define MICROPY_HW_BOARD_NAME "PORTENTA"
7+
#define MICROPY_HW_BOARD_NAME "Arduino Portenta H7"
88
#define MICROPY_HW_MCU_NAME "STM32H747"
9-
#define MICROPY_PY_SYS_PLATFORM "Portenta"
10-
#define MICROPY_HW_FLASH_FS_LABEL "portenta"
9+
#define MICROPY_HW_FLASH_FS_LABEL "Portenta H7"
1110

12-
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "Portenta"
11+
// Network config
12+
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-portenta-h7"
1313

1414
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
1515
#define UINT_FMT "%u"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy