Clone of official tools

Committer:
Anders Blomdell
Date:
Thu Feb 04 17:17:13 2021 +0100
Revision:
47:21ae3e5a7128
Parent:
43:2a7da56ebd24
Add a few normpath calls

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 43:2a7da56ebd24 17 from os import remove
theotherjimmy 41:2a77626a4c21 18 from tools.export.gnuarmeclipse import GNUARMEclipse
The Other Jimmy 35:da9c89f8be7d 19
theotherjimmy 41:2a77626a4c21 20 class E2Studio(GNUARMEclipse):
The Other Jimmy 35:da9c89f8be7d 21 NAME = 'e2 studio'
The Other Jimmy 35:da9c89f8be7d 22 TOOLCHAIN = 'GCC_ARM'
The Other Jimmy 35:da9c89f8be7d 23
The Other Jimmy 35:da9c89f8be7d 24 TARGETS = [
The Other Jimmy 35:da9c89f8be7d 25 'RZ_A1H',
theotherjimmy 41:2a77626a4c21 26 'VK_RZ_A1H',
theotherjimmy 43:2a7da56ebd24 27 'GR_LYCHEE',
The Other Jimmy 35:da9c89f8be7d 28 ]
The Other Jimmy 35:da9c89f8be7d 29
theotherjimmy 41:2a77626a4c21 30 # override
The Other Jimmy 35:da9c89f8be7d 31 def generate(self):
theotherjimmy 41:2a77626a4c21 32
theotherjimmy 43:2a7da56ebd24 33 jinja_ctx = self.create_jinja_ctx()
The Other Jimmy 35:da9c89f8be7d 34
theotherjimmy 41:2a77626a4c21 35 self.gen_file('e2studio/.cproject.tmpl', jinja_ctx, '.cproject', trim_blocks=True, lstrip_blocks=True)
theotherjimmy 41:2a77626a4c21 36 self.gen_file('e2studio/.gdbinit.tmpl', jinja_ctx, '.gdbinit')
theotherjimmy 43:2a7da56ebd24 37 self.gen_file('e2studio/launch5x.tmpl', jinja_ctx, '%s OpenOCD 5x.launch' % self.project_name, trim_blocks=True, lstrip_blocks=True)
theotherjimmy 41:2a77626a4c21 38 self.gen_file('e2studio/launch.tmpl', jinja_ctx, '%s OpenOCD.launch' % self.project_name, trim_blocks=True, lstrip_blocks=True)
theotherjimmy 41:2a77626a4c21 39
theotherjimmy 41:2a77626a4c21 40 self.gen_file('gnuarmeclipse/.project.tmpl', jinja_ctx, '.project', trim_blocks=True, lstrip_blocks=True)
theotherjimmy 43:2a7da56ebd24 41 self.gen_file_nonoverwrite('gnuarmeclipse/mbedignore.tmpl', jinja_ctx, '.mbedignore')
theotherjimmy 41:2a77626a4c21 42 self.gen_file('gnuarmeclipse/makefile.targets.tmpl', jinja_ctx, 'makefile.targets', trim_blocks=True, lstrip_blocks=True)
theotherjimmy 41:2a77626a4c21 43
theotherjimmy 43:2a7da56ebd24 44 @staticmethod
theotherjimmy 43:2a7da56ebd24 45 def clean(project_name):
theotherjimmy 43:2a7da56ebd24 46 remove('%s OpenOCD 5x.launch' % project_name)
theotherjimmy 43:2a7da56ebd24 47 remove('%s OpenOCD.launch' % project_name)