Skip to content

Commit e60518c

Browse files
committed
README.md: Update for arc-2024.06 release
Signed-off-by: Yuriy Kolerov <[email protected]>
1 parent 1090fdf commit e60518c

File tree

1 file changed

+28
-73
lines changed

1 file changed

+28
-73
lines changed

README.md

Lines changed: 28 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ While the top of *development* branches should build and run reliably, there
1515
is no guarantee of this. Users who encountered an error are welcomed to create
1616
a new bug report at GitHub Issues for this `toolchain` project.
1717

18+
## Documentation
19+
20+
There are several documentation sites for ARC GNU toolchain:
21+
22+
1. [GNU toolchain documentation site](https://foss-for-synopsys-dwc-arc-processors.github.io/documentation) - the documentation site for ARC Classic targets.
23+
2. [ARC-V Processors Getting Started](https://foss-for-synopsys-dwc-arc-processors.github.io/arc-v-getting-started) - the documentation for ARC-V targets.
24+
3. [Old GNU toolchain documentation site](https://foss-for-synopsys-dwc-arc-processors.github.io/toolchain/) - the documentation site for ARC Classic targets
25+
for release 2023.03 and earlier.
26+
1827
## Build environment
1928

2029
The toolchain building is being done by [Crosstool-NG](https://github.com/crosstool-ng/crosstool-ng)
@@ -211,6 +220,8 @@ The following pre-defined configurations (they are called "samples" on Crosstool
211220
1. `snps-arc64-snps-linux-gnu` - Linux glibc cross-toolchain for for ARC HS6x processors for 64-bit Linux hosts
212221
1. `snps-arc64-snps-native-gnu` - Linux glibc "native" toolchain from ARC HS6x processors
213222
1. `snps-arc64-unknown-elf` - Bare-metal cross-toolchain for ARC HS6x processors for 64-bit Linux hosts
223+
1. `snps-riscv64-unknown-elf` - Bare-metal cross-toolchain for ARC-V processors for 64-bit Linux hosts
224+
1. `snps-riscv64-win-elf` - Bare-metal cross-toolchain for ARC-V processors for 64-bit Windows hosts
214225

215226
And to get Crosstool-NG configured with either of those samples just say: `./ct-ng sample_name`. For example, to get bare-metal toolchain for ARCompact/ARCv2 processors say: `./ct-ng snps-arc-multilib-elf32`.
216227

@@ -225,9 +236,9 @@ and make all the settings manually. For that just say `./ct-ng menuconfig` and u
225236
226237
The most interesting options for toolchain users might be:
227238

228-
* Selection of the default target CPU model. To change it go to `Target options -> Emit assembly for CPU` and specify one of the possible values for GCC's `-mcpu` option, see <https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/wiki/Understanding-GCC-mcpu-option> for the reference.
229-
* Selection of ARC64 processors. For that go to `Target options -> Bitness` and select `64-bit`.
230-
* `CFLAGS` to be used for compilation of libraries for the target. Those might be set in `Target options -> Target CFLAGS`.
239+
* Selection of the default target CPU model. To change it go to `Target options -> Emit assembly for CPU` and specify one of the possible values for GCC's `-mcpu` option (refer to [documentation](https://foss-for-synopsys-dwc-arc-processors.github.io/documentation/2024.06/toolchain/target-options/) for details).
240+
* Selection of ARC64 processors. For that go to `Target options -> Bitness` and select `64-bit`.
241+
* `CFLAGS` to be used for compilation of libraries for the target. Those might be set in `Target options -> Target CFLAGS`.
231242

232243
## Building a toolchain with Crosstool-NG
233244

@@ -322,10 +333,15 @@ Prefixes which start with `arc-` correspond to little endian toolchains. Prefixe
322333
`arceb-elf32-gdb`. However, big endian tools are not available for ARCv3 yet.
323334

324335
You can find more information about variants of toolchains, `-mcpu` values
325-
and matching TCF files in [ARC Toolchain Variants](https://foss-for-synopsys-dwc-arc-processors.github.io/toolchain/baremetal/gcc-mcpu.html) page.
336+
and matching TCF files on [Toolchains for ARC Processors](https://foss-for-synopsys-dwc-arc-processors.github.io/documentation/2024.06/toolchain/) page.
326337

327338
### Using nSIM simulator to run bare metal ARC applications
328339

340+
> Refer to [nSIM](https://foss-for-synopsys-dwc-arc-processors.github.io/documentation/2024.06/simulators/nsim/)
341+
> page of the documentation for details. Refer to
342+
> [GNU tools for ARC-V](https://foss-for-synopsys-dwc-arc-processors.github.io/arc-v-getting-started/synopsys-tools/gnu.html)
343+
> for details regarding running ARC-V applications on simulators.
344+
329345
nSIM simulator supports GNU IO hostlink used by the libc library of bare metal
330346
GNU toolchain for ARC. nSIM option `nsim_emt=1` enables GNU IO hostlink. nSIM
331347
simulator also supports semihosting, which is essential for ARC-V targets, more
@@ -404,25 +420,24 @@ developing for hardware platform which doesn't have hostlink support is that
404420
while `exit` functions `nosys.specs` is an infinite loop. For more details
405421
please see [documentation](https://foss-for-synopsys-dwc-arc-processors.github.io/toolchain/baremetal/index.html).
406422

407-
### Using EM Starter Kit to run bare metal ARC EM application
423+
### Using HS Development Kit to run bare metal applications
408424

409-
> A custom linker script is required to link applications for EM Starter Kit.
410-
> Refer to the section "Building an application" of our EM Starter Kit page:
411-
> <https://foss-for-synopsys-dwc-arc-processors.github.io/toolchain/baremetal/em-starter-kit.html>
412-
413-
Build instructions for OpenOCD are available at its page:
414-
<https://github.com/foss-for-synopsys-dwc-arc-processors/openocd/blob/arc-2021.09/doc/README.ARC>
425+
> Refer to [Getting OpenOCD](https://foss-for-synopsys-dwc-arc-processors.github.io/documentation/2024.06/platforms/get-openocd/)
426+
> and [Using OpenOCD](https://foss-for-synopsys-dwc-arc-processors.github.io/documentation/2024.06/platforms/use-openocd/)
427+
> pages of the documentation for details regarding OpenOCD. Refer to
428+
> [Baremetal Targets](https://foss-for-synopsys-dwc-arc-processors.github.io/documentation/2024.06/baremetal/)
429+
> regarding building and running applications on boards.
415430

416431
To run OpenOCD:
417432

418433
```shell
419-
openocd -f /usr/local/share/openocd/scripts/board/snps_em_sk_v2.3.cfg
434+
openocd -f board/snps_hsdk.cfg
420435
```
421436

422437
Compile test application and run:
423438

424439
```shell
425-
$ arc-elf32-gcc -mcpu=em4_dmips -g --specs=emsk_em9d.specs simple.c
440+
$ arc-elf32-gcc -mcpu=hs38_linux -specs=hsdk.specs -g simple.c
426441
$ arc-elf32-gdb --quiet a.out
427442
(gdb) target remote :3333
428443
(gdb) load
@@ -435,66 +450,6 @@ $ arc-elf32-gdb --quiet a.out
435450
(gdb) quit
436451
```
437452

438-
### Using Ashling Opella-XD debug probe to debug bare metal applications
439-
440-
> A custom linker script is required to link applications for EM Starter Kit.
441-
> Refer to the section "Building an application" of our EM Starter Kit page:
442-
> <https://foss-for-synopsys-dwc-arc-processors.github.io/toolchain/baremetal/em-starter-kit.html>
443-
> For different hardware configurations other changes might be required.
444-
>
445-
> The Ashling Opella-XD debug probe and its drivers are not part of the GNU
446-
> tools distribution and should be obtained separately.
447-
448-
The Ashling Opella-XD drivers distribution contains gdbserver for GNU toolchain.
449-
Command to start it:
450-
451-
```shell
452-
$ ./ash-arc-gdb-server --jtag-frequency 8mhz --device arc \
453-
--arc-reg-file <core.xml>
454-
```
455-
456-
Where <core.xml> is a path to XML file describing AUX registers of target core.
457-
The Ashling drivers distribution contain files for ARC 600 (arc600-core.xml)
458-
and ARC 700 (arc700-core.xml). However due to recent changes in GDB with
459-
regards of support of XML target descriptions those files will not work out of
460-
the box, as order of some registers changed. To use Ashling GDB server with GDB
461-
starting from 2015.06 release, it is required to use modified files that can be
462-
found in this `toolchain` repository in `extras/opella-xd` directory.
463-
464-
*Before* connecting GDB to an Opella-XD gdbserver it is essential to specify
465-
path to XML target description file that is aligned to `<core.xml>` file passed
466-
to GDB server. All registers described in `<core.xml>` also must be described
467-
in XML target description file in the same order. Otherwise GDB will not
468-
function properly.
469-
470-
```shell
471-
(gdb) set tdesc filename <path/to/opella-CPU-tdesc.xml>
472-
```
473-
474-
XML target description files are provided in the same `extras/opella-xd`
475-
directory as Ashling GDB server core files.
476-
477-
Then connect to the target as with the OpenOCD/Linux gdbserver. For example a
478-
full session with an Opella-XD controlling an ARC EM target could start as
479-
follows:
480-
481-
```shell
482-
$ arc-elf32-gcc -mcpu=arcem -g --specs=nsim.specs simple.c
483-
$ arc-elf32-gdb --quiet a.out
484-
(gdb) set tdesc filename toolchain/extras/opella-xd/opella-arcem-tdesc.xml
485-
(gdb) target remote :2331
486-
(gdb) load
487-
(gdb) break main
488-
(gdb) continue
489-
(gdb) break exit
490-
(gdb) continue
491-
# Register R0 contains exit code of function main()
492-
(gtb) info reg r0
493-
(gdb) quit
494-
```
495-
496-
Similar to OpenOCD hostlink is not available in GDB with Ashling Opella-XD.
497-
498453
### Debugging applications on Linux for ARC
499454

500455
Compile application:

0 commit comments

Comments
 (0)