Page 1 of 1

AVR Nil demo takes up almost 6k?

Posted: Fri Jan 13, 2017 7:39 pm
by rongcuid
According to the documents, ChibiOS/Nil should not exceed 1KB at maximum configuration. However, when I try to compile the NIL-ARDUINOUNO demo:

Code: Select all

Size after:
AVR Memory Usage
----------------
Device: atmega328p

Program:    5278 bytes (16.1% Full)
(.text + .data + .bootloader)

Data:        555 bytes (27.1% Full)
(.data + .bss + .noinit)



-------- end --------


This doesn't look quite right, as the bare example alone takes up almost 6k. I tried changing compiler optimization, and it doesn't help a lot here. The make output indicates that the demo is correctly linked to NIL files, so it is not incorrectly linked to RT or something.

Or am I misunderstanding the claim about space? Does HAL take a large chunk of space too?

Re: AVR Nil demo takes up almost 6k?

Posted: Fri Jan 13, 2017 7:59 pm
by rongcuid
OK, after some investigation, it looks like that those 5K are actually taken by HAL. Enabling everything in Nil config simply adds a few hundred B to the final size, so I guess that is it.

Re: AVR Nil demo takes up almost 6k?

Posted: Fri Jan 13, 2017 8:51 pm
by Giovanni
Correct, NIL alone, the RTOS, is very small but HAL size varies depending the enabled drivers.

Giovanni