world leader in high performance signal processing
Trace: » 2005r3

2005 Release 3 (2005R3) Toolchain Release

August 4th 20051)

This toolchain release contains tools for two targets: bfin-elf and bfin-uclinux. Both are cross toolchains for Blackfin and generate code in the ELF file format. The bfin-elf target toolchain uses newlib for C library and can be used to develop standalone applications. The bfin-uclinux target toolchain uses uClibc for C library and can be used to develop uClinux applications.

This release contains many bug fixes. It’s more stable and usable.

Known Issues

  1. elf2flt passes -r option to ld. This option may make C++ objects with init_priority attribute not initialized properly.
  2. Also because elf2flt passes -r option to real.ld. You cannot use --gc-sections for ld since it cannot be used together with -r.
  3. Current toolchain does not support PIC very well.
  4. We do not support profiling using gprof. The latest uClibc no longer supports ‘gcc -fprofile-arcs -pg’ style profiling. You may use other alternatives, like OProfile.
  5. GDB has some issues when debugging multithreading applications on hardware. Single stepping on new created thread may not return.
  6. GDB sometimes may stop at a removed breakpoint, especially when debugging a multithreading application.
  7. Single stepping through hardware loop does not work when there are only one or two instructions in the loop

Changes

  1. Previously, char type was default signed. Now it’s default unsigned, same as GCC and VDSP.

Improvement since Last Release

  1. uClibc has been upgraded from uClibc-0.9.26 to uClibc-0.9.27. See changelog for the list of its improvements.
  2. Two new builtin functions, __builtin_bfin_csync () and __builtin_bfin_ssync (), have been added to the compiler. Calling them is better than using inline assembly because it tells the compiler exactly what is going on. This way, GCC can automatically insert any necessary nops to work around the CSYNC/SSYNC hardware anomalies.
  3. The old option -mcsync has been renamed to -mspecldanomaly for clarity and a new option -mcsync-anomaly has been added to control the new workaround.
  4. A new option, -mlong-calls, has been added. It prevents the generation of 24 bit pc-relative calls. Instead, all function calls will be using register indirect call instructions to allow a full range of 32 bits.
  5. Two function attributes, longcall and shortcall, have been added. They allow finer grained control than -mlong-calls.
  6. Blackfin GCC now supports stack checking. You can use the –fstack-limit-reg and –fstack-limit-symbol options. elf2flt has been modified so that in the bfin-uclinux toolchain, -fstack-limitsymbol=_stack_start provides automatic stack checking when executables are run on uClinux. This functionality also requires a new (2005R3) kernel.
  7. As a small performance optimization, 64 bit shift by one is improved by doing these with a pair of 33 bit rotate instructions.
  8. Now the bfin-uclinux toolchain supports multithreaded programming and uses the Posix thread model. The atomic testandset () function is now properly implemented. The forthcoming 2005R3 Linux kernel release is needed to support multithreaded programming.
  9. A new option, -T has been added in the BuildToolChain script to do the toolchain test on hardware.
  10. Now source level debug for assembly program is enabled.
  11. The GCC info documentation now includes Blackfin specific documentation for command line options, inline assembly, and function attributes.

Bug fixes

This section lists the bugs that are known to be fixed in this release. The number before the description is the bug ID in the Blackfin gcc3 project tracker.

GCC

  • The oddness when trying to compile shared libraries using option -mid-shared-library is fixed now.

GDB

  • Previously, GDB could not find the symbols from an object file which was compiled without –g option when doing autocompleting. Now it can.
  • When calling functions by hand in GDB, all structures were returned in memory, which is different with the convention used by GCC. Now structure whose size is less than or equal to 8 bytes is returned in registers.
  • When calling functions by hand in GDB, the last few bytes of the returned structure, whose size isn’t a multiple 4 bytes, were not correct. Now it’s fixed.
  • Previously, GDB print command did not show the correct values of some variables in .bss sections. Now it’s fixed.
  • Previously, GDB would exit if the program being debugged exits. Now it catches the exit code of the program and gives you gdb prompt instead of exit.
  • Previously, GDB could not step into a function which is an indirectly call, nor it could stepi an indirect call or jump instruction. It’s fixed now.
  • Previously, calling a vararg function by hand in GDB with small size (less than 12 bytes) arguments would not stop when it returned. Now it’s fixed.

GAS

  • [767] Order of Multi-Issue Instructions Causes Problems in gas. Now GAS can reorder instructions which are issued in parallel.
  • [805] as gives “Floating point exception”. Now the parser of Blackfin GAS can catch the divide zero error in user’s code and report the correct error message.

