Hi Wiktor,

> I really like the idea and I'm impressed by really nice architecture, but 
> have questions about performance and memory/flash usage? Has anybody made any 
> benchmarks and comparisons of memory usage?

No, we haven’t don any large scale empirical studies comparing xpcc with other 
frameworks.
However, it is designed to also work on ATtiny's and therefore a lot of work 
has been put into making it really resource friendly.
(It’s definitely faster and smaller than Arduino, but their goal isn’t 
performance).

If you want to convince yourself, you can compile all examples and xpcc will 
output the Flash (=Program) and static RAM (=Data) usage.

Here for the AVR Gpio basic example [1]:

        Memory Usage
        ----------------
        Device: atmega328p

        Program:     152 bytes (0.5% Full)
        (.text + .data + .bootloader)

        Data:          0 bytes (0.0% Full)
        (.data + .bss + .noinit)


As you can see, our GPIO implementation has no static RAM usage whatsoever.
It is also completely inlined and even atomic for the set/reset/read methods.
It probably doesn’t get any faster than literally one instruction.

Similar concepts exist to minimize resource use in many places, but I invite 
you to explore them yourself by compiling the examples that interest you and 
looking at the resource usage.


Cheers,
Niklas

PS:

The STM32F4 Gpio example [2] obviously also has 0.0% RAM usage.

        Memory Usage
        ----------------
        Device: stm32f407vg

        Program:    1152 bytes (0.1% Full)
        (.data + .fastcode + .reset + .text)

        Data:         52 bytes (0.0% Full)
        (.data + .fastcode)

Ok, so its 0.027%, but that’s from the start-up code and not from the GPIO, 
which is still inlined without RAM usage.
However, the resources on the STM32 series are also luxuriously dimensioned 
compared to the AVR ;-)


[1]: 
https://github.com/roboterclubaachen/xpcc/blob/develop/examples/avr/gpio/blinking/main.cpp
[2]: 
https://github.com/roboterclubaachen/xpcc/blob/develop/examples/stm32f4_discovery/blink/main.cpp
_______________________________________________
xpcc-dev mailing list
xpcc-dev@lists.rwth-aachen.de
http://mailman.rwth-aachen.de/mailman/listinfo/xpcc-dev

Reply via email to