14.2. RTEMS 5 to RTEMS 6¶
This section provides helpful information when migrating from RTEMS 5 to RTEMS 6.
14.2.1. Update to GCC 10 and Later¶
The tool suite for RTEMS 6 uses at least GCC 10. GCC 10 and later enable
-fno-common by default. Code bases which never used this option before may
observe now multiple definition linker errors. For example, if global
variables are declared and defined in header files (usually a missing
extern in the header file).
14.2.2. No -specs bsp_specs GCC Option¶
The -spec bsp_specs GCC Option is no longer needed to build RTEMS
applications and there is no bsp_specs file installed. If you use this
option, then you get an error like this:
sparc-rtems6-gcc: fatal error: cannot read spec file 'bsp_specs': No such file or directory
You can remove this GCC option from your build to fix this error.
Alternatively, you can add an empty bsp_specs file.
14.2.3. Replacements for Removed APIs¶
The
rtems_iterate_over_all_threads()directive was removed. Usertems_task_iterate()instead.The
rtems_get_current_processor()directive was removed. Usertems_scheduler_get_processor()instead.The
rtems_get_processor_count()directive was removed. Usertems_scheduler_get_processor_maximum()instead.The
booleantype was removed. Useboolinstead.The
single_precisiontype was removed. Usefloatinstead.The
double_precisiontype was removed. Usedoubleinstead.The
proc_ptrtype was removed. Use a proper function pointer type.The
rtems_contexttype was removed. If you need this type in your applications, please ask on the Developers Mailing List.The
rtems_context_fptype was removed. If you need this type in your applications, please ask on the Developers Mailing List.The
rtems_extensiontype was removed. Usevoidinstead.The
rtems_io_lookup_name()directive was removed. Usestat()instead.The
region_information_blocktype was removed. UseHeap_Information_blockinstead.The
rtems_thread_cpu_usage_ttype was removed. Usestruct timespecinstead.The
rtems_rate_monotonic_period_time_ttype was removed. Usestruct timespecinstead.The
_Copyright_Noticeconstant was removed from the API. Usertems_get_copyright_notice()instead.The
_RTEMS_versionconstant was removed from the API. Usertems_get_version_string()instead.The
RTEMS_MAXIMUM_NAME_LENGTHdefine was removed. Usesizeof( rtems_name )instead.The
<rtems/system.h>header file was removed. Include<rtems.h>instead.