generate .mbedignore files in bin and obj to prevent mbed compile from getting confused

pull/6481/head
Thomas Sailer 2018-04-06 11:27:58 +02:00
parent 69d7c530f5
commit 696a7f5bd5
2 changed files with 8 additions and 2 deletions

View File

@ -18,8 +18,8 @@ limitations under the License.
import copy
import stat
import os
from os.path import splitext, basename, dirname, abspath
from os import remove
from os.path import splitext, basename, dirname, abspath, isdir
from os import remove, mkdir
from shutil import rmtree, copyfile
from tools.targets import TARGET_MAP
from tools.export.exporters import Exporter
@ -134,6 +134,11 @@ class CodeBlocks(GccArm):
ctx['openocdboard'] = openocd_board[self.target]
self.gen_file('codeblocks/cbp.tmpl', ctx, "%s.%s" % (self.project_name, 'cbp'))
for f in [ 'obj', 'bin' ]:
if not isdir(f):
mkdir(f)
self.gen_file_nonoverwrite('codeblocks/mbedignore.tmpl',
ctx, f + '/.mbedignore')
# finally, generate the project file
super(CodeBlocks, self).generate()

View File

@ -0,0 +1 @@
*