amazon-archives / aws-sdk-arduino

An experimental SDK for working with AWS Services on Arduino-compatible devices. Currently has support for DynamoDB and Kinesis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Too large

ma78 opened this issue · comments

commented

Hi, i'm finding when i compile the dynamo put .ino with all of the cpp/h files from the src directory (including added keys.h and keys.cpp files) the resulting binary is 109k. This is too big to fit on the spark core. What have I missed? The dynamo get sample app compiles down to small enough.

I've come to realize that the flash size for Spark Cores range from barely enough memory to fit that sample, to barely not enough. There is a small amount of code in src/AWSClient.ccp/.h that is currently unused and can be removed to make a small dent in the program size: AWSClient::headersToCurlRequest() and AWSClient::createCurlRequest(), as well as the spots where createCurlRequest is called by the methods in AmazonDynamoDBClient, i.e change all occurance of

    if (httpClient->usesCurl()) {
        request = createCurlRequest(payload);
    } else {
        request = createRequest(payload);
    }

to

    request = createRequest(payload); 

Those changes might reduce the size enough for the program to flash, else it might be necessary to start removing functionality.

commented

No dice. It is still up above 108K.