Clone of official tools
export/zip.py@0:66f3b5499f7f, 2016-05-19 (annotated)
- Committer:
- screamer
- Date:
- Thu May 19 19:44:41 2016 +0100
- Revision:
- 0:66f3b5499f7f
- Child:
- 31:8ea194f6145b
Initial revision
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
screamer | 0:66f3b5499f7f | 1 | """ |
screamer | 0:66f3b5499f7f | 2 | mbed SDK |
screamer | 0:66f3b5499f7f | 3 | Copyright (c) 2011-2013 ARM Limited |
screamer | 0:66f3b5499f7f | 4 | |
screamer | 0:66f3b5499f7f | 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
screamer | 0:66f3b5499f7f | 6 | you may not use this file except in compliance with the License. |
screamer | 0:66f3b5499f7f | 7 | You may obtain a copy of the License at |
screamer | 0:66f3b5499f7f | 8 | |
screamer | 0:66f3b5499f7f | 9 | http://www.apache.org/licenses/LICENSE-2.0 |
screamer | 0:66f3b5499f7f | 10 | |
screamer | 0:66f3b5499f7f | 11 | Unless required by applicable law or agreed to in writing, software |
screamer | 0:66f3b5499f7f | 12 | distributed under the License is distributed on an "AS IS" BASIS, |
screamer | 0:66f3b5499f7f | 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
screamer | 0:66f3b5499f7f | 14 | See the License for the specific language governing permissions and |
screamer | 0:66f3b5499f7f | 15 | limitations under the License. |
screamer | 0:66f3b5499f7f | 16 | """ |
screamer | 0:66f3b5499f7f | 17 | from exporters import Exporter |
screamer | 0:66f3b5499f7f | 18 | from os.path import basename |
screamer | 0:66f3b5499f7f | 19 | |
screamer | 0:66f3b5499f7f | 20 | |
screamer | 0:66f3b5499f7f | 21 | class ZIP(Exporter): |
screamer | 0:66f3b5499f7f | 22 | NAME = 'ZIP' |
screamer | 0:66f3b5499f7f | 23 | |
screamer | 0:66f3b5499f7f | 24 | TARGETS = [ |
screamer | 0:66f3b5499f7f | 25 | ] |
screamer | 0:66f3b5499f7f | 26 | |
screamer | 0:66f3b5499f7f | 27 | USING_MICROLIB = [ |
screamer | 0:66f3b5499f7f | 28 | ] |
screamer | 0:66f3b5499f7f | 29 | |
screamer | 0:66f3b5499f7f | 30 | FILE_TYPES = { |
screamer | 0:66f3b5499f7f | 31 | 'c_sources':'1', |
screamer | 0:66f3b5499f7f | 32 | 'cpp_sources':'8', |
screamer | 0:66f3b5499f7f | 33 | 's_sources':'2' |
screamer | 0:66f3b5499f7f | 34 | } |
screamer | 0:66f3b5499f7f | 35 | |
screamer | 0:66f3b5499f7f | 36 | def get_toolchain(self): |
screamer | 0:66f3b5499f7f | 37 | return 'uARM' if (self.target in self.USING_MICROLIB) else 'ARM' |
screamer | 0:66f3b5499f7f | 38 | |
screamer | 0:66f3b5499f7f | 39 | def generate(self): |
screamer | 0:66f3b5499f7f | 40 | return True |
screamer | 0:66f3b5499f7f | 41 |