diff --git a/libraries/tests/mbed/pin_toggling/main.cpp b/libraries/tests/mbed/pin_toggling/main.cpp new file mode 100644 index 0000000000..5eb809a2ff --- /dev/null +++ b/libraries/tests/mbed/pin_toggling/main.cpp @@ -0,0 +1,10 @@ +#include "mbed.h" + +DigitalOut out(p5); + +int main() { + while (true) { + out = 1; + out = 0; + } +} diff --git a/workspace_tools/tests.py b/workspace_tools/tests.py index 38219b3e58..ce11499964 100644 --- a/workspace_tools/tests.py +++ b/workspace_tools/tests.py @@ -422,7 +422,12 @@ TESTS = [ "source_dir": join(TEST_DIR, "mbed", "pwm_led"), "dependencies": [MBED_LIBRARIES], }, - + { + "id": "MBED_32", "description": "Pin toggling", + "source_dir": join(TEST_DIR, "mbed", "pin_toggling"), + "dependencies": [MBED_LIBRARIES], + }, + # CMSIS RTOS tests { "id": "CMSIS_RTOS_1", "description": "Basic", diff --git a/workspace_tools/toolchains/arm.py b/workspace_tools/toolchains/arm.py index a126ffea33..8f7e30c661 100644 --- a/workspace_tools/toolchains/arm.py +++ b/workspace_tools/toolchains/arm.py @@ -43,7 +43,7 @@ class ARM(mbedToolchain): main_cc = join(ARM_BIN, "armcc") common = ["-c", "--cpu=%s" % cpu, "--gnu", - "-Ospace", "--split_sections", "--apcs=interwork", + "-O3", "-Otime", "--split_sections", "--apcs=interwork", "--brief_diagnostics", "--restrict" ]