Page 1 of 1

Custom.h include problem

Posted: 07 Feb 2023, 02:38
by mackowiakp
I am trying to compile FW for SonOff based on 8285/1M with own set of sensors/defaults.
Environment of compilation - Linux Mageia 8, Code + Platformio. All up-to-date.
In ESPEasy-mega-20221224, I don't see any option to select 8285 processor in Platformio. There is only ready FW binary for 8185.
Perhaps I am doing something wrong - please advise.
So I try with ESPEasy_ESP82xx_mega-20211224. It compiles but doesn't take into account my Custom.h file.
I've been using this file for 3 years and it's always been OK.
Does not help Platfornio console command -> export PLATFORMIO_BUILD_FLAGS="'-DUSE_CUSTOM_H'"
I would like some advice on what I am doing wrong.

Re: Custom.h include problem

Posted: 07 Feb 2023, 07:33
by Ath
Form VSCode you can select one of the Custom environments (probably custom_ESP8266_1M) to build that set. As described in the Developers guide
For running on an ESP8285 you can use the ESP8266 build, it will auto-detect it is running on an ESP8285, and act accordingly.

Re: Custom.h include problem

Posted: 07 Feb 2023, 08:47
by bidrohini
Does ESPEasy-mega-20221224 really support ESP8285? I am not sure.

Re: Custom.h include problem

Posted: 07 Feb 2023, 09:02
by Ath
bidrohini wrote: 07 Feb 2023, 08:47 Does ESPEasy-mega-20221224 really support ESP8285? I am not sure.
Yes, it does.

Edit:
From the README.md

Re: Custom.h include problem

Posted: 07 Feb 2023, 10:29
by TD-er
As long as you take a PlatformIO env for 1M ESP8266, then it should work.

Re: Custom.h include problem

Posted: 08 Feb 2023, 01:01
by mackowiakp
THX for answers. Will try when will be back home weekend.
I will forward the results

Re: Custom.h include problem

Posted: 09 Feb 2023, 08:31
by mackowiakp
TD-er wrote: 07 Feb 2023, 10:29 As long as you take a PlatformIO env for 1M ESP8266, then it should work.
OK, I checked. Build ESP_Easy_mega_20230207_custom_ESP8266_1M works correctly on ESP8285.

Re: Custom.h include problem

Posted: 09 Feb 2023, 08:36
by Ath
Thanks for the feedback :)

Re: Custom.h include problem

Posted: 09 Feb 2023, 08:44
by TD-er
Just curious, as there do exist 2M ESP8285 modules...
Is this a rather new unit? And if so, can you check the sysinfo page to see what (real) flash size is detected?
Also, does it properly report an ESP8285?

Re: Custom.h include problem

Posted: 09 Feb 2023, 09:00
by mackowiakp
Is this a new module - I don't know. I just bought the SonOff Dual that was in the store.
Below is a copy/paste of the entire "Main" menu.
As you can see the processor is detected correctly.

Code: Select all

