-
Notifications
You must be signed in to change notification settings - Fork 19
Mbed CE Build System Options
This page will document how to use the options provided by the Mbed CE CMake build system. Note that this assumes you have already set up your project, e.g. by following the new project setup guide.
The options in this section are passed as options to CMake, in the form -DOPTION=VALUE
(or, in VS Code, through cmake-variants.yaml).
MBED_TARGET
This sets the target board/MCU that Mbed should be built for. See targets/targets.json for the full list of targets.
UPLOAD_METHOD
This sets what upload method will be used to flash and debug your target. See the Upload Methods page for a full list of the upload methods and how to use them.
These options control the memory map summary that is displayed when an executable is linked.
MBED_MEMAP_DEPTH
This option sets the number of levels deep that the memory mapper will traverse into directories and library files. The default is 2, increase it to see a more detailed breakdown of where memory is used in your code.
MBED_MEMAP_CREATE_JSON
Set this to TRUE to generate a JSON memory map report alongside the .map file for an executable.
MBED_MEMAP_CREATE_HTML
Set this to TRUE to generate an HTML memory map (containing an interactive chart of where memory is used) alongside the .map file for an executable.
MBED_GREENTEA_TEST_BAREMETAL
Controls whether greentea tests are run using Mbed OS (FALSE) or Mbed Baremetal (TRUE).
MBED_BUILD_GREENTEA_TESTS
(for Mbed OS standalone build) Controls whether Greentea tests are run (TRUE), or unit tests (FALSE).
MBED_GREENTEA_SERIAL_PORT
Serial port to talk to the Mbed device on when running Greentea tests. Should look like 'COM3' on Windows or '/dev/ttyACM1' on Linux.