|
|
(5 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | <strong>This is the main nu+ compiler documentation page</strong>
| + | not more needed |
− | | |
− | == How to compile the Nu+ LLVM ==
| |
− | | |
− | == How to compile a kernel for the NuPlus architecture ==
| |
− | Some kernels are provided with the standard release of the NuPlus toolchain. We provide makefile to compile these kernels for NuPlus. In case you want to add a new kernel, it is suggested to copy a kernel folder and replace C/CPP files with your own source code. Then, remember to modify the makefile updating the SRCS variable with the current main C/CPP filename. When using these makefiles, different tools are called:
| |
− | * Clang to emit the LLVM IR and the object files
| |
− | * LLD/MCLINKER to handle the job of linking
| |
− | * elf2hex to generate the HEX file from the ELF file
| |
− | * llvm-objdump to generate the dump from the elf file
| |
− | In order to change the optimization level of the compiler or any other flag, it is possible to modify the /misc/NuPlus.mk file.
| |
− | | |
− | == How to compile the libraries for the NuPlus architecture ==
| |
− | AGGIUNGERE
| |
− | | |
− | == Backend for a custom target architecture ==
| |
− | Adding a new target architecture, i.e. nu+, to llvm requires four steps:
| |
− | * [[Backend|write all backend files and place them into the lib/Target/NuPlus folder]]
| |
− | * [[Frontend|modify the Clang frontend]]
| |
− | * [[How to add a new backend to llvm|register and add the new backend to llvm]]
| |
− | * [[Tools|modify and/or add all the external tools that are used by llvm, i.e. linker, disassembler, etc..]]
| |
− | | |
− | == Testing ==
| |
− | | |
− | == Compiler Extensions ==
| |
− | * [[OpenCL|OpenCL extension for the nu+ architecture]]
| |
− | * [[OpenMP|OpenMP extension for the nu+ architecture]]
| |