Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os by
e2studio.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 exporters import Exporter 00018 from os.path import splitext, basename 00019 00020 00021 class E2Studio(Exporter): 00022 NAME = 'e2 studio' 00023 TOOLCHAIN = 'GCC_ARM' 00024 00025 TARGETS = [ 00026 'RZ_A1H', 00027 ] 00028 00029 def generate(self): 00030 libraries = [] 00031 for lib in self.resources.libraries: 00032 l, _ = splitext(basename(lib)) 00033 libraries.append(l[3:]) 00034 00035 ctx = { 00036 'name': self.project_name, 00037 'include_paths': self.resources.inc_dirs, 00038 'linker_script': self.resources.linker_script, 00039 00040 'object_files': self.resources.objects, 00041 'libraries': libraries, 00042 'symbols': self.toolchain.get_symbols() 00043 } 00044 self.gen_file('e2studio_%s_project.tmpl' % self.target.lower(), ctx, '.project') 00045 self.gen_file('e2studio_%s_cproject.tmpl' % self.target.lower(), ctx, '.cproject') 00046 self.gen_file('e2studio_%s_gdbinit.tmpl' % self.target.lower(), ctx, '.gdbinit') 00047 self.gen_file('e2studio_launch.tmpl', ctx, '%s OpenOCD.launch' % self.project_name)
Generated on Tue Jul 12 2022 13:15:47 by
