This library is based on the SiFive Freedom Metal library, but has been modified to be work with the IAR toolchain.
The IAR flavoured Freedom Metal library is provided as-is, and there is no guarantee of its status and that it will be maintained.
Documentation for the original Freedom Metal library can be found here.
In order to get the required design files for this project, it is necessary to first setup and build the device specific header files using the IAR friendly version of the Freedom Device Tree Tools library. Follow the instructions in this library to generate the header files and get them moved to their correct place in the IAR Freedom Metal library.
To use the IAR Freedom Metal library in your project you need to do the following steps (after the device header files have been generated):
-
Add the freedom-metal folder as an additional include path (Project -> Options -> Static Analysis -> C/C++ Compiler -> Preprocessor)
-
Define the following symbols (Project -> Options -> Static Analysis -> C/C++ Compiler -> Preprocessor):
__asm__=asm
__inline__=inline
__volatile__=volatile
-
Override the linker entry symbol to __metal_enter (Project -> Options -> Static Analysis -> Linker -> Library)
-
Add all the files in the freedom-metal/src folder (including drivers) to the project
(Note that step 3 above is not necessary if you are only building an sdk library)