Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix platform version #460

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

shin10
Copy link

@shin10 shin10 commented Jun 26, 2022

added multigeiger.ino.cpp to .gitignore
set platform to ^3.5.0 in platformio-example.ini

ignore multigeiger.ino.cpp
set platform to ^3.5.0
@ThomasWaldmann
Copy link
Contributor

please explain in the commit comments WHY the changes are needed.

@shin10
Copy link
Author

shin10 commented Jun 26, 2022

Using the PlatformIO example as is will currently use platform [email protected] and install breaking sub dependencies:

Dependency Graph
|-- U8g2 @ 2.33.7
|   |-- SPI @ 2.0.0
|   |-- Wire @ 2.0.0
|-- Adafruit BME680 Library @ 2.0.2
|   |-- Adafruit BusIO @ 1.11.6
|   |   |-- Wire @ 2.0.0
|   |   |-- SPI @ 2.0.0
|   |-- Wire @ 2.0.0
|   |-- SPI @ 2.0.0
|   |-- Adafruit Unified Sensor @ 1.1.5
|-- Adafruit BME280 Library @ 2.2.2
|   |-- Adafruit BusIO @ 1.11.6
|   |   |-- Wire @ 2.0.0
|   |   |-- SPI @ 2.0.0
|   |-- Wire @ 2.0.0
|   |-- SPI @ 2.0.0
|   |-- Adafruit Unified Sensor @ 1.1.5
|-- Adafruit Unified Sensor @ 1.1.5
|-- IotWebConf @ 3.2.1
|   |-- DNSServer @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|   |-- WebServer @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|   |   |-- FS @ 2.0.0
|   |-- WiFi @ 2.0.0
|   |-- EEPROM @ 2.0.0
|   |-- ESPmDNS @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|   |-- Update @ 2.0.0
|-- MCCI LoRaWAN LMIC library @ 4.1.1
|   |-- SPI @ 2.0.0
|-- NimBLE-Arduino @ 1.3.8
|-- SPI @ 2.0.0
|-- HTTPClient @ 2.0.0
|   |-- WiFi @ 2.0.0
|   |-- WiFiClientSecure @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|-- WiFiClientSecure @ 2.0.0
|   |-- WiFi @ 2.0.0

instead of the required v1.0 ones I got from @rexfue:

Dependency Graph
|-- U8g2 @ 2.28.8
|   |-- SPI @ 1.0
|   |-- Wire @ 1.0.1
|-- Adafruit BME680 Library @ 2.0.1
|   |-- Adafruit BusIO @ 1.9.3
|   |   |-- Wire @ 1.0.1
|   |   |-- SPI @ 1.0
|   |-- Wire @ 1.0.1
|   |-- SPI @ 1.0
|   |-- Adafruit Unified Sensor @ 1.1.4
|-- Adafruit BME280 Library @ 2.2.1
|   |-- Adafruit BusIO @ 1.9.3
|   |   |-- Wire @ 1.0.1
|   |   |-- SPI @ 1.0
|   |-- Wire @ 1.0.1
|   |-- SPI @ 1.0
|   |-- Adafruit Unified Sensor @ 1.1.4
|-- Adafruit Unified Sensor @ 1.1.4
|-- IotWebConf @ 3.2.0
|   |-- DNSServer @ 1.1.0
|   |   |-- WiFi @ 1.0
|   |-- ArduinoJson @ 6.18.5
|   |-- WebServer @ 1.0
|   |   |-- WiFi @ 1.0
|   |   |-- FS @ 1.0
|   |-- WiFi @ 1.0
|   |-- EEPROM @ 1.0.3
|   |-- ESPmDNS @ 1.0
|   |   |-- WiFi @ 1.0
|   |-- Update @ 1.0
|-- MCCI LoRaWAN LMIC library @ 4.1.0
|   |-- SPI @ 1.0
|-- NimBLE-Arduino @ 1.3.8
|-- SPI @ 1.0
|-- HTTPClient @ 1.2
|   |-- WiFi @ 1.0
|   |-- WiFiClientSecure @ 1.0
|   |   |-- WiFi @ 1.0
|-- WiFiClientSecure @ 1.0
|   |-- WiFi @ 1.0

@ThomasWaldmann
Copy link
Contributor

it is still not clear to me what precisely the problem is. and aren't the library requirement defined by lib_deps?

@shin10
Copy link
Author

shin10 commented Jun 26, 2022

Nope, the sub dependencies SPI, Wire, WiFi, WiFiClientSecure, HTTPClient, DNSServer are included in the espressif32 platform and can't be handled with lib_deps.

Building with platform espressif32@^4.0.0 and later will result in an error.