LD

  • Previously, linker would report a warning “cannot find entry symbol start” without -elf2flt option. Now it’s fixed.

Simulator

  • Previously you could not give any arguments to the Blackfin simulator. Now it’s fixed.
  • Previously when running bfin-elf-gdb, interrupting the simulated program with ^C did not work. Now it’s fixed.
  • One case of ROT in simulator would do a shift by 32, which is undefined in C. Now it’s fixed.

Elf2flt

  • [758] toolchain tarball install path issue. Previously the toolchain can only be installed in the directory which is used as prefix when doing configuration. Now the whole toolchain can be installed to any other directory.

Build Script

  • [771] wrong PATH in buildscript. The build script failed to remove the path which containing a preinstalled toolchain from environment variable PATH.

Packages

This release contains:

  • bfin-gcc-3.4-3.i386.rpm
    • rpm of the pre-compiled Blackfin 2005R3 release toolchain
  • bfin-gcc-3.4-3.src.rpm
    • source rpm of the Blackfin 2005R3 release toolchain (kernel source, which we used to build the binary toolchain, is also included)
  • bfin-gcc-3.4-3.tar.gz
    • compressed archive of the source of Blackfin 2005R3 release toolchain (only the toolchain source)
  • bfin-binary.tar.gz
    • compressed archive of the pre-compiled Blackfin 2005R3 release toolchain
  • test_tool_scripts.tar.gz
    • some useful test scripts
  • toolchain_test_results_2005R3.tar.gz
    • The test result sum and log files of Blackfin 2005R3 release toolchain
  • toolchain_releasenotes_2005R3.pdf
    • the release notes of this release

Installing

RPM

Install the rpm as root with the following command:

rpm -ivh bfin-gcc-3.4-3.i386.rpm 

This gets bfin-elf toolchain and bfin-uclinux toolchain installed to /opt/uClinux/bfin-elf/ and /opt/uClinux/bfin-uclinux/ respectively. After the archive is extracted a path needs to be added to your console so it knows where to find the bfin-* executables. This can be done with the following command:

export PATH=/opt/uClinux/bfin-elf/bin:/opt/uClinux/bfin-uclinux/bin:$PATH

Binary Tarball

Unzip the binary tarball with the following command:

tar -xzf bfin-gcc-3.4-3.tar.gz

You will get two directories bfin-elf and bfin-uclinux. They were configured with /opt/uClinux/bfin-elf and /opt/uClinux/bfin-uclinux as their prefix, respectively. However, they can now be put in any path you like.

You can add the paths of the tools to the environment variable $PATH so they can be easily found. This can be done with the following:

export PATH=/opt/uClinux/bfin-elf/bin:/opt/uClinux/bfin-uclinux/bin:$PATH

Source rpm

Install the source rpm as root with the following command:

rpm –ivh bfin-gcc-3.4-3.src.rpm

Source tarball

Unzip the source tarball with the following command:

tar -xzf bfin-gcc-3.4-3.tar.gz

The toolchain can be compiled using the BuildToolChain script in the buildscript folder. Set the toolchain source directory using the -s option followed by the absolute path to the directory. Set the uClinux directory using the –k option followed by the directory. Add –h for help.

Test Results

The tests are run twice. Once on the host (bfin-elf with newlib testing on the simulator) and another running on the Blackfin hardware (bfin-uclinux with uClibc on uClinux). For details on the testing, see how Testing the Toolchain was done. Differences between running on uclinux/uclibc and simulator/new-lib usually means an issue in the kernel or library not in the toolchain.

=== gcc Summary ===         uClinux    Simulator
# of expected passes         24564         24561
# of unexpected failures        36            28
# of unexpected successes        1             1
# of expected failures          67            67
# of unresolved testcases       33            33
# of untested testcases          7             7
# of unsupported tests         381           381

=== g++ Summary ===         uClinux    Simulator
# of expected passes           9718         9727
# of unexpected failures         15           10
# of unexpected successes         2            2
# of expected failures           72           72
# of unresolved testcases        14           14
# of unsupported tests           90           90

=== gdb Summary ===         uClinux    Simulator
# of expected passes           9154         9022
# of unexpected failures        175           60
# of expected failures           34           41
# of known failures              27           27
# of unresolved testcases        12            8
# of untested testcases           8            5
# of unsupported tests           21           31

=== binutils Summary ===    uClinux    Simulator
# of expected passes             23           33
# of unexpected failures          2            0
# of unresolved testcases         2            0
1) From this release, we are using a new release naming convention. 2005R3 means this is the third release in year 2005. Toolchain, kernel and Uboot should be used with the same release version. When reporting a bug, now you may use the release version to explicitly tell us in which release the bug is found