ES101 - Lesson 1 : Compile & Run

From Embedded Systems Learning Academy
Jump to: navigation, search

Your first lesson is to compile and load a program onto your microcontroller. But before moving on, let's get an understanding of how code should be formatted so it is easy to read:

int main()
{
    /**
     * Variable Names:
     *   - Should be descriptive
     *   - Should not be too long
     */
    int aGoodVarName = 1;
    int aBadVariableName_too_long;
    
    printf("Indent all code after a brace by pressing TAB key\n");

    if(aGoodVarName > 0)
    {
        printf("Another curly brace starts, so \n");
        printf("Indent twice by pressing TAB key twice");
    }
    return -1;
}


Now that you know a little bit about coding standards, follow the link below to complete your assignment by compiling and loading your first program:
Development Package Tutorial