11# Building applications with Newlib  
22
3+ !!! warning
4+ 
5+  Newlib is considered as deprecated standard library for ARC-V 
6+  GNU toolchain. It will be completely removed in the future 
7+  releases. Please, consider migrating to 
8+  [the Picolibc-based toolchain](./building-picolibc.md). 
9+ 
310GNU toolchain for ARC-V targets uses ` riscv64-snps-elf `  prefix for
411all tools. For example, GCC binary has name ` riscv64-snps-elf-gcc ` .
512
@@ -15,7 +22,7 @@ Usually, to compile an application you need to set target options:
1522All together they correspond to a particular prebuilt standard library. Refer
1623[ Understanding ARC-V configurations] ( ./multilib.md )  for details.
1724
18- ## Getting Started   
25+ ## Getting started   
1926
2027Consider a simple code example:
2128
@@ -51,7 +58,7 @@ $ riscv64-snps-elf-gcc \
5158Refer to [ Running on nSIM] ( ./nsim.md )  and [ Running on QEMU] ( ./qemu.md )  to learn how
5259to run ARC-V examples on nSIM or QEMU simulator.
5360
54- ## Using Custom Linker Script   
61+ ## Using custom linker script   
5562
5663GNU toolchain for ARC-V is shipped with a custom ARC-V specific startup code
5764and a custom linker script. They are intended to be used in pair by passing
@@ -106,7 +113,24 @@ Using custom code and data sections is essential for 64-bit targets. By default,
106113this memory layout may be not acceptable for 64-bit targets. That is why in
107114the GNU toolchain 64-bit targets are available only with ` medany `  memory model.
108115
109- ## Tuning Instruction Scheduling  
116+ ## Using startup code without CSRs  
117+ 
118+ You can pass ` --crt0=no-csr `  option to choose a startup code without
119+ CSRs when ` -specs=arcv.specs `  is passed:
120+ 
121+ ``` 
122+ $ riscv64-snps-elf-gcc \ 
123+  -march=rv32ic_zcb_zcmp_zcmt_zba_zbb_zbs_zicsr \ 
124+  -mabi=ilp32 \ 
125+  -mtune=arc-v-rmx-100-series \ 
126+  -specs=semihost.specs \ 
127+  -specs=arcv.specs \ 
128+  --crt0=no-csr \ 
129+  -T arcv.ld \ 
130+  example.c -o example.elf 
131+ ``` 
132+ 
133+ ## Tuning instruction scheduling  
110134
111135GCC instruction scheduling may be tuned for different ARC-V
112136targets using ` -mtune= `  option:
0 commit comments