annotate python/asm.py @ 381:6df89163e114
Fix section and ldr pseudo instruction
author |
Windel Bouwman |
date |
Sat, 26 Apr 2014 17:41:56 +0200 |
parents |
6f4753202b9a |
children |
|
rev |
line source |
303
|
1 #!/usr/bin/env python3
|
|
2
|
318
|
3 import argparse
|
381
|
4 from ppci.target.target_list import targets
|
|
5 from ppci.buildfunctions import assemble
|
196
|
6
|
|
7 if __name__ == '__main__':
|
|
8 # When run as main file, try to grab command line arguments:
|
|
9 parser = argparse.ArgumentParser(description="Assembler")
|
318
|
10 parser.add_argument('sourcefile', type=argparse.FileType('r'),
|
|
11 help='the source file to assemble')
|
196
|
12 args = parser.parse_args()
|
381
|
13 obj = assemble(args.sourcefile, targets['arm'])
|