Custom.h include problem

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Custom.h include problem

#1 Post by mackowiakp » 07 Feb 2023, 02:38

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.

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Custom.h include problem

#2 Post by Ath » 07 Feb 2023, 07:33

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.
/Ton (PayPal.me)

bidrohini
Normal user
Posts: 101
Joined: 03 Nov 2022, 16:24

Re: Custom.h include problem

#3 Post by bidrohini » 07 Feb 2023, 08:47

Does ESPEasy-mega-20221224 really support ESP8285? I am not sure.

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Custom.h include problem

#4 Post by Ath » 07 Feb 2023, 09:02

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
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Custom.h include problem

#5 Post by TD-er » 07 Feb 2023, 10:29

As long as you take a PlatformIO env for 1M ESP8266, then it should work.

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Custom.h include problem

#6 Post by mackowiakp » 08 Feb 2023, 01:01

THX for answers. Will try when will be back home weekend.
I will forward the results

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Custom.h include problem

#7 Post by mackowiakp » 09 Feb 2023, 08:31

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.

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Custom.h include problem

#8 Post by Ath » 09 Feb 2023, 08:36

Thanks for the feedback :)
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Custom.h include problem

#9 Post by TD-er » 09 Feb 2023, 08:44

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?

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Custom.h include problem

#10 Post by mackowiakp » 09 Feb 2023, 09:00

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)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Custom.h include problem

#11 Post by TD-er » 09 Feb 2023, 09:18

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.

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Custom.h include problem

#12 Post by Micha_he » 09 Feb 2023, 10:03

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

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Custom.h include problem

#13 Post by TD-er » 09 Feb 2023, 10:39

Ah, good to know they really do exist :)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 29 guests