BCC User's Manual

BCC User's Manual

BCC Bare-C Cross-Compiler 2020 User's Manual The most important thing we build is trust BCC User's Manual BCC-UM 1 www.cobhamaes.com/gaisler September 2020, Version 2.2.0 Table of Contents 1. Introduction .......................................................................................................................... 6 1.1. Scope ........................................................................................................................ 6 1.2. Installation ................................................................................................................. 6 1.2.1. Host requirements ............................................................................................. 6 1.2.2. Linux .............................................................................................................. 6 1.2.3. Windows ......................................................................................................... 7 1.3. Contents of /opt/bcc-2.2.0-gcc ........................................................................................ 7 1.4. BCC tools .................................................................................................................. 7 1.5. Documentation ............................................................................................................ 8 1.6. Toolchain source code distribution ................................................................................. 8 1.6.1. BCC source code installation .............................................................................. 8 1.6.2. Building .......................................................................................................... 8 1.7. Support ...................................................................................................................... 9 2. Using BCC ......................................................................................................................... 10 2.1. General development flow ........................................................................................... 10 2.2. Compiler options ....................................................................................................... 10 2.2.1. sparc-gaisler-elf-gcc options ............................................................................. 10 2.2.2. sparc-gaisler-elf-clang options .......................................................................... 11 2.3. Compiling BCC applications ........................................................................................ 11 2.4. Floating-point considerations ....................................................................................... 11 2.5. LEON SPARC V8 instructions ..................................................................................... 11 2.6. Multiply and accumulate instructions ............................................................................. 12 2.7. Single register window model (flat) .............................................................................. 12 2.8. Register usage ........................................................................................................... 12 2.9. Single vector trapping ................................................................................................. 12 2.10. Memory organization ................................................................................................ 12 2.11. BCC Board Support Packages .................................................................................... 13 2.12. Peripheral driver library ............................................................................................ 13 2.13. Multiprocessing ....................................................................................................... 13 2.14. Debugging with GDB ............................................................................................... 14 2.14.1. Debug information considerations ..................................................................... 14 2.15. Examples ................................................................................................................ 14 2.15.1. Target specific examples ................................................................................. 15 2.16. Creating a bootable ROM images ............................................................................... 15 3. LLVM based toolchain .......................................................................................................... 16 3.1. Introduction .............................................................................................................. 16 3.2. BCC LLVM/Clang tools ............................................................................................. 16 4. C standard library ................................................................................................................. 17 4.1. File I/O .................................................................................................................... 17 4.2. Time functions .......................................................................................................... 17 4.3. Dynamic memory allocation ........................................................................................ 17 4.4. Atomic types and operations ........................................................................................ 17 4.5. Newlib nano ............................................................................................................. 17 5. BCC library ........................................................................................................................ 19 5.1. Usage ...................................................................................................................... 19 5.2. Console API ............................................................................................................. 19 5.3. Timer API ................................................................................................................ 19 5.3.1. Interrupt based timer service ............................................................................. 19 5.4. Cache control API ..................................................................................................... 20 5.5. Bus access API ......................................................................................................... 20 5.6. IU control/status register access API ............................................................................. 21 5.6.1. Processor State Register ................................................................................... 21 5.6.2. Trap Base Register .......................................................................................... 22 5.6.3. Processor power-down ..................................................................................... 23 5.7. FPU context API ....................................................................................................... 23 BCC-UM 2 www.cobham.com/gaisler September 2020, Version 2.2.0 5.8. Trap API .................................................................................................................. 23 5.8.1. Single vector trapping (SVT) ............................................................................. 24 5.9. Interrupt API ............................................................................................................. 26 5.9.1. Interrupt disable and enable .............................................................................. 26 5.9.2. Interrupt source masking .................................................................................. 27 5.9.3. Clear and force interrupt ................................................................................... 27 5.9.4. Interrupt remap ............................................................................................... 28 5.9.5. Interrupt service routines .................................................................................. 29 5.9.6. Interrupt nesting .............................................................................................. 32 5.9.7. Low-level interrupt handlers .............................................................................. 34 5.9.8. Interrupt timestamping ..................................................................................... 34 5.10. Asymmetric Multiprocessing API ................................................................................ 36 5.10.1. Processor identification ................................................................................... 36 5.10.2. Inter-processor control .................................................................................... 37 5.11. Default trap handlers ................................................................................................ 38 5.12. API reference .......................................................................................................... 38 6. AMBA Plug&Play library ...................................................................................................... 40 6.1. Introduction .............................................................................................................. 40 6.1.1. AMBA Plug&Play terms and names ................................................................... 40 6.1.2. Availability ...................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    198 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us