Building in release mode
Compiling .pio\build\geiger\src\multigeiger.ino.cpp.o
Linking .pio\build\geiger\firmware.elf
c:/users/${USER}/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/${USER}/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/lib\libpp.a(hal_mac.o): in function `hal_init':
(.text.hal_init+0xb4): multiple definition of `hal_init'; .pio/build/geiger/libfd7/libMCCI LoRaWAN LMIC library.a(hal.cpp.o):C:\Users\${USER}\Desktop\MultiGeiger/.pio/libdeps/geiger/MCCI LoRaWAN LMIC library/src/hal/hal.cpp:416: first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\geiger\firmware.elf] Error 1
======================================================================= [FAILED] Took 34.40 seconds =======================================================================
The terminal process "C:\Users\${USER}\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.

@pbriesch
Copy link

Please merge!

@ThomasWaldmann
Copy link
Contributor

@shin10 "please explain in the commit comments WHY the changes are needed."

You added some comments on github (above), but it would be better to have this in the git commit comments.

So, can you please improve them (and c&p the explanation there)?

Also, it is still unclear why the .gitignore change is needed, add an explanation to that commit, too, please.

You can use git rebase -i master and then "r" to reword the commit comments.

@pbriesch
Copy link

@ThomasWaldmann

Without this change the ESP32 is in a boot loop:

Rebooting...
GEIGER: 1970-01-01T00:03:24 Logging initialized at level 1.
GEIGER: 1970-01-01T00:03:24 BME_Status: not found
Config version: 015
Config size: 319
Loading configurations
[iwcAll]
|-- [iwcSys]
|   |-- 'iwcThingName' with value: 'multigeiger'
|   |-- 'iwcApPassword' with value: <hidden>
|   |-- [iwcWifi0]
|   |   |-- 'iwcWifiSsid' with value: 'Olunia'
|   |   \-- 'iwcWifiPassword' with value: <hidden>
|   \-- 'iwcApTimeout' with value: '30'
|-- [iwcCustom]
|   |-- [misc]
|   |   |-- 'startSound' with value: 'selected'
|   |   |-- 'speakerTick' with value: 'selected'
|   |   |-- 'ledTick' with value: 'selected'
|   |   \-- 'showDisplay' with value: 'selected'
|   |-- [transmission]
|   |   |-- 'send2Community' with value: ''
|   |   |-- 'send2Madavi' with value: ''
|   |   \-- 'send2ble' with value: 'selected'
|   |-- [lora]
|   |   |-- 'send2lora' with value: 'selected'
|   |   |-- 'deveui' with value: '70B3D57ED005D75D'
|   |   |-- 'appeui' with value: '0000000000000000'
|   |   \-- 'appkey' with value: '51BCB9720CB4BB134CB507C07C5A3E0B'
|   \-- [alarm]
|       |-- 'soundLocalAlarm' with value: 'selected'
|       |-- 'localAlarmThreshold' with value: '0.50'
|       \-- 'localAlarmFactor' with value: '3'
\-- [hidden]
GEIGER: 1970-01-01T00:03:24 BLE service advertising started, device name: ESP32-9948592, MAC: 3c:71:bf:97:cd:b2
GEIGER: 1970-01-01T00:03:24 ------------------------------------------------------------------------------------------------------------------------
GEIGER: 1970-01-01T00:03:24 Simple Multi-Geiger, Version V1.17.0-dev
GEIGER: 1970-01-01T00:03:24 ------------------------------------------------------------------------------------------------------------------------
[  1114][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
E (1091) gpio: gpio_set_level(226): GPIO output gpio_num error
State changing from: 0 to 2
Setting up AP: multigeiger
Use password: <hidden>
AP IP address: 192.168.4.1
AP timeout (ms): 30000
State changed from: 0 to 2
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x40085884  PS      : 0x00050031  A0      : 0x8008167e  A1      : 0x3ffc0f4c  
A2      : 0x00002000  A3      : 0x0001a000  A4      : 0x000637ff  A5      : 0x3ffc0f2c  
A6      : 0x00000008  A7      : 0x3ffbf5a4  A8      : 0x00000000  A9      : 0x00000000  
A10     : 0x000003e8  A11     : 0x00000001  A12     : 0x80082261  A13     : 0x3ffc0f0c  
A14     : 0x3ffc99b8  A15     : 0xfffffbff  SAR     : 0x00000004  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x8008168a  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  


Backtrace: 0x40085881:0x3ffc0f4c |<-CORRUPTED




ELF file SHA256: 6a6740224cafb044

Rebooting...
GEIGER: 1970-01-01T00:03:26 Logging initialized at level 1.
GEIGER: 1970-01-01T00:03:26 BME_Status: not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants