Errors occurred while compiling

Im using Microchip AVR-IoT WG development board and weather click form MikroElektronika. I get this message while compiling sketch “Firmware Too Large. Unexpected behavior may occur. (51336B/49152B)”. Is anyone have any ideas how to fix it

@DUJE_KOVACEVIC - The memory space available on the AVR is very small. If you remove the temperature and light sensors that are on the AVR board from the project, you should be able to build with the Weather Click.

@svenrichard Thanks for idea I try it but doesn’t work.I don’t think memory is a problem because i get same error for majority of elements.

@DUJE_KOVACEVIC - just to verify - you can compile the demo projects for the AVR kits, correct?
I was able to compile all 3 demo projects, but If I swapped the Weather Click for the Light sensor on the Light Demo, I get the same error as you.
If you can compile the demo projects, the available memory on the AVR just isn’t big enough to use the weather click.

The AVR-IoT has very very little memory onboard, and most of it is used for the WiFi stack. We’ve attempted to remove everything we can to free up as much space as possible for user projects, but it’s still too limited for many elements to function properly. I would recommend one of these two options:

1.) Snag a PIC IoT and use that instead. It’s got much more memory.
2.) Use raw I2C commands (see the developer hub for the API) to talk to the Weather Click. Looking at the source for that click, it’s using floating point math, which may be causing the memory usage to balloon. We use an open source driver for the BME280, and its got quite a bit of code, so there may be a way to get a minimal configuration going that will fit. I’ll take a look at this.

With the AVR IoT, it will also help to do as much logic as you can in the cloud. Get as much execution as possible off the embedded device.