Andes Workshop
http://forum.andestech.com/

Assign static library to specific address
http://forum.andestech.com/viewtopic.php?f=25&t=874
Page 1 of 1

Author:  cindy [ Sat Aug 02, 2014 10:28 pm ]
Post subject:  Assign static library to specific address

Here is a example.
Attachment:
sample.zip [61.29 KiB]
Downloaded 720 times


Please import the sample.zip.
There are two projects inside.
Attachment:
1.png
1.png [ 7.29 KiB | Viewed 8516 times ]


In lib.c, we put all functions in a user defined section ".rom_code".
Attachment:
2.png
2.png [ 13.71 KiB | Viewed 8516 times ]


In sag file, assign .rom_code to 0x510000
Attachment:
3.png
3.png [ 7.52 KiB | Viewed 8516 times ]


The output of project "usercode":
Attachment:
4.png
4.png [ 5.62 KiB | Viewed 8515 times ]

Author:  cindy [ Sat Aug 02, 2014 10:57 pm ]
Post subject:  Re: Assign static library to specific address

Another sample code
Attachment:
usercode2.zip [46.45 KiB]
Downloaded 773 times


Output message:
Attachment:
5.png
5.png [ 17.25 KiB | Viewed 8512 times ]

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/