Quicker compile and load for small programs?

RichardDL
Posts: 2
Joined: Thu Aug 10, 2023 8:41 pm

Quicker compile and load for small programs?

Postby RichardDL » Thu Aug 10, 2023 8:59 pm

I'm using a NodeMCU 0.9 (ESP-12 Module) and the Arduino IDE. A minimal program with only empty functions setup(){} and loop(){} takes 51 seconds to compile (and load), and it's quite big.

Code: Select all

IROM   : 228400          - code in flash         (default or ICACHE_FLASH_ATTR) 
IRAM   : 26352   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...) 
DATA   : 1248  )         - initialized variables (global, static) in RAM/HEAP 
RODATA : 688   ) / 81920 - constants             (global, static) in RAM/HEAP 
BSS    : 24840 )         - zeroed variables      (global, static) in RAM/HEAP 

Sketch uses 256688 bytes (24%) of program storage space. Maximum is 1044464 bytes.
Global variables use 26776 bytes (32%) of dynamic memory, leaving 55144 bytes for local variables. Maximum is 81920 bytes.

I quite often want to test the hardware I.O. e.g. starting with a simple blink program. Is it possible to reduce things and get a faster load? I suspect all the WiFi support is still included, and I don't need it for this.

username
Posts: 536
Joined: Thu May 03, 2018 1:18 pm

Re: Quicker compile and load for small programs?

Postby username » Mon Aug 14, 2023 11:47 am

228k is nothing for a 8MB part. You have to keep in mind this is not an Atmega, but uses an RTOS and has some overhead.
Also Arduino also adds more overhead as well. If you really want to shrink things down, use IDF.

RichardDL
Posts: 2
Joined: Thu Aug 10, 2023 8:41 pm

Re: Quicker compile and load for small programs?

Postby RichardDL » Sun Sep 03, 2023 3:24 pm

Thank you for your comment. Sorry about delayed reply. I've had a quick look at IDF, agree, must try that sometime.

Who is online

Users browsing this forum: No registered users and 14 guests