Mercurial > lcfOS
diff test/testsamples.py @ 385:d056b552d3f4
Made better use of layout
author | Windel Bouwman |
---|---|
date | Thu, 01 May 2014 14:03:12 +0200 |
parents | 173e20a47fda |
children | c0d9837acde8 |
line wrap: on
line diff
--- a/test/testsamples.py Sun Apr 27 17:50:25 2014 +0200 +++ b/test/testsamples.py Thu May 01 14:03:12 2014 +0200 @@ -6,6 +6,7 @@ from ppci.buildfunctions import assemble, c3compile, link startercode = """ +section reset mov sp, 0x30000 ; setup stack pointer BL sample_start ; Branch to sample start local_loop: @@ -147,11 +148,12 @@ relpath('..', 'kernel', 'src', 'io.c3'), io.StringIO(modarchcode), io.StringIO(src)], [], 'arm') - o3 = link([o1, o2], io.StringIO(arch_mmap)) + o3 = link([o2, o1], io.StringIO(arch_mmap), 'arm') + img_data = o3.get_image('image') sample_filename = 'testsample.bin' with open(sample_filename, 'wb') as f: - f.write(o3.get_section('code').data) + f.write(img_data) # Check bin file exists: self.assertTrue(os.path.isfile(sample_filename))