From cd4fc45b62af45544e218ef22114c510b4ade721 Mon Sep 17 00:00:00 2001 From: renebohne Date: Fri, 4 Mar 2022 15:39:58 +0100 Subject: [PATCH 1/6] added Roboheart Hercules pin definitions and board.txt entries --- boards.txt | 128 +++++++++++++++++++++ variants/roboheart_hercules/pins_arduino.h | 55 +++++++++ 2 files changed, 183 insertions(+) create mode 100644 variants/roboheart_hercules/pins_arduino.h diff --git a/boards.txt b/boards.txt index 06a48db0ff8..b363360e156 100755 --- a/boards.txt +++ b/boards.txt @@ -11884,4 +11884,132 @@ deneyapkart1A.menu.DebugLevel.debug.build.code_debug=4 deneyapkart1A.menu.DebugLevel.verbose=Verbose deneyapkart1A.menu.DebugLevel.verbose.build.code_debug=5 +############################################################## + + +roboheart_hercules.name=RoboHeart Hercules + +roboheart_hercules.upload.tool=esptool_py +roboheart_hercules.upload.maximum_size=1310720 +roboheart_hercules.upload.maximum_data_size=327680 +roboheart_hercules.upload.wait_for_upload_port=true +roboheart_hercules.upload.flags= +roboheart_hercules.upload.extra_flags= + +roboheart_hercules.serial.disableDTR=true +roboheart_hercules.serial.disableRTS=true + +roboheart_hercules.build.tarch=xtensa +roboheart_hercules.build.bootloader_addr=0x1000 +roboheart_hercules.build.target=esp32 +roboheart_hercules.build.mcu=esp32 +roboheart_hercules.build.core=esp32 +roboheart_hercules.build.variant=deneyapkart1A +roboheart_hercules.build.board=DYDK1A + +roboheart_hercules.build.f_cpu=240000000L +roboheart_hercules.build.flash_size=4MB +roboheart_hercules.build.flash_freq=40m +roboheart_hercules.build.flash_mode=dio +roboheart_hercules.build.boot=dio +roboheart_hercules.build.partitions=default +roboheart_hercules.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw +roboheart_hercules.build.extra_libs= + +roboheart_hercules.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +roboheart_hercules.menu.PartitionScheme.default.build.partitions=default +roboheart_hercules.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +roboheart_hercules.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +roboheart_hercules.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT) +roboheart_hercules.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +roboheart_hercules.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +roboheart_hercules.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +roboheart_hercules.menu.PartitionScheme.minimal.build.partitions=minimal +roboheart_hercules.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +roboheart_hercules.menu.PartitionScheme.no_ota.build.partitions=no_ota +roboheart_hercules.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +roboheart_hercules.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +roboheart_hercules.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +roboheart_hercules.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +roboheart_hercules.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +roboheart_hercules.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +roboheart_hercules.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +roboheart_hercules.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +roboheart_hercules.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +roboheart_hercules.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +roboheart_hercules.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +roboheart_hercules.menu.PartitionScheme.huge_app.build.partitions=huge_app +roboheart_hercules.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +roboheart_hercules.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +roboheart_hercules.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +roboheart_hercules.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 +roboheart_hercules.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) +roboheart_hercules.menu.PartitionScheme.fatflash.build.partitions=ffat +roboheart_hercules.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +roboheart_hercules.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS) +roboheart_hercules.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +roboheart_hercules.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +roboheart_hercules.menu.PartitionScheme.rainmaker=RainMaker +roboheart_hercules.menu.PartitionScheme.rainmaker.build.partitions=rainmaker +roboheart_hercules.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 + +roboheart_hercules.menu.CPUFreq.240=240MHz (WiFi/BT) +roboheart_hercules.menu.CPUFreq.240.build.f_cpu=240000000L +roboheart_hercules.menu.CPUFreq.160=160MHz (WiFi/BT) +roboheart_hercules.menu.CPUFreq.160.build.f_cpu=160000000L +roboheart_hercules.menu.CPUFreq.80=80MHz (WiFi/BT) +roboheart_hercules.menu.CPUFreq.80.build.f_cpu=80000000L +roboheart_hercules.menu.CPUFreq.40=40MHz +roboheart_hercules.menu.CPUFreq.40.build.f_cpu=40000000L +roboheart_hercules.menu.CPUFreq.20=20MHz +roboheart_hercules.menu.CPUFreq.20.build.f_cpu=20000000L +roboheart_hercules.menu.CPUFreq.10=10MHz +roboheart_hercules.menu.CPUFreq.10.build.f_cpu=10000000L + +roboheart_hercules.menu.FlashMode.qio=QIO +roboheart_hercules.menu.FlashMode.qio.build.flash_mode=dio +roboheart_hercules.menu.FlashMode.qio.build.boot=qio +roboheart_hercules.menu.FlashMode.dio=DIO +roboheart_hercules.menu.FlashMode.dio.build.flash_mode=dio +roboheart_hercules.menu.FlashMode.dio.build.boot=dio +roboheart_hercules.menu.FlashMode.qout=QOUT +roboheart_hercules.menu.FlashMode.qout.build.flash_mode=dout +roboheart_hercules.menu.FlashMode.qout.build.boot=qout +roboheart_hercules.menu.FlashMode.dout=DOUT +roboheart_hercules.menu.FlashMode.dout.build.flash_mode=dout +roboheart_hercules.menu.FlashMode.dout.build.boot=dout + +roboheart_hercules.menu.FlashFreq.80=80MHz +roboheart_hercules.menu.FlashFreq.80.build.flash_freq=80m +roboheart_hercules.menu.FlashFreq.40=40MHz +roboheart_hercules.menu.FlashFreq.40.build.flash_freq=40m + +roboheart_hercules.menu.UploadSpeed.921600=921600 +roboheart_hercules.menu.UploadSpeed.921600.upload.speed=921600 +roboheart_hercules.menu.UploadSpeed.115200=115200 +roboheart_hercules.menu.UploadSpeed.115200.upload.speed=115200 +roboheart_hercules.menu.UploadSpeed.256000.windows=256000 +roboheart_hercules.menu.UploadSpeed.256000.upload.speed=256000 +roboheart_hercules.menu.UploadSpeed.230400.windows.upload.speed=256000 +roboheart_hercules.menu.UploadSpeed.230400=230400 +roboheart_hercules.menu.UploadSpeed.230400.upload.speed=230400 +roboheart_hercules.menu.UploadSpeed.460800.linux=460800 +roboheart_hercules.menu.UploadSpeed.460800.macosx=460800 +roboheart_hercules.menu.UploadSpeed.460800.upload.speed=460800 +roboheart_hercules.menu.UploadSpeed.512000.windows=512000 +roboheart_hercules.menu.UploadSpeed.512000.upload.speed=512000 + +roboheart_hercules.menu.DebugLevel.none=None +roboheart_hercules.menu.DebugLevel.none.build.code_debug=0 +roboheart_hercules.menu.DebugLevel.error=Error +roboheart_hercules.menu.DebugLevel.error.build.code_debug=1 +roboheart_hercules.menu.DebugLevel.warn=Warn +roboheart_hercules.menu.DebugLevel.warn.build.code_debug=2 +roboheart_hercules.menu.DebugLevel.info=Info +roboheart_hercules.menu.DebugLevel.info.build.code_debug=3 +roboheart_hercules.menu.DebugLevel.debug=Debug +roboheart_hercules.menu.DebugLevel.debug.build.code_debug=4 +roboheart_hercules.menu.DebugLevel.verbose=Verbose +roboheart_hercules.menu.DebugLevel.verbose.build.code_debug=5 + ############################################################## \ No newline at end of file diff --git a/variants/roboheart_hercules/pins_arduino.h b/variants/roboheart_hercules/pins_arduino.h new file mode 100644 index 00000000000..8b86a0d6fdc --- /dev/null +++ b/variants/roboheart_hercules/pins_arduino.h @@ -0,0 +1,55 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define EXTERNAL_NUM_INTERRUPTS 16 +#define NUM_DIGITAL_PINS 20 +#define NUM_ANALOG_INPUTS 16 + +#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1) +#define digitalPinToInterrupt(p) (((p)<40)?(p):-1) +#define digitalPinHasPWM(p) (p < 34) + +static const uint8_t TX = 1; +static const uint8_t RX = 3; + +static const uint8_t TXD2 = 17; +static const uint8_t RXD2 = 16; + +static const uint8_t SDA = 21; +static const uint8_t SCL = 22; + +static const uint8_t SS = 5; +static const uint8_t MOSI = 23; +static const uint8_t MISO = 19; +static const uint8_t SCK = 18; + +static const uint8_t G23 = 23; +static const uint8_t G19 = 19; +static const uint8_t G18 = 18; +static const uint8_t G3 = 3; +static const uint8_t G16 = 16; +static const uint8_t G21 = 21; +static const uint8_t G2 = 2; +static const uint8_t G12 = 12; +static const uint8_t G15 = 15; +static const uint8_t G35 = 35; +static const uint8_t G36 = 36; +static const uint8_t G25 = 25; +static const uint8_t G26 = 26; +static const uint8_t G1 = 1; +static const uint8_t G17 = 17; +static const uint8_t G22 = 22; +static const uint8_t G5 = 5; +static const uint8_t G13 = 13; +static const uint8_t G0 = 0; +static const uint8_t G34 = 34; + +static const uint8_t DAC1 = 25; +static const uint8_t DAC2 = 26; + +static const uint8_t ADC1 = 35; +static const uint8_t ADC2 = 36; + +#endif /* Pins_Arduino_h */ From 7fea8dda981c8e2c83300f55c5e1b4191cb24a12 Mon Sep 17 00:00:00 2001 From: renebohne Date: Fri, 4 Mar 2022 15:41:45 +0100 Subject: [PATCH 2/6] added package_roboheat.json for prototyping --- package_roboheart.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 package_roboheart.json diff --git a/package_roboheart.json b/package_roboheart.json new file mode 100644 index 00000000000..d1220d8c9ed --- /dev/null +++ b/package_roboheart.json @@ -0,0 +1,16 @@ +{ + "name": "framework-arduinoespressif32", + "version": "0.0.0", + "description": "Arduino Wiring-based Framework for the Espressif ESP32, ESP32-S and ESP32-C series of SoCs", + "keywords": [ + "framework", + "arduino", + "espressif", + "esp32" + ], + "license": "LGPL-2.1-or-later", + "repository": { + "type": "git", + "url": "https://github.com/Augmented-Robotics/arduino-esp32" + } +} From 72ceb920b8cf3a87de228e7d42afa3a83246f8de Mon Sep 17 00:00:00 2001 From: renebohne Date: Thu, 9 Jun 2022 09:46:35 +0200 Subject: [PATCH 3/6] Roboheart Hercules pins --- variants/roboheart_hercules/pins_arduino.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/variants/roboheart_hercules/pins_arduino.h b/variants/roboheart_hercules/pins_arduino.h index 8b86a0d6fdc..f6c94acba8c 100644 --- a/variants/roboheart_hercules/pins_arduino.h +++ b/variants/roboheart_hercules/pins_arduino.h @@ -11,8 +11,8 @@ #define digitalPinToInterrupt(p) (((p)<40)?(p):-1) #define digitalPinHasPWM(p) (p < 34) -static const uint8_t TX = 1; -static const uint8_t RX = 3; +static const uint8_t TX = 35; +static const uint8_t RX = 34; static const uint8_t TXD2 = 17; static const uint8_t RXD2 = 16; From c46ab8c8d6f4746f3580246bf862de3cc2f2af2f Mon Sep 17 00:00:00 2001 From: gayathri Date: Fri, 6 Jan 2023 11:26:15 +0100 Subject: [PATCH 4/6] Updated the pins --- variants/roboheart_hercules/pins_arduino.h | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/variants/roboheart_hercules/pins_arduino.h b/variants/roboheart_hercules/pins_arduino.h index f6c94acba8c..fecef0ca2ed 100644 --- a/variants/roboheart_hercules/pins_arduino.h +++ b/variants/roboheart_hercules/pins_arduino.h @@ -11,6 +11,38 @@ #define digitalPinToInterrupt(p) (((p)<40)?(p):-1) #define digitalPinHasPWM(p) (p < 34) + +// Motor driver pins +#define MOTOR_A_IN1 25 // PHASE/IN1 +#define MOTOR_A_IN2 26 // ENABLE/IN2 + +#define MOTOR_B_IN1 27 // PHASE/IN1 +#define MOTOR_B_IN2 32 // ENABLE/IN2 + +#define MOTOR_C_IN1 33 // PHASE/IN1 +#define MOTOR_C_IN2 4 // ENABLE/IN2 + +#define SLEEP_MOTOR_ABC 2 // nSLEEP + +#define LED_ROBOHEART 14 // Built in LED +#define BUTTON_ROBOHEART 0 // Button + +// I2C IMU sensor +#define IMU_SDA 21 +#define IMU_SCL 22 + +#define RXD1 16 +#define TXD1 17 + +// GSM Vela connector board pins +#define GSM_PWRKEY 12 +#define GSM_DTR 13 +#define GSM_CTS 15 +#define GSM_RTS 14 +#define GSM_TX TXD1 +#define GSM_RX RXD1 +#define BATTERY_PIN 36 // Battery ADC pin + static const uint8_t TX = 35; static const uint8_t RX = 34; From 6c88ab01cca186e873070773c8b9b4f1ff165dfd Mon Sep 17 00:00:00 2001 From: Gaya3N25 <30388176+Gaya3N25@users.noreply.github.com> Date: Mon, 16 Jan 2023 06:50:47 +0100 Subject: [PATCH 5/6] Delete package_roboheart.json --- package_roboheart.json | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 package_roboheart.json diff --git a/package_roboheart.json b/package_roboheart.json deleted file mode 100644 index d1220d8c9ed..00000000000 --- a/package_roboheart.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "framework-arduinoespressif32", - "version": "0.0.0", - "description": "Arduino Wiring-based Framework for the Espressif ESP32, ESP32-S and ESP32-C series of SoCs", - "keywords": [ - "framework", - "arduino", - "espressif", - "esp32" - ], - "license": "LGPL-2.1-or-later", - "repository": { - "type": "git", - "url": "https://github.com/Augmented-Robotics/arduino-esp32" - } -} From 6872218ec3f858365b8cfa35d0f4d86cf1b0868c Mon Sep 17 00:00:00 2001 From: gayathri Date: Fri, 27 Jan 2023 12:38:21 +0100 Subject: [PATCH 6/6] Requested changes --- boards.txt | 11 +++++++---- variants/roboheart_hercules/pins_arduino.h | 21 +++++++++++++++++++-- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/boards.txt b/boards.txt index 0ec8814b13d..19bfff7ba2b 100644 --- a/boards.txt +++ b/boards.txt @@ -20439,8 +20439,6 @@ esp32c3m1IKit.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## - - roboheart_hercules.name=RoboHeart Hercules roboheart_hercules.upload.tool=esptool_py @@ -20458,8 +20456,8 @@ roboheart_hercules.build.bootloader_addr=0x1000 roboheart_hercules.build.target=esp32 roboheart_hercules.build.mcu=esp32 roboheart_hercules.build.core=esp32 -roboheart_hercules.build.variant=deneyapkart1A -roboheart_hercules.build.board=DYDK1A +roboheart_hercules.build.variant=roboheart_hercules +roboheart_hercules.build.board=roboheart_hercules roboheart_hercules.build.f_cpu=240000000L roboheart_hercules.build.flash_size=4MB @@ -20566,4 +20564,9 @@ roboheart_hercules.menu.DebugLevel.debug.build.code_debug=4 roboheart_hercules.menu.DebugLevel.verbose=Verbose roboheart_hercules.menu.DebugLevel.verbose.build.code_debug=5 +roboheart_hercules.menu.EraseFlash.none=Disabled +roboheart_hercules.menu.EraseFlash.none.upload.erase_cmd= +roboheart_hercules.menu.EraseFlash.all=Enabled +roboheart_hercules.menu.EraseFlash.all.upload.erase_cmd=-e + ############################################################## diff --git a/variants/roboheart_hercules/pins_arduino.h b/variants/roboheart_hercules/pins_arduino.h index fecef0ca2ed..17a5951773e 100644 --- a/variants/roboheart_hercules/pins_arduino.h +++ b/variants/roboheart_hercules/pins_arduino.h @@ -25,6 +25,9 @@ #define SLEEP_MOTOR_ABC 2 // nSLEEP #define LED_ROBOHEART 14 // Built in LED +#define BUILTIN_LED LED_ROBOHEART // backward compatibility +#define LED_BUILTIN LED_ROBOHEART + #define BUTTON_ROBOHEART 0 // Button // I2C IMU sensor @@ -81,7 +84,21 @@ static const uint8_t G34 = 34; static const uint8_t DAC1 = 25; static const uint8_t DAC2 = 26; -static const uint8_t ADC1 = 35; -static const uint8_t ADC2 = 36; +static const uint8_t A0 = 36; +static const uint8_t A3 = 39; +static const uint8_t A4 = 32; +static const uint8_t A5 = 33; +static const uint8_t A6 = 34; +static const uint8_t A7 = 35; +static const uint8_t A10 = 4; +static const uint8_t A11 = 0; +static const uint8_t A12 = 2; +static const uint8_t A13 = 15; +static const uint8_t A14 = 13; +static const uint8_t A15 = 12; +static const uint8_t A16 = 14; +static const uint8_t A17 = 27; +static const uint8_t A18 = 25; +static const uint8_t A19 = 26; #endif /* Pins_Arduino_h */