2013-08-06 13:38:00 +00:00
|
|
|
"""
|
|
|
|
mbed SDK
|
|
|
|
Copyright (c) 2011-2013 ARM Limited
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
"""
|
2013-02-18 15:32:11 +00:00
|
|
|
from exporters import Exporter
|
|
|
|
|
|
|
|
|
|
|
|
class IAREmbeddedWorkbench(Exporter):
|
|
|
|
NAME = 'IAR'
|
|
|
|
TOOLCHAIN = 'IAR'
|
2014-05-29 13:42:03 +00:00
|
|
|
|
2014-03-18 10:52:34 +00:00
|
|
|
TARGETS = [
|
|
|
|
'LPC1768',
|
2014-10-27 12:21:44 +00:00
|
|
|
'LPC1347',
|
2014-11-18 13:54:40 +00:00
|
|
|
'LPC11U24',
|
|
|
|
'LPC11U35_401',
|
|
|
|
'LPC11U35_501',
|
2014-11-18 14:49:23 +00:00
|
|
|
'LPCCAPPUCCINO',
|
|
|
|
'LPC1114',
|
2014-05-27 15:21:27 +00:00
|
|
|
'UBLOX_C027',
|
2014-05-28 09:54:42 +00:00
|
|
|
'ARCH_PRO',
|
2014-10-29 16:44:38 +00:00
|
|
|
'K20D50M',
|
2014-10-30 11:38:53 +00:00
|
|
|
'KL05Z',
|
2014-10-30 09:43:53 +00:00
|
|
|
'KL25Z',
|
2014-10-30 12:14:10 +00:00
|
|
|
'KL46Z',
|
2014-10-30 17:29:24 +00:00
|
|
|
'K22F',
|
2014-10-30 18:07:44 +00:00
|
|
|
'K64F',
|
2014-11-07 08:49:42 +00:00
|
|
|
'NUCLEO_F030R8',
|
|
|
|
'NUCLEO_F072RB',
|
|
|
|
'NUCLEO_F091RC',
|
2014-11-12 12:31:30 +00:00
|
|
|
'NUCLEO_F103RB',
|
2014-10-28 09:17:38 +00:00
|
|
|
'NUCLEO_F302R8',
|
2014-10-31 12:40:36 +00:00
|
|
|
'NUCLEO_F334R8',
|
2014-10-27 10:20:08 +00:00
|
|
|
'NUCLEO_F401RE',
|
2014-10-15 13:00:35 +00:00
|
|
|
'NUCLEO_F411RE',
|
2014-11-05 09:42:44 +00:00
|
|
|
'NUCLEO_L053R8',
|
2014-10-27 16:23:06 +00:00
|
|
|
'NUCLEO_L152RE',
|
2014-11-05 17:00:30 +00:00
|
|
|
'STM32F407',
|
2014-11-12 22:21:13 +00:00
|
|
|
'MTS_MDOT_F405RG',
|
2014-03-18 10:52:34 +00:00
|
|
|
]
|
2014-05-29 13:42:03 +00:00
|
|
|
|
2013-02-18 15:32:11 +00:00
|
|
|
def generate(self):
|
2014-10-10 08:40:23 +00:00
|
|
|
|
|
|
|
sources = []
|
|
|
|
sources += self.resources.c_sources
|
|
|
|
sources += self.resources.cpp_sources
|
|
|
|
sources += self.resources.s_sources
|
|
|
|
|
2013-02-18 15:32:11 +00:00
|
|
|
ctx = {
|
|
|
|
'name': self.program_name,
|
|
|
|
'include_paths': self.resources.inc_dirs,
|
|
|
|
'linker_script': self.resources.linker_script,
|
|
|
|
'object_files': self.resources.objects,
|
|
|
|
'libraries': self.resources.libraries,
|
2014-11-11 14:56:26 +00:00
|
|
|
'symbols': self.get_symbols(),
|
2014-10-10 08:40:23 +00:00
|
|
|
'source_files': sources,
|
2013-02-18 15:32:11 +00:00
|
|
|
}
|
2014-10-10 08:40:23 +00:00
|
|
|
self.gen_file('iar_%s.ewp.tmpl' % self.target.lower(), ctx, '%s.ewp' % self.program_name)
|
2013-02-18 15:32:11 +00:00
|
|
|
self.gen_file('iar.eww.tmpl', ctx, '%s.eww' % self.program_name)
|