Skip to content

Commit 696a7f5

Browse files
author
Thomas Sailer
committed
generate .mbedignore files in bin and obj to prevent mbed compile from getting confused
1 parent 69d7c53 commit 696a7f5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tools/export/codeblocks/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
import copy
1919
import stat
2020
import os
21-
from os.path import splitext, basename, dirname, abspath
22-
from os import remove
21+
from os.path import splitext, basename, dirname, abspath, isdir
22+
from os import remove, mkdir
2323
from shutil import rmtree, copyfile
2424
from tools.targets import TARGET_MAP
2525
from tools.export.exporters import Exporter
@@ -134,6 +134,11 @@ def generate(self):
134134
ctx['openocdboard'] = openocd_board[self.target]
135135

136136
self.gen_file('codeblocks/cbp.tmpl', ctx, "%s.%s" % (self.project_name, 'cbp'))
137+
for f in [ 'obj', 'bin' ]:
138+
if not isdir(f):
139+
mkdir(f)
140+
self.gen_file_nonoverwrite('codeblocks/mbedignore.tmpl',
141+
ctx, f + '/.mbedignore')
137142

138143
# finally, generate the project file
139144
super(CodeBlocks, self).generate()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

0 commit comments

Comments
 (0)