Last active
February 4, 2020 14:08
-
-
Save thibthibaut/fe8337e7404ce3acaa29b4028f0b671e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* All code goes to .text (flash) */ | |
/* This goes into .rodata (flash) */ | |
const uint8_t weights[10] = {0xFA, 0xB0, 0x32, 0x1C, 0x12, 0xDA, 0x7B, 0x01, 0x42, 0xCA}; | |
/* This goes into .data (stored in flash and copied to ram at startup) */ | |
float values[3] = {0.15, 0.20, 0.55}; | |
/* This goes to .bss (will be 0-init in ram) */ | |
int buffer[100]; | |
int mutliply_array(int* array, const int nbr_elem, int mut){ | |
int temp_array[100] = {0}; // This goes into stack (ram) | |
int* other_temp_stuff = (int*) malloc(nbr_elem * sizeof(int) ); // this goes into heap (ram) | |
for(int i = 0; i < nbr_elem; i++){ | |
// do stuff | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment