Warning: Could not find remote branch feature/stage to clone

Hi.
Terminal output when i hit the “upload”:
> Executing task: platformio run --target upload <

Processing esp32dev (platform: https://github.com/platformio/platform-espressif32.git#feature/stage; board: esp32dev; framework: arduino)
---------------------------------------------------------------------------------------------------------------------
Platform Manager: Installing git+https://github.com/platformio/platform-espressif32.git#feature/stage
git version 2.25.1
Cloning into '/~/.platformio/.cache/tmp/pkg-installing-_ptimlz7'...
warning: Could not find remote branch feature/stage to clone.
fatal: Remote branch feature/stage not found in upstream origin
Error: VCS: Could not process command ['git', 'clone', '--recursive', '--depth', '1', '--branch', 'feature/stage', 'https://github.com/platformio/platform-espressif32.git', '/~/.platformio/.cache/tmp/pkg-installing-_ptimlz7']
The terminal process "platformio 'run', '--target', 'upload'" terminated with exit code: 1.

USER path now replaced with “~”.
I’m a N00B to PlatformIO.
Using Ubuntu 20.04 with Visual Studio Code 1.50.1

Trying to update my “freematics ONE+(Espressif ESP32 main controller)” with an updated config.

I’m using this guide, but now with VSCode, tried first with Atom with same result, “Freematics Blog – Vehicle tracking system on a Linux box with Freematics Hub and Freematics ONE+

edit:
Oh, and the ~/.platformio folder seems to be missing, not sure if i should have manually created it?

You have written

platform = https://github.com/platformio/platform-espressif32.git#feature/stage

in the platformio.ini but the branch feature/stage you reference does not exist. What are you trying to do? Sure that standard platform = espressif32 isn’t what you want?

Thank you for your reply.
What i want is to change the config.h file of the Freematics ONE+, and to be safe, i wanted to do it “by the book”. More specific, i need to change the WIFI_SSID, WIFI_PASSWORD and SERVER_HOST.
The code on the Freematics is:
https://github.com/stanleyhuangyc/Freematics.git
So i have cloned that one, and edited the config.h.
Then i try to upload, and get the output in my first post.

So i don’t think i want the standard platform, tho i’m not sure :smiley:

Can you post your full platformio.ini?

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html

[env:esp32dev]
;platform=espressif32
platform=https://github.com/platformio/platform-espressif32.git#feature/stage
build_flags = -DBOARD_HAS_PSRAM
board=esp32dev
framework=arduino
monitor_speed=115200
lib_extra_dirs = ../../libraries

[platformio]
src_dir=.

Pleas uncomment the first and comment the second line.

Okay, usually the src_dir is src/, but you remap it to the root of the project… Can you show project file structure, or better, the complete project in a github repo or something? This might be a problem because then stuff like lib/ is also suddendly in the src_dir.

1 Like

Thank you again :slight_smile:
Clean clone of:

GitHub - stanleyhuangyc/Freematics: Official source code repository for Freematics

If that gives you enough info on filestructure?

changed:

[env:esp32dev]
platform=espressif32
;platform=GitHub - platformio/platform-espressif32: Espressif 32: development platform for PlatformIO
build_flags = -DBOARD_HAS_PSRAM
board=esp32dev
framework=arduino
monitor_speed=115200
lib_extra_dirs = …/…/libraries

[platformio]
src_dir=“~”/Ymse/Freematics/firmware_v5/teleloggerged:

Then end up here(after some fidling):

Looking for upload port…
Error: Please specify upload_port for environment or use global --upload-port option.
For some development platforms it can be a USB flash drive (i.e. /media//)
*** [upload] Explicit exit, status 1

And cant find the file where i should edit that one…

edit:
Also under the “Problems” tab in VSCode:
Cannot find “‘~’/Ymse/Freematics/firmware_v5/telelogger/include”.

Ah okay I get the full picture now. You cloned the repo (which contains a bazillion sketches), and you want to upload the firmware_v5/telelogger sketch.

The way I do it:

  • git clone https://github.com/stanleyhuangyc/Freematics.git
  • cd Freematics.git
  • cd firmware_v5/telelogger
  • nano platformio.ini
  • uncomment platform = espressif32 line, comment line below that, save and exit
  • pio run

And I get

RAM:   [=         ]   5.2% (used 17052 bytes from 327680 bytes)
Flash: [===       ]  30.5% (used 400382 bytes from 1310720 bytes)
esptool.py v2.6
========================= [SUCCESS] Took 34.97 seconds =========================

So compilation works and the src_dir directive is also okay.

If you get to this message then the compilation was successful but PIO could not find a COM port on which your ESP32 board is connected. Is it there?

Yeah all seems to compile fine now, after your feedback.
the board is connected, but i’m strugling to verify what port.
VS only finds one device, at /dev/ttyS0 ‘ttyS0’

and after:

sudo usermod -a -G dialout $USER
sudo usermod -a -G plugdev $USER

I can start monitoring on ttyS0:

— Available ports:
— 1: /dev/ttyS0 ‘ttyS0’
— Enter port index or full name: 1
— Miniterm on /dev/ttyS0 115200,8,N,1 —
— Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —

ctrl+c works, the others give no change. So it might not be the board im monitoring…

edit:
i can still “monitor” ttyS0 after i unplug it. And dmesg gives no new output when plugging/unplugging the board…

This is usually a hardware COM port on your motherboard. ESP8266’s with USB-to-serial converter chips (such as FTDIs, CH340G, …) should show up as /dev/ttyACM0 or /dev/ttyUSB0.

Then your board is dead. What exact board do you have? Pictures, link? Does the board at least have a power LED that lights up? Are you working in a VM and forgot to pass through the device?

Thank you very much!!! Now i got it to upload to the board! :smiley:
I’m using this board:

Espressif ESP32 main controller
Built-in 802.11 b/g/n HT40 Wi-Fi transceiver
Built-in dual mode Bluetooth (classic and BLE)
STM32 protocol co-processor
ICM20948 motion sensor (9-DOF)
M8030 10Hz GNSS (external receiver)
xBee seat for 3G/4G cellular modules
Enclosure dimensions: 60x48x20mm
Typical power rating @80Mhz: 20mA (WIFI inactive) / 50mA (WiFi active) / 180mA (cellular active)

Physical Interfaces

OBD-II male connector
microUSB port
microSD card slot
I/O socket (Molex)
xBee socket (onboard)

https://freematics.com/pages/products/freematics-one-plus/

And it has a indicator led, wich was first blinking, then on. So i was wondering if it had enough power, plugged it in the OBD port of my car(12v), and my laptop. But still no dice. Was using a new usb cable, also used for my phone. Just to rule out the cable, i got an old one in my car(well used with tape on). And suddenly it popped up in dmesg! Holy macaroni, i just needed to use an old usb cable… :smiley:

So now it updated fine, and i just need to get the config for wifi and carstat server correct.

Thanks again, really good help!!

Thanks for this discussion! Along with:

it helped me work out the # syntax for branches. comment#8 here seems a bit harder than using my published branch to the fork I made of

lib_deps =
    fastled/FastLED
    Wire
    adafruit/Adafruit BusIO
    adafruit/Adafruit GFX Library
    ;https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA.git
    https://github.com/jdeltoft/ESP32-HUB75-MatrixPanel-DMA#fix_offset_for_chain_top_right_down