mbed official / mbed-sdk-tools
Committer:
theotherjimmy
Date:
Wed Oct 25 14:46:50 2017 -0500
Revision:
41:2a77626a4c21
Parent:
40:7d3fa6b99b2b
Child:
43:2a7da56ebd24
Update to track Mbed OS 5.6.3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
The Other Jimmy 35:da9c89f8be7d 1 """
The Other Jimmy 35:da9c89f8be7d 2 mbed SDK
The Other Jimmy 35:da9c89f8be7d 3 Copyright (c) 2011-2016 ARM Limited
The Other Jimmy 35:da9c89f8be7d 4
The Other Jimmy 35:da9c89f8be7d 5 Licensed under the Apache License, Version 2.0 (the "License");
The Other Jimmy 35:da9c89f8be7d 6 you may not use this file except in compliance with the License.
The Other Jimmy 35:da9c89f8be7d 7 You may obtain a copy of the License at
The Other Jimmy 35:da9c89f8be7d 8
The Other Jimmy 35:da9c89f8be7d 9 http://www.apache.org/licenses/LICENSE-2.0
The Other Jimmy 35:da9c89f8be7d 10
The Other Jimmy 35:da9c89f8be7d 11 Unless required by applicable law or agreed to in writing, software
The Other Jimmy 35:da9c89f8be7d 12 distributed under the License is distributed on an "AS IS" BASIS,
The Other Jimmy 35:da9c89f8be7d 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
The Other Jimmy 35:da9c89f8be7d 14 See the License for the specific language governing permissions and
The Other Jimmy 35:da9c89f8be7d 15 limitations under the License.
The Other Jimmy 35:da9c89f8be7d 16 """
theotherjimmy 41:2a77626a4c21 17 from tools.export.gnuarmeclipse import GNUARMEclipse
The Other Jimmy 35:da9c89f8be7d 18
theotherjimmy 41:2a77626a4c21 19 class E2Studio(GNUARMEclipse):
The Other Jimmy 35:da9c89f8be7d 20 NAME = 'e2 studio'
The Other Jimmy 35:da9c89f8be7d 21 TOOLCHAIN = 'GCC_ARM'
The Other Jimmy 35:da9c89f8be7d 22
The Other Jimmy 35:da9c89f8be7d 23 TARGETS = [
The Other Jimmy 35:da9c89f8be7d 24 'RZ_A1H',
theotherjimmy 41:2a77626a4c21 25 'VK_RZ_A1H',
The Other Jimmy 35:da9c89f8be7d 26 ]
The Other Jimmy 35:da9c89f8be7d 27
theotherjimmy 41:2a77626a4c21 28 # override
The Other Jimmy 35:da9c89f8be7d 29 def generate(self):
theotherjimmy 41:2a77626a4c21 30
theotherjimmy 41:2a77626a4c21 31 jinja_ctx = self.collect_tmpl_vars()
theotherjimmy 41:2a77626a4c21 32
theotherjimmy 41:2a77626a4c21 33 print
theotherjimmy 41:2a77626a4c21 34 print 'Create a e2 studio C++ managed project'
theotherjimmy 41:2a77626a4c21 35 print 'Project name: {0}'.format(self.project_name)
theotherjimmy 41:2a77626a4c21 36 print 'Target: {0}'.format(self.toolchain.target.name)
theotherjimmy 41:2a77626a4c21 37 print 'Toolchain: {0}'.format(self.TOOLCHAIN)
The Other Jimmy 35:da9c89f8be7d 38
theotherjimmy 41:2a77626a4c21 39 self.gen_file('e2studio/.cproject.tmpl', jinja_ctx, '.cproject', trim_blocks=True, lstrip_blocks=True)
theotherjimmy 41:2a77626a4c21 40 self.gen_file('e2studio/.gdbinit.tmpl', jinja_ctx, '.gdbinit')
theotherjimmy 41:2a77626a4c21 41 self.gen_file('e2studio/launch.tmpl', jinja_ctx, '%s OpenOCD.launch' % self.project_name, trim_blocks=True, lstrip_blocks=True)
theotherjimmy 41:2a77626a4c21 42
theotherjimmy 41:2a77626a4c21 43 self.gen_file('gnuarmeclipse/.project.tmpl', jinja_ctx, '.project', trim_blocks=True, lstrip_blocks=True)
theotherjimmy 41:2a77626a4c21 44 self.gen_file('gnuarmeclipse/mbedignore.tmpl', jinja_ctx, '.mbedignore')
theotherjimmy 41:2a77626a4c21 45 self.gen_file('gnuarmeclipse/makefile.targets.tmpl', jinja_ctx, 'makefile.targets', trim_blocks=True, lstrip_blocks=True)
theotherjimmy 41:2a77626a4c21 46
theotherjimmy 41:2a77626a4c21 47 print
theotherjimmy 41:2a77626a4c21 48 print 'Done. Import the project located at \'{0}\' in e2 studio.'.format(self.project_name)