Knight KE / Mbed OS Game_Master
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers __init__.py Source File

__init__.py

00001 """
00002 mbed SDK
00003 Copyright (c) 2011-2016 ARM Limited
00004 
00005 Licensed under the Apache License, Version 2.0 (the "License");
00006 you may not use this file except in compliance with the License.
00007 You may obtain a copy of the License at
00008 
00009     http://www.apache.org/licenses/LICENSE-2.0
00010 
00011 Unless required by applicable law or agreed to in writing, software
00012 distributed under the License is distributed on an "AS IS" BASIS,
00013 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 See the License for the specific language governing permissions and
00015 limitations under the License.
00016 """
00017 from os import remove
00018 from tools.export.gnuarmeclipse import GNUARMEclipse
00019 
00020 class E2Studio(GNUARMEclipse):
00021     NAME = 'e2 studio'
00022     TOOLCHAIN = 'GCC_ARM'
00023 
00024     TARGETS = [
00025         'RZ_A1H',
00026         'VK_RZ_A1H',
00027         'GR_LYCHEE',
00028     ]
00029 
00030     # override
00031     def generate(self):
00032 
00033         jinja_ctx = self.create_jinja_ctx()
00034 
00035         self.gen_file('e2studio/.cproject.tmpl', jinja_ctx, '.cproject', trim_blocks=True, lstrip_blocks=True)
00036         self.gen_file('e2studio/.gdbinit.tmpl', jinja_ctx, '.gdbinit')
00037         self.gen_file('e2studio/launch5x.tmpl', jinja_ctx, '%s OpenOCD 5x.launch' % self.project_name, trim_blocks=True, lstrip_blocks=True)
00038         self.gen_file('e2studio/launch.tmpl', jinja_ctx, '%s OpenOCD.launch' % self.project_name, trim_blocks=True, lstrip_blocks=True)
00039 
00040         self.gen_file('gnuarmeclipse/.project.tmpl', jinja_ctx, '.project', trim_blocks=True, lstrip_blocks=True)
00041         self.gen_file_nonoverwrite('gnuarmeclipse/mbedignore.tmpl', jinja_ctx, '.mbedignore')
00042         self.gen_file('gnuarmeclipse/makefile.targets.tmpl', jinja_ctx, 'makefile.targets', trim_blocks=True, lstrip_blocks=True)
00043 
00044     @staticmethod
00045     def clean(project_name):
00046         remove('%s OpenOCD 5x.launch' % project_name)
00047         remove('%s OpenOCD.launch' % project_name)