Skip to content

Commit 373fb55

Browse files
committed
Merge pull request #114 from c1728p9/iar_vla
Turn on variable length arrays in C for IAR
2 parents 3fe60fd + 080f9e2 commit 373fb55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/toolchains/iar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,
6363
main_cc = join(IAR_BIN, "iccarm")
6464
self.asm = [join(IAR_BIN, "iasmarm")] + ["--cpu", cpuchoice]
6565
if not "analyze" in self.options:
66-
self.cc = [main_cc] + c_flags
66+
self.cc = [main_cc, "--vla"] + c_flags
6767
self.cppc = [main_cc, "--c++", "--no_rtti", "--no_exceptions"] + c_flags
6868
else:
69-
self.cc = [join(GOANNA_PATH, "goannacc"), '--with-cc="%s"' % main_cc.replace('\\', '/'), "--dialect=iar-arm", '--output-format="%s"' % self.GOANNA_FORMAT] + c_flags
69+
self.cc = [join(GOANNA_PATH, "goannacc"), '--with-cc="%s"' % main_cc.replace('\\', '/'), "--dialect=iar-arm", '--output-format="%s"' % self.GOANNA_FORMAT, "--vla"] + c_flags
7070
self.cppc = [join(GOANNA_PATH, "goannac++"), '--with-cxx="%s"' % main_cc.replace('\\', '/'), "--dialect=iar-arm", '--output-format="%s"' % self.GOANNA_FORMAT] + ["--c++", "--no_rtti", "--no_exceptions"] + c_flags
7171
self.ld = join(IAR_BIN, "ilinkarm")
7272
self.ar = join(IAR_BIN, "iarchive")

0 commit comments

Comments
 (0)