Skip to content

Commit b213992

Browse files
committed
Optimize for speed
1 parent 0b9d9ff commit b213992

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include "mbed.h"
2+
3+
DigitalOut out(p5);
4+
5+
int main() {
6+
while (true) {
7+
out = 1;
8+
out = 0;
9+
}
10+
}

workspace_tools/tests.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,12 @@
422422
"source_dir": join(TEST_DIR, "mbed", "pwm_led"),
423423
"dependencies": [MBED_LIBRARIES],
424424
},
425-
425+
{
426+
"id": "MBED_32", "description": "Pin toggling",
427+
"source_dir": join(TEST_DIR, "mbed", "pin_toggling"),
428+
"dependencies": [MBED_LIBRARIES],
429+
},
430+
426431
# CMSIS RTOS tests
427432
{
428433
"id": "CMSIS_RTOS_1", "description": "Basic",

workspace_tools/toolchains/arm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, target, options=None, notify=None, macros=None):
4343
main_cc = join(ARM_BIN, "armcc")
4444
common = ["-c",
4545
"--cpu=%s" % cpu, "--gnu",
46-
"-Ospace", "--split_sections", "--apcs=interwork",
46+
"-O3", "-Otime", "--split_sections", "--apcs=interwork",
4747
"--brief_diagnostics", "--restrict"
4848
]
4949

0 commit comments

Comments
 (0)