Unit Number:	0
Local Time:	2023-02-09 08:55:05
Time Source:	NTP
Time Wander:	-7.0 [ppm]
Uptime:	0 days 2 hours 24 minutes
Load:	6.00% (LC=10248)
CPU Eco Mode:	false
Boot:	Cold Boot (0)
Reset Reason:	Power On
Last Action before Reboot:	Background Task
SW WD count:	0
Memory
Free RAM:	19664
Free Stack:	3760
Network
IP Config:	Static
IP / Subnet:	192.168.0.17 / 255.255.255.0
Gateway:	192.168.0.1
Client IP:	192.168.0.2
DNS:	192.168.0.201 / (IP unset)
Allowed IP Range:	192.168.0.0 - 192.168.0.255
Connected:	44 m 16 s
Number Reconnects:	2
WiFi ?
WiFi Connection:	802.11g (RSSI -62 dBm)
SSID:	MyWiFi (54:A0:50:CC:BF:02)
Channel:	8
Encryption Type:	WPA/WPA2/PSK
Last Disconnect Reason:	(8)
Configured SSID1:	MyWiFi
Configured SSID2:	Test-WiFi
STA MAC:	70:03:9F:5C:1F:41
AP MAC:	72:03:9F:5C:1F:41
WiFi Settings
Force WiFi B/G:	false
Restart WiFi Lost Conn:	true
Force WiFi No Sleep:	true
Periodical send Gratuitous ARP:	true
Connection Failure Threshold:	0
Max WiFi TX Power:	17.50
Current WiFi TX Power:	9.00
WiFi Sensitivity Margin:	3
Send With Max TX Power:	false
Extra WiFi scan loops:	0
Use Last Connected AP from RTC:	false
Firmware
Build:⋄	20230207 - Mega
System Libraries:⋄	ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
Git Build:⋄	Test-5: Feb 7 2023 08:37:44
Plugin Count:⋄	33 [No Debug Log]
Build Origin:	Self built
Build Time:⋄	Feb 7 2023 08:37:41
Binary Filename:⋄	ESP_Easy_mega_20230207_custom_ESP8266_1M
Build Platform:⋄	Linux-5.15.88-desktop-1.mga8-x86_64-with-glibc2.2.5
Git HEAD:⋄	pygit2_not_installed
System Status
Syslog Log Level:	None
Serial Log Level:	None
Web Log Level:	None
I2C Bus State:	OK
I2C bus cleared count:	0
Network Services
Network Connected:	✔
NTP Initialized:	✔
ESP Board
ESP Chip ID:	6037313 (0x5C1F41)
ESP Chip Frequency:	80 MHz
ESP Chip Model:	ESP8285
ESP Chip Cores:	1
ESP Board Name:	Espressif Generic ESP8266 ESPEasy 1M Flash 128k FS
Storage
Flash Chip ID:	Vendor: 0x51 Device: 0x4014
Flash Chip Real Size:	1024 kB
Flash IDE Size:	1024 kB
Flash Chip Speed:	40 MHz
Flash IDE Speed:	40 MHz
Flash IDE Mode:	DOUT
Flash Writes:	0 daily / 0 boot
Sketch Size:	770 kB (104 kB free)
Max. OTA Sketch Size:	599 kB (614384 bytes)
OTA possible:	false
OTA 2-step Needed:	true
SPIFFS Size:	110 kB (54 kB free)

Re: Custom.h include problem

Posted: 09 Feb 2023, 09:18
by TD-er
Thanks.
Is indeed reporting it as an ESP8285 and 1M flash.

I was just wondering whether those 2M ESP8285 actually do exist in the wild, as I only "know" about their existence from the Espressif datasheets.

Re: Custom.h include problem

Posted: 09 Feb 2023, 10:03
by Micha_he
I've some in my Athom PG01V2:

ESP Board

ESP Chip ID: 15811792 (0xF144D0)
ESP Chip Frequency: 80 MHz
ESP Chip Model: ESP8285
ESP Chip Cores: 1
ESP Board Name: Espressif Generic ESP8266 ESPEasy 2M Flash 256k FS

Storage

Flash Chip ID: Vendor: 0xA1 Device: 0x4015
Flash Chip Real Size: 2048 kB
Flash IDE Size: 2048 kB
Flash Chip Speed: 40 MHz
Flash IDE Speed: 40 MHz
Flash IDE Mode: DOUT
Flash Writes: 4 daily / 4 boot
Sketch Size: 715 kB (1076 kB free)
Max. OTA Sketch Size: 1019 kB (1044464 bytes)
OTA possible: true
OTA 2-step Needed: false
SPIFFS Size: 209 kB (126 kB free)
Page size: 256
Block size: 4096
Number of blocks: 52
Maximum open files: 5
Maximum path length: 32

Re: Custom.h include problem

Posted: 09 Feb 2023, 10:39
by TD-er
Ah, good to know they really do exist :)