aws-sdk-arduino icon indicating copy to clipboard operation
aws-sdk-arduino copied to clipboard

Too large

Open ma78 opened this issue 10 years ago • 2 comments

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.

ma78 avatar Oct 23 '14 11:10 ma78

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.

johnnyhoffman avatar Oct 23 '14 21:10 johnnyhoffman

No dice. It is still up above 108K.

ma78 avatar Oct 24 '14 11:10 ma78