Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Too large #1

Open
ma78 opened this issue Oct 23, 2014 · 2 comments
Open

Too large #1

ma78 opened this issue Oct 23, 2014 · 2 comments

Comments

@ma78
Copy link

ma78 commented Oct 23, 2014

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.

@johnnyhoffman
Copy link

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.

@ma78
Copy link
Author

ma78 commented Oct 24, 2014

No dice. It is still up above 108K.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants