Development Environment Setup

  1. Download the Microsoft Visual Studio 2022 Community installer.

  2. Launch the installer. On the “Workloads” tab, select the “Desktop development for C++” option. On the “Individual Components” tab, select “Windows 10 SDK (10.0.19041.0)” (this should be preselected on Windows 10 systems but must be manually included on Windows 11 systems). Proceed with the installation as configured.

  3. Create a Projects directory in your %USERPROFILE% directory, e.g. C:\Users\<your-user-name> for the Beanable SDK repository.

    Note: The Beanable SDK repository can be downloaded to any directory. These instructions assume the Beanable SDK is downloaded to the %USERPROFILE% directory.

  4. Download the Beanable repository, or use the git command line tool as follows:

    cd %USERPROFILE%\Projects
    git clone https://github.com/Beanable-OpenSource/beanable
    
  5. Open the “Environment Variables” dialog of the Control Panel app by following these instructions. From that dialog:

    • Create a User Variable called BEANABLE and set it to point at your local Beanable SDK repository directory. Update the path as necessary for you system by navigating to the Beanable SDK folder using the “Browse Directory…” button.

    • Variable Name: BEANABLE

    • Variable Value: %USERPROFILE%\Projects\beanable

  • Edit the User Variable

    Path
    

    to include the Beanable SDK tools directory. Update the path as necessary for your system by navigating to the correct folder using the “Browse…” button.

    • Variable Name: Path

    • Variable Value (add to the existing list): %USERPROFILE%\Projects\beanable\build\bin\win\release

    Note: The %USERPROFILE%\Projects\beanable\build\bin\win\release directory will be created in the next step. It is safe to set the environment variable now or to come back after Step 6 to add it to the Path.

    Note: Make sure you open a new Command Prompt after setting the environment variables. The new environment settings will not take effect in existing Command Prompt instances.

  1. Launch the “x86 Native Tools Command Prompt for VS 2022” command line console. Build the Beanable command line tools, simulator, and debugger from the command line:

    cd %BEANABLE%\build\makefiles\win
    build
    

    Note: There is an alternative build batch file called parallel_build.bat that can be used on multi-core systems to significantly speed up the Beanable SDK build. It is, however, more difficult to see diagnostic error messages when using this batch file. If build.bat works correctly on your system, consider using parallel_build.bat for future Beanable SDK builds.

  2. Launch the xsbug debugger from the command line:

    xsbug
    
  3. Verify the host environment setup by building the starter helloworld application for the desktop simulator target:

    cd %BEANABLE%\examples\helloworld
    mcconfig -d -m -p win
    
  4. IMPORTANT: You can now build and run applications for the desktop simulator. To build and run applications on a development board or MCU, you need to install additional SDKs, drivers, and development tools for your target platform. See the What’s Next (Building and Running Apps on Development Boards and MCUs) section of this document for more details and links to instructions.