dhgdh

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by joey shelton

Committer:
nexpaq
Date:
Sat Sep 17 16:32:05 2016 +0000
Revision:
1:55a6170b404f
checking in for sharing

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nexpaq 1:55a6170b404f 1 """
nexpaq 1:55a6170b404f 2 mbed SDK
nexpaq 1:55a6170b404f 3 Copyright (c) 2011-2016 ARM Limited
nexpaq 1:55a6170b404f 4
nexpaq 1:55a6170b404f 5 Licensed under the Apache License, Version 2.0 (the "License");
nexpaq 1:55a6170b404f 6 you may not use this file except in compliance with the License.
nexpaq 1:55a6170b404f 7 You may obtain a copy of the License at
nexpaq 1:55a6170b404f 8
nexpaq 1:55a6170b404f 9 http://www.apache.org/licenses/LICENSE-2.0
nexpaq 1:55a6170b404f 10
nexpaq 1:55a6170b404f 11 Unless required by applicable law or agreed to in writing, software
nexpaq 1:55a6170b404f 12 distributed under the License is distributed on an "AS IS" BASIS,
nexpaq 1:55a6170b404f 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
nexpaq 1:55a6170b404f 14 See the License for the specific language governing permissions and
nexpaq 1:55a6170b404f 15 limitations under the License.
nexpaq 1:55a6170b404f 16 """
nexpaq 1:55a6170b404f 17 from exporters import Exporter
nexpaq 1:55a6170b404f 18 from os.path import splitext, basename
nexpaq 1:55a6170b404f 19
nexpaq 1:55a6170b404f 20
nexpaq 1:55a6170b404f 21 class KDS(Exporter):
nexpaq 1:55a6170b404f 22 NAME = 'Kinetis Design Studio'
nexpaq 1:55a6170b404f 23 TOOLCHAIN = 'GCC_ARM'
nexpaq 1:55a6170b404f 24
nexpaq 1:55a6170b404f 25 TARGETS = [
nexpaq 1:55a6170b404f 26 'K64F',
nexpaq 1:55a6170b404f 27 'HEXIWEAR',
nexpaq 1:55a6170b404f 28 'K22F',
nexpaq 1:55a6170b404f 29 ]
nexpaq 1:55a6170b404f 30
nexpaq 1:55a6170b404f 31 def generate(self):
nexpaq 1:55a6170b404f 32 libraries = []
nexpaq 1:55a6170b404f 33 for lib in self.resources.libraries:
nexpaq 1:55a6170b404f 34 l, _ = splitext(basename(lib))
nexpaq 1:55a6170b404f 35 libraries.append(l[3:])
nexpaq 1:55a6170b404f 36
nexpaq 1:55a6170b404f 37 ctx = {
nexpaq 1:55a6170b404f 38 'name': self.project_name,
nexpaq 1:55a6170b404f 39 'include_paths': self.resources.inc_dirs,
nexpaq 1:55a6170b404f 40 'linker_script': self.resources.linker_script,
nexpaq 1:55a6170b404f 41 'object_files': self.resources.objects,
nexpaq 1:55a6170b404f 42 'libraries': libraries,
nexpaq 1:55a6170b404f 43 'symbols': self.toolchain.get_symbols()
nexpaq 1:55a6170b404f 44 }
nexpaq 1:55a6170b404f 45 self.gen_file('kds_%s_project.tmpl' % self.target.lower(), ctx, '.project')
nexpaq 1:55a6170b404f 46 self.gen_file('kds_%s_cproject.tmpl' % self.target.lower(), ctx, '.cproject')
nexpaq 1:55a6170b404f 47 self.gen_file('kds_launch.tmpl', ctx, '%s.launch' % self.project_name)