nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.64k stars 3.12k forks source link

Request to enlarge maximum number of modules when using the cloud build service #3472

Closed albert607 closed 2 years ago

albert607 commented 2 years ago

Since LFS is introduced I happily am using a number of NodeMCU devices for a lot of IOT applications. Unfortnaltely the cloud build service only allows up to 10 modules to be selected for an image.

It would be nice to enlarge this (if possible) to 20. This as nowadays, using LFS, the number of modules in an image is not directly affecting the RAM space. This way I could prepare a generic firmware image for use in different IOT application configurations

marcelstoer commented 2 years ago

Note that the cloud builder is not an offering of the NodeMCU project team. I am personally responsible for all its shortcomings 😉

That being said, the current limit is 20 even though that is not exact science. Depending of the size of the actually selected modules you may theoretically be able to squeeze in even more.

albert607 commented 2 years ago

Thanks for the answer. You are right that the max actually is 20 I could select for my selection of modules (I was wrong in my inital request). But having more than 20 (e.g.25) did never work for me unfortunately. I get a http error message immediately after pressing 'Start your build'.

marcelstoer commented 2 years ago

having more than 20 (e.g.25) did never work for me

Yes, the limit is 20 as explained.

albert607 commented 2 years ago

Yes I understand. Thank you. So my rephrased request would be: Is it possible to change the limit of modules you can select to 30?

marcelstoer commented 2 years ago

Is it possible to change the limit of modules you can select to 30?

You cannot fit that many modules into a firmware binary - with or without LFS. I invite you to experiment yourself using Linux or my Docker image. The error you will get is section `.text' will not fit in region `iram1_0_seg'

A real-life (failure) example from my cloud builder logs is this list of modules: enduser_setup,file,gdbstub,gpio,gpio_pulse,hdc1080,hmc5883l,http,hx711,i2c,l3g4200d,mcp4725,mdns,mqtt,net,node,ow,pcm. If I counted correctly there are 18 modules but combined they require more memory than available.

albert607 commented 2 years ago

Thanks for the additional information. I was not aware of the technical restrictions (besides the hard limit of 20) which also can appear. I am able to build my own images but like the almost effortless (for me) cloud build environment a lot. This way I always have a release or latest development built image.

albert607 commented 2 years ago

For some background info. Currently my default firmware consists of the following 20 modules: adc, bme280_math, cron, dht, file, gpio, http, i2c, mqtt, net, node, rtctime, sjson, sntp, somfy, spi, tmr, uart, wifi, tls.

With this image on a WeMos D1 device I do monitor 24/7 my solar panels energy consumption (Uart) and operate the somfy sunscreen (based on solar energy value) and rain/wind predictions from a weather channel (http). Also when the room temperature is too high (SPI/I2c) this will operate the sunscreen. Also with a simple HTTP webserver on the device I have some buttons to operate the sunscreen manually. Data is also send to a Domoticz server in the end :-) So this system is rather sophisticated and probably overkill for such devices, but it works fine.