Skip to content

Conversation

@BrentonPoke
Copy link

It seemed that #1148 was being held up due to the original contributor's unfamiliarity with git and lack of support upstream at espressif. But espressif has now added support from their side, so I think this board profile can go in Platformio. I just did the git grunt work but am unsure how to test it as they did with my fork. I'm allowing edits by maintainers in case they want to make any changes in my absence.

Signed-off-by: Brenton Poke <brentonpoke@outlook.com>
@erickweil
Copy link

Will this be accepted and merged soon? While this doesn't happen is there a way to use this fork already by some custom config in platformio?

I Tried every platformio.ini configuration combination possible and still couldn't make this work on a Heltec Wireless Tracker by using the fork, when building all types of errors come up and couldn't solve them.

My platformio.ini:

# https://docs.heltec.org/en/node/esp32/wireless_tracker/index.html
[env:heltec_wireless_tracker]
platform = https://github.com/BrentonPoke/platform-espressif32.git#wireless-tracker	
framework = arduino
board = heltec_wireless_tracker

lib_deps =
	heltecautomation/Heltec ESP32 Dev-Boards@^2.1.5

# Default #defines from arduino IDE, maybe there are more
build_flags = 
	-D ACTIVE_REGION=LORAMAC_REGION_AU915
	-D HELTEC_BOARD=34
	-D SLOW_CLK_TPYE=0
	-D LoRaWAN_DEBUG_LEVEL=0
	-D RADIO_NSS=8

But when I run build in platformio, there is a error on pins_arduino.h

Executando tarefa: platformio run --environment heltec_wireless_tracker 

Processing heltec_wireless_tracker (platform: https://github.com/BrentonPoke/platform-espressif32.git#wireless-tracker; framework: arduino; board: heltec_wireless_tracker)
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/heltec_wireless_tracker.html
PLATFORM: Espressif 32 (6.11.0+sha.64cf6fc) > Heltec Wireless Tracker
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20017.241212+sha.dcc1105b 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
Converting LoRaWANRastreio.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Heltec ESP32 Dev-Boards @ 2.1.5
|-- WebServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- WiFi @ 2.0.0
Building in release mode
Compiling .pio/build/heltec_wireless_tracker/src/GpsModule.cpp.o
Compiling .pio/build/heltec_wireless_tracker/src/LoRaWANRastreio.ino.cpp.o
Compiling .pio/build/heltec_wireless_tracker/src/PositionQueue.cpp.o
Compiling .pio/build/heltec_wireless_tracker/src/WifiService.cpp.o
In file included from /home/erick/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:83,
                 from /home/erick/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:36,
                 from LoRaWANRastreio/GpsModule.h:4,
                 from LoRaWANRastreio/GpsModule.cpp:1:
/home/erick/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:29:10: fatal error: pins_arduino.h: No such file or directory

Then if I provide a variants_dir with pins_arduino.h copyied from https://github.com/espressif/arduino-esp32 This error shows up:

... lots of logs ...
Compiling .pio/build/heltec_wireless_tracker/FrameworkArduino/esp32-hal-touch.c.o
Compiling .pio/build/heltec_wireless_tracker/FrameworkArduino/esp32-hal-uart.c.o
Compiling .pio/build/heltec_wireless_tracker/FrameworkArduino/firmware_msc_fat.c.o
Compiling .pio/build/heltec_wireless_tracker/FrameworkArduino/libb64/cdecode.c.o
Compiling .pio/build/heltec_wireless_tracker/FrameworkArduino/libb64/cencode.c.o
Compiling .pio/build/heltec_wireless_tracker/FrameworkArduino/main.cpp.o
Compiling .pio/build/heltec_wireless_tracker/FrameworkArduino/stdlib_noniso.c.o
Compiling .pio/build/heltec_wireless_tracker/FrameworkArduino/wiring_pulse.c.o
Compiling .pio/build/heltec_wireless_tracker/FrameworkArduino/wiring_shift.c.o
Archiving .pio/build/heltec_wireless_tracker/libFrameworkArduino.a
Indexing .pio/build/heltec_wireless_tracker/libFrameworkArduino.a
Linking .pio/build/heltec_wireless_tracker/firmware.elf
/home/erick/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pio/libdeps/heltec_wireless_tracker/Heltec ESP32 Dev-Boards/src/esp32s3/liblorawan.a(ESP32_Mcu.cpp.o):(.literal._ZN8McuClass5beginEhh+0x1c): undefined reference to `RadioOnDioIrq'
/home/erick/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pio/libdeps/heltec_wireless_tracker/Heltec ESP32 Dev-Boards/src/esp32s3/liblorawan.a(ESP32_Mcu.cpp.o): in function `McuClass::setSPIFrequency(unsigned long)':
C:\Program Files (x86)\Arduino/E:\Documents\Arduino\libraries\Heltec_ESP32\src/ESP32_Mcu.cpp:578: undefined reference to `RadioOnDioIrq'
/home/erick/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pio/build/heltec_wireless_tracker/lib698/libHeltec ESP32 Dev-Boards.a(LoRaWan_APP.cpp.o):(.literal._ZN12LoRaWanClass5sleepE12eDeviceClass+0x0): undefined reference to `Radio'
collect2: error: ld returned 1 exit status
*** [.pio/build/heltec_wireless_tracker/firmware.elf] Error 1

which seems to be a problem with the #define but idk what defines to put and i'm afraid that even if it compiles may give a incorrect configuration for this board.

I really want to use platformio but right now this prevents me from using it to upload to board, while on arduino ide v2 works just fine.

@BrentonPoke
Copy link
Author

I think I'll have some bandwidth to get back to this soon, so I'll start looking into pins_arduino.h and see if there's a pinout that needs to be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants