0% found this document useful (0 votes)
40 views

AUTOSAR SWS PlatformTypes

Uploaded by

kareem walid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

AUTOSAR SWS PlatformTypes

Uploaded by

kareem walid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Specification of Platform Types

AUTOSAR CP R20-11

Document Title Specification of Platform Types


Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 48

Document Status published


Part of AUTOSAR Standard Classic Platform
Part of Standard Release R20-11

Document Change History


Date Release Changed by Description
• Chapter 7.6 "Error classification
AUTOSAR added"
2020-11-30 R20-11 Release • "VoidPtr" and "ConstVoidPtr" added
Management • Document converted from Word to
LaTeX
• Editorial changes.
AUTOSAR • Wrong "Available via" references
2019-11-28 R19-11 Release fixed.
Management • Changed Document Status from
Final to published.
AUTOSAR
2018-10-31 4.4.0 Release • Editorial changes.
Management • Clarifications.
AUTOSAR
2017-12-08 4.3.1 Release • Editorial changes.
Management
AUTOSAR
2016-11-30 4.3.0 Release • Support for 64 bit MCU’s added.
Management • Editorial changes.

AUTOSAR • Float types shall follow the


2015-07-31 4.2.2 Release appropriate binary interchange
Management format of IEEE 754-2008.
• Editorial changes.

1 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

• Removed SWS_Platform_00063 as
AUTOSAR the influence of Post-build time
2014-10-31 4.2.1 Release configuration parameters on header
Management files is already specified in
SWS_BSWGeneral.
AUTOSAR
2014-03-31 4.1.3 Release • Editorial changes.
Management

AUTOSAR • Types uint64 and sint64 added.


2013-10-31 4.1.2 Release • Editorial changes.
Management • Removed chapter(s) on change
documentation.
AUTOSAR
2013-03-15 4.1.1 • Editorial changes.
Administration
• Clarified use of operators for
AUTOSAR boolean variables.
2011-12-22 4.0.3
Administration • Implemented new traceability
mechanism.
• Detailed published parameter names
(module names) in chapter 10. The
previous definition was ambigous
AUTOSAR across several releases.
2010-09-30 3.1.5
Administration • Changed "Module Short Name"
(MSN) to "Module Abbreviation"
(MAB) for the use of API service
prefixes such as "CanIf".
• Restored PLATFORM012.
AUTOSAR • Clarified endian support.
2010-02-02 3.1.4 • Clarified support for variable register
Administration
width architectures.
• Legal disclaimer revised.
AUTOSAR
2008-08-13 3.1.1 • Legal disclaimer revised.
Administration

2 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

• Chapter 8.2: "AUTOSAR supports for


compiler and target implementation
only 2 complement arithmetic".
• Chapter 12.10: Changed the basic
type for *_least types (optimized
types) from int to long for SHx
processors.
AUTOSAR • Removal the explicit cast to
2007-12-21 3.0.1
Administration boolean in the precompile definition
(#define) for macros TRUE and
FALSE ("#define TRUE (
(boolean) 1)" has become
"#define TRUE 1").
• Document meta information
extended.
• Small layout adaptations made.
• boolean type has been defined as
an eight bit long unsigned
AUTOSAR integer.
2007-01-24 2.1.15 • Legal disclaimer revised.
Administration
• Release Notes added.
• "Advice for users" revised.
• "Revision Information" added.
AUTOSAR
2006-05-16 2.0 • Second release.
Administration
AUTOSAR
2005-05-31 1.0 • First release.
Administration

3 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Disclaimer

This work (specification and/or software implementation) and the material contained in
it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the
companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.

4 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Table of Contents
1 Introduction and functional overview 7

2 Acronyms and Abbreviations 8

3 Related documentation 9
3.1 Input documents & related standards and norms . . . . . . . . . . . . 9
3.2 Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4 Constraints and assumptions 11
4.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Applicability to car domains . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3 Applicability to safety related environments . . . . . . . . . . . . . . . . 11
5 Dependencies to other modules 12
5.1 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.1.1 Code file structure . . . . . . . . . . . . . . . . . . . . . . . . 12
5.1.2 Header file structure . . . . . . . . . . . . . . . . . . . . . . . 12
6 Requirements Tracing 13

7 Functional specification 20
7.1 General issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.2 CPU Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.3 Endianess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.3.1 Bit Ordering (Register) . . . . . . . . . . . . . . . . . . . . . 20
7.3.2 Byte Ordering (Memory) . . . . . . . . . . . . . . . . . . . . 21
7.4 Optimized integer data types . . . . . . . . . . . . . . . . . . . . . . . . 23
7.5 Boolean data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7.6 Error classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.6.1 Development Errors . . . . . . . . . . . . . . . . . . . . . . . 24
7.6.2 Runtime Errors . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.6.3 Transient Faults . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.6.4 Production Errors . . . . . . . . . . . . . . . . . . . . . . . . 24
7.6.5 Extended Production Errors . . . . . . . . . . . . . . . . . . . 24
8 API specification 25
8.1 Imported types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.2 Type definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.2.1 boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.2.2 uint8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.2.3 uint16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8.2.4 uint32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8.2.5 uint64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8.2.6 sint8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.2.7 sint16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

8.2.8 sint32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.2.9 sint64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.2.10 uint8_least . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.2.11 uint16_least . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.2.12 uint32_least . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8.2.13 sint8_least . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8.2.14 sint16_least . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.2.15 sint32_least . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.2.16 float32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.2.17 float64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.2.18 VoidPtr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.2.19 ConstVoidPtr . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.3 Symbol definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.3.1 CPU_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.3.2 CPU_BIT_ORDER . . . . . . . . . . . . . . . . . . . . . . . . 32
8.3.3 CPU_BYTE_ORDER . . . . . . . . . . . . . . . . . . . . . . 32
8.3.4 TRUE, FALSE . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.4 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.5 Call-back notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.6 Scheduled functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.7 Expected Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
9 Sequence diagrams 35

10 Configuration specification 36
10.1 Published parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A Annex 37
A.1 Type definitions - general . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.2 Type definitions - S12X . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.3 Type definitions - ST10 . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.4 Type definitions - ST30 . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A.5 Type definitions - V850 . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
A.6 Type definitions - MPC5554 . . . . . . . . . . . . . . . . . . . . . . . . 39
A.7 Type definitions - TC1796/TC1766 . . . . . . . . . . . . . . . . . . . . 40
A.8 Type definitions - MB91F . . . . . . . . . . . . . . . . . . . . . . . . . . 40
A.9 Type definitions - M16C/M32C . . . . . . . . . . . . . . . . . . . . . . . 41
A.10 Type definitions - SHx . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
A.11 Type definitions - ARM Cortex A53 . . . . . . . . . . . . . . . . . . . . 42
B Not applicable requirements 44

6 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

1 Introduction and functional overview


This document specifies the AUTOSAR platform types header file. It contains all plat-
form dependent types and symbols. Those types must be abstracted in order to be-
come platform and compiler independent.
It is required that all platform types files are unique within the AUTOSAR community
to guarantee unique types per platform and to avoid type changes when moving a
software module from platform A to B.

7 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

2 Acronyms and Abbreviations


Acronyms and abbreviations that have a local scope are not contained in the AUTOSAR
glossary. These must appear in a local glossary.

Acronym Description
Rollover mechanism The following example sequence is called ’rollover’:
• An unsigned char has the value of 255.

• It is incremented by 1.

• The result is 0.
SDU Service Data Unit (payload)

Abbreviation Description
int Integer

8 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

3 Related documentation

3.1 Input documents & related standards and norms

[1] Basic Software Module Description Template


AUTOSAR_TPS_BSWModuleDescriptionTemplate
[2] List of Basic Software Modules
AUTOSAR_TR_BSWModuleList
[3] ISO/IEC 9899:1990
http://www.iso.org
[4] General Specification of Basic Software Modules
AUTOSAR_SWS_BSWGeneral
[5] General Requirements on Basic Software Modules
AUTOSAR_SRS_BSWGeneral
[6] Cosmic C Cross Compiler User’s Guide for Motorola MC68HC12, V4.5
[7] Metrowerks CodeWarrior 4.0 for Freescale HC9S12X/XGATE (V5.0.25)
Motorola HC12 Assembler, 2.6.2004
[8] Metrowerks CodeWarrior 4.0 for Freescale HC9S12X/XGATE (V5.0.25)
Motorola HC12 Compiler, 2.6.2004
[9] Metrowerks CodeWarrior 4.0 for Freescale HC9S12X/XGATE (V5.0.25)
Smart Linker, 2.4.2004
[10] TASKING for ST10 V8.5
C166/ST10 v8.5 C Cross-Compiler User’s Manual, V5.16
[11] TASKING for ST10 V8.5
C166/ST10 v8.5 C Cross-Assembler, Linker/Locator, Utilities User’s Manual,
V5.16
[12] GreenHills MULTI for V850 V4.0.5
Building Applications for Embedded V800, V4.0, 30.1.2004
[13] Wind River (Diab Data) for PowerPC Version 5.2.1
Wind River Compiler for Power PC - Getting Started, Edition 2, 8.5.2004
[14] Wind River (Diab Data) for PowerPC Version 5.2.1
Wind River Compiler for Power PC - User’s Guide,Edition 2, 11.5.2004
[15] TASKING for TriCore TC1796 V2.1R1
TriCore v2.0 C Cross-Compiler, Assembler, Linker User’s Guide V1.2
[16] ARM ADS compiler manual

9 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

3.2 Related specification


AUTOSAR provides a General Specification on Basic Software modules (see [4]),
which is also valid for Platform Types. Thus, the specification "General Specification
on Basic Software modules" [4] shall be considered as additional and required specifi-
cation for Platform Types.

10 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

4 Constraints and assumptions

4.1 Limitations
No limitations.

4.2 Applicability to car domains


No restrictions.

4.3 Applicability to safety related environments


The AUTOSAR boolean type may be used if the correct usage (see
[SWS_Platform_00027]) is proven by a formal code review or a static analysis by a
validated static analysis tool.
The optimized AUTOSAR integer data types (*_least) may be used if the correct
usage (see chapter 7.4) is proven by a formal code review or a static analysis by a
validated static analysis tool.

11 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

5 Dependencies to other modules


None.

5.1 File structure

5.1.1 Code file structure

None

5.1.2 Header file structure

Two header file structures are applicable. One is depending on communication related
basic software modules and the second is depending on non-communication related
basic software modules.

12 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

6 Requirements Tracing
The following tables reference the requirements specified in General Requirements on
Basic Software Modules [5] and links to the fulfillment of these. Please note that if col-
umn “Satisfied by” is empty for a specific requirement this means that this requirement
is not fulfilled by this document.
Requirement Description Satisfied by
[SRS_BSW_00005] Modules of the µC Abstraction [SWS_Platform_00063]
Layer (MCAL) may not have
hard coded horizontal interfaces
[SRS_BSW_00007] All Basic SW Modules written in [SWS_Platform_00063]
C language shall conform to the
MISRA C 2012 Standard.
[SRS_BSW_00009] All Basic SW Modules shall be [SWS_Platform_00063]
documented according to a
common standard.
[SRS_BSW_00010] The memory consumption of all [SWS_Platform_00063]
Basic SW Modules shall be
documented for a defined
configuration for all supported
platforms.
[SRS_BSW_00101] The Basic Software Module shall [SWS_Platform_00063]
be able to initialize variables and
hardware in a separate
initialization function
[SRS_BSW_00158] No description [SWS_Platform_00063]
[SRS_BSW_00159] All modules of the AUTOSAR [SWS_Platform_00063]
Basic Software shall support a
tool based configuration
[SRS_BSW_00160] Configuration files of AUTOSAR [SWS_Platform_00063]
Basic SW module shall be
readable for human beings
[SRS_BSW_00161] The AUTOSAR Basic Software [SWS_Platform_00063]
shall provide a microcontroller
abstraction layer which provides
a standardized interface to
higher software layers
[SRS_BSW_00162] The AUTOSAR Basic Software [SWS_Platform_00063]
shall provide a hardware
abstraction layer
[SRS_BSW_00164] The Implementation of interrupt [SWS_Platform_00063]
service routines shall be done
by the Operating System,
complex drivers or modules
[SRS_BSW_00167] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall provide
configuration rules and
constraints to enable plausibility
checks
[SRS_BSW_00168] SW components shall be tested [SWS_Platform_00063]
by a function defined in a
common API in the Basis-SW

13 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00170] The AUTOSAR SW Components [SWS_Platform_00063]
shall provide information about
their dependency from faults,
signal qualities, driver demands
[SRS_BSW_00171] Optional functionality of a [SWS_Platform_00063]
Basic-SW component that is not
required in the ECU shall be
configurable at pre-compile-time
[SRS_BSW_00172] The scheduling strategy that is [SWS_Platform_00063]
built inside the Basic Software
Modules shall be compatible
with the strategy used in the
system
[SRS_BSW_00300] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall be identified by an
unambiguous name
[SRS_BSW_00301] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall only import the
necessary information
[SRS_BSW_00302] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall only export
information needed by other
modules
[SRS_BSW_00304] All AUTOSAR Basic Software [SWS_Platform_00013]
Modules shall use the following [SWS_Platform_00014]
data types instead of native C [SWS_Platform_00015]
data types [SWS_Platform_00016]
[SWS_Platform_00017]
[SWS_Platform_00018]
[SWS_Platform_00020]
[SWS_Platform_00021]
[SWS_Platform_00022]
[SWS_Platform_00023]
[SWS_Platform_00024]
[SWS_Platform_00025]
[SRS_BSW_00305] Data types naming convention [SWS_Platform_00063]
[SRS_BSW_00306] AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall be compiler and
platform independent
[SRS_BSW_00307] Global variables naming [SWS_Platform_00063]
convention
[SRS_BSW_00308] AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall not define global
data in their header files, but in
the C file
[SRS_BSW_00309] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall indicate all global
data with read-only purposes by
explicitly assigning the const
keyword
[SRS_BSW_00310] API naming convention [SWS_Platform_00063]
[SRS_BSW_00312] Shared code shall be reentrant [SWS_Platform_00063]

14 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00314] All internal driver modules shall [SWS_Platform_00063]
separate the interrupt frame
definition from the service
routine
[SRS_BSW_00321] The version numbers of [SWS_Platform_00063]
AUTOSAR Basic Software
Modules shall be enumerated
according specific rules
[SRS_BSW_00323] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall check passed API
parameters for validity
[SRS_BSW_00325] The runtime of interrupt service [SWS_Platform_00063]
routines and functions that are
running in interrupt context shall
be kept short
[SRS_BSW_00326] No description [SWS_Platform_00063]
[SRS_BSW_00327] Error values naming convention [SWS_Platform_00063]
[SRS_BSW_00328] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall avoid the
duplication of code
[SRS_BSW_00329] No description [SWS_Platform_00063]
[SRS_BSW_00330] It shall be allowed to use macros [SWS_Platform_00063]
instead of functions where
source code is used and runtime
is critical
[SRS_BSW_00331] All Basic Software Modules shall [SWS_Platform_00063]
strictly separate error and status
information
[SRS_BSW_00333] For each callback function it [SWS_Platform_00063]
shall be specified if it is called
from interrupt context or not
[SRS_BSW_00334] All Basic Software Modules shall [SWS_Platform_00063]
provide an XML file that contains
the meta data
[SRS_BSW_00335] Status values naming [SWS_Platform_00063]
convention
[SRS_BSW_00336] Basic SW module shall be able [SWS_Platform_00063]
to shutdown
[SRS_BSW_00337] Classification of development [SWS_Platform_00063]
errors
[SRS_BSW_00338] No description [SWS_Platform_00063]
[SRS_BSW_00339] Reporting of production relevant [SWS_Platform_00063]
error status
[SRS_BSW_00341] Module documentation shall [SWS_Platform_00063]
contains all needed informations
[SRS_BSW_00342] It shall be possible to create an [SWS_Platform_00063]
AUTOSAR ECU out of modules
provided as source code and
modules provided as object
code, even mixed
[SRS_BSW_00343] The unit of time for specification [SWS_Platform_00063]
and configuration of Basic SW
modules shall be preferably in
physical time unit

15 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00344] BSW Modules shall support [SWS_Platform_00063]
link-time configuration
[SRS_BSW_00345] BSW Modules shall support [SWS_Platform_00063]
pre-compile configuration
[SRS_BSW_00346] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall provide at least a
basic set of module files
[SRS_BSW_00347] A Naming seperation of different [SWS_Platform_00063]
instances of BSW drivers shall
be in place
[SRS_BSW_00348] All AUTOSAR standard types [SWS_Platform_00063]
and constants shall be placed
and organized in a standard type
header file
[SRS_BSW_00350] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall allow the
enabling/disabling of detection
and reporting of development
errors.
[SRS_BSW_00355] No description [SWS_Platform_00063]
[SRS_BSW_00357] For success/failure of an API call [SWS_Platform_00063]
a standard return type shall be
defined
[SRS_BSW_00358] The return type of init() functions [SWS_Platform_00063]
implemented by AUTOSAR
Basic Software Modules shall be
void
[SRS_BSW_00359] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules callback functions shall
avoid return types other than
void if possible
[SRS_BSW_00360] AUTOSAR Basic Software [SWS_Platform_00063]
Modules callback functions are
allowed to have parameters
[SRS_BSW_00361] All mappings of not standardized [SWS_Platform_00063]
keywords of compiler specific
scope shall be placed and
organized in a compiler specific
type and keyword header
[SRS_BSW_00369] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall not return specific
development error codes via the
API
[SRS_BSW_00370] No description [SWS_Platform_00063]
[SRS_BSW_00371] The passing of function pointers [SWS_Platform_00063]
as API parameter is forbidden
for all AUTOSAR Basic Software
Modules
[SRS_BSW_00373] The main processing function of [SWS_Platform_00063]
each AUTOSAR Basic Software
Module shall be named
according the defined
convention

16 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00374] All Basic Software Modules shall [SWS_Platform_00063]
provide a readable module
vendor identification
[SRS_BSW_00375] Basic Software Modules shall [SWS_Platform_00063]
report wake-up reasons
[SRS_BSW_00376] No description [SWS_Platform_00063]
[SRS_BSW_00377] A Basic Software Module can [SWS_Platform_00063]
return a module specific types
[SRS_BSW_00378] AUTOSAR shall provide a [SWS_Platform_00026]
boolean type [SWS_Platform_00027]
[SWS_Platform_00034]
[SRS_BSW_00379] All software modules shall [SWS_Platform_00063]
provide a module identifier in the
header file and in the module
XML description file.
[SRS_BSW_00381] No description [SWS_Platform_00063]
[SRS_BSW_00383] The Basic Software Module [SWS_Platform_00063]
specifications shall specify
which other configuration files
from other modules they use at
least in the description
[SRS_BSW_00384] The Basic Software Module [SWS_Platform_00063]
specifications shall specify at
least in the description which
other modules they require
[SRS_BSW_00385] List possible error notifications [SWS_Platform_00063]
[SRS_BSW_00386] The BSW shall specify the [SWS_Platform_00063]
configuration for detecting an
error
[SRS_BSW_00387] No description [SWS_Platform_00063]
[SRS_BSW_00388] Containers shall be used to [SWS_Platform_00063]
group configuration parameters
that are defined for the same
object
[SRS_BSW_00389] Containers shall have names [SWS_Platform_00063]
[SRS_BSW_00390] Parameter content shall be [SWS_Platform_00063]
unique within the module
[SRS_BSW_00391] No description [SWS_Platform_00063]
[SRS_BSW_00392] Parameters shall have a type [SWS_Platform_00063]
[SRS_BSW_00393] Parameters shall have a range [SWS_Platform_00063]
[SRS_BSW_00394] The Basic Software Module [SWS_Platform_00063]
specifications shall specify the
scope of the configuration
parameters
[SRS_BSW_00395] The Basic Software Module [SWS_Platform_00063]
specifications shall list all
configuration parameter
dependencies
[SRS_BSW_00396] The Basic Software Module [SWS_Platform_00063]
specifications shall specify the
supported configuration classes
for changing values and
multiplicities for each parameter/
container

17 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00397] The configuration parameters in [SWS_Platform_00063]
pre-compile time are fixed
before compilation starts
[SRS_BSW_00398] The link-time configuration is [SWS_Platform_00063]
achieved on object code basis in
the stage after compiling and
before linking
[SRS_BSW_00399] Parameter-sets shall be located [SWS_Platform_00063]
in a separate segment and shall
be loaded after the code
[SRS_BSW_00400] Parameter shall be selected [SWS_Platform_00063]
from multiple sets of parameters
after code has been loaded and
started
[SRS_BSW_00401] Documentation of multiple [SWS_Platform_00063]
instances of configuration
parameters shall be available
[SRS_BSW_00404] BSW Modules shall support [SWS_Platform_00063]
post-build configuration
[SRS_BSW_00405] BSW Modules shall support [SWS_Platform_00063]
multiple configuration sets
[SRS_BSW_00406] A static status variable denoting [SWS_Platform_00063]
if a BSW module is initialized
shall be initialized with value 0
before any APIs of the BSW
module is called
[SRS_BSW_00407] Each BSW module shall provide [SWS_Platform_00063]
a function to read out the version
information of a dedicated
module implementation
[SRS_BSW_00408] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules configuration
parameters shall be named
according to a specific naming
rule
[SRS_BSW_00409] All production code error ID [SWS_Platform_00063]
symbols are defined by the Dem
module and shall be retrieved by
the other BSW modules from
Dem configuration
[SRS_BSW_00410] Compiler switches shall have [SWS_Platform_00063]
defined values
[SRS_BSW_00411] All AUTOSAR Basic Software [SWS_Platform_00063]
Modules shall apply a naming
rule for enabling/disabling the
existence of the API
[SRS_BSW_00412] No description [SWS_Platform_00063]
[SRS_BSW_00413] An index-based accessing of the [SWS_Platform_00063]
instances of BSW modules shall
be done
[SRS_BSW_00414] Init functions shall have a pointer [SWS_Platform_00063]
to a configuration structure as
single parameter

18 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00415] Interfaces which are provided [SWS_Platform_00063]
exclusively for one module shall
be separated into a dedicated
header file
[SRS_BSW_00416] The sequence of modules to be [SWS_Platform_00063]
initialized shall be configurable
[SRS_BSW_00417] Software which is not part of the [SWS_Platform_00063]
SW-C shall report error events
only after the DEM is fully
operational.
[SRS_BSW_00419] If a pre-compile time [SWS_Platform_00063]
configuration parameter is
implemented as "const" it should
be placed into a separate c-file
[SRS_BSW_00420] No description [SWS_Platform_00063]
[SRS_BSW_00422] Pre-de-bouncing of error status [SWS_Platform_00063]
information is done within the
DEM
[SRS_BSW_00423] BSW modules with AUTOSAR [SWS_Platform_00063]
interfaces shall be describable
with the means of the SW-C
Template
[SRS_BSW_00429] Access to OS is restricted [SWS_Platform_00063]
[SRS_BSW_00432] Modules should have separate [SWS_Platform_00063]
main processing functions for
read/receive and write/transmit
data path

19 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

7 Functional specification

7.1 General issues


[SWS_Platform_00002] dIt is not allowed to add any extension to this file. Any exten-
sion invalidates the AUTOSAR conformity.c()

7.2 CPU Type


[SWS_Platform_00044] dFor each platform the register width of the CPU used shall
be indicated by defining CPU_TYPE.c()
[SWS_Platform_00045] dAccording to the register width of the CPU used, CPU_TYPE
shall be assigned to one of the symbols CPU_TYPE_8, CPU_TYPE_16, CPU_TYPE_32
or CPU_TYPE_64.c()

7.3 Endianess
The pattern for bit, byte and word ordering in native types, such as integers, is called
endianess.
[SWS_Platform_00043] dFor each platform the appropriate bit order on register level
shall be indicated in the platform types header file using the symbol CPU_BIT_ORDER.c
()
[SWS_Platform_00046] dFor each platform the appropriate byte order on memory
level shall be indicated in the platform types header file using the symbol CPU_BYTE_-
ORDER.c()

7.3.1 Bit Ordering (Register)

[SWS_Platform_00048] dIn case of Big Endian bit ordering CPU_BIT_ORDER shall be


assigned to MSB_FIRST in the platform types header file.c()
[SWS_Platform_00049] dIn case of Little Endian bit ordering CPU_BIT_ORDER shall
be assigned to LSB_FIRST in the platform types header file.c()

20 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Figure 7.1: Big Endian bit ordering versus Little Endian bit ordering

Important Note:
The naming convention Bit0, Bit1, etc. and the bit’s significance within a byte, word, etc.
are different topics and shall not be mixed. The counting scheme of bits in Motorola[6]
µC-architecture’s (Big Endian Bit Order) starts with Bit0 indicating the Most Significant
Bit, whereas all other µC using Little Endian Bit Order assign Bit0 to be the Least
Significant Bit!
The MSB in an accumulator is always stored as the left-most bit regardless of the CPU
type. Hence, Big and Little Endianess bit orders imply different bit-naming conventions.

7.3.2 Byte Ordering (Memory)

[SWS_Platform_00050] dIn case of Big Endian byte ordering CPU_BYTE_ORDER shall


be assigned to HIGH_BYTE_FIRST in the platform types header file.c()

21 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Figure 7.2: Big Endian (HIGH_BYTE_FIRST) byte ordering

Address Data Order


n Byte1 Most Significant Byte (
HIGH_BYTE_FIRST)
n+1 Byte0 Least Significant Byte

[SWS_Platform_00051] dIn case of Little Endian byte ordering CPU_BYTE_ORDER


shall be assigned to LOW_BYTE_FIRST in the platform types header file.c()

Figure 7.3: Little Endian (LOW_BYTE_FIRST) byte ordering

22 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Address Data Order


n Byte0 Least Significant Byte (
LOW_BYTE_FIRST)
n+1 Byte1 Most Significant Byte

Naming convention for illustration: The Most Significant Byte within a 16 bit wide
data is named Byte1. The Least Significant Byte within a 16 bit wide data is named
Byte0.
Important Note: The naming convention Byte0 and Byte1 is not unique and may be
different in the manufacturer’s reference documentation for a particular µC.

7.4 Optimized integer data types


For details refer to the chapter "AUTOSAR Integer Data Types" of the document "Gen-
eral Requirements on Basic Software Modules" [4].
Examples of usage:
• Loop counters (e.g. maximum loop count = 124 ⇒ use uint8_least
• Switch case arguments (e.g. maximum number of states = 17 ⇒ use uint8_-
least

7.5 Boolean data type


[SWS_Platform_00027] dThe standard AUTOSAR type boolean shall be imple-
mented as an unsigned integer with a bit length that is the shortest one natively
supported by the platform (in general 8 bits).c(SRS_BSW_00378)
[SWS_Platform_00034] dThe standard AUTOSAR type boolean shall only be used
in conjunction with the standard symbols TRUE and FALSE. For value assignments of
variables of type boolean no arithmetic or logical operators (+, ++, -, --, *, /, %, <<,
>>, ~, &) must be used. The only allowed forms of assignment are:
1 boolean var = TRUE;
2 ...
3 var = TRUE;
4 var = FALSE;
5 var = (a < b) /* same for ">", "<=", ">=" */
6 var = (c && d) /* same for "!", "||" */
7 var = (e != f) /* same for "==" */

The only allowed forms of comparison are:


1 boolean var = FALSE;
2 ...

23 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

3 if (var == TRUE) ...


4 if (var == FALSE) ...
5 if (var != TRUE) ...
6 if (var != FALSE) ...
7 if (var) ...
8 if (!var) ...

c(SRS_BSW_00378)

7.6 Error classification


Section 7.2 "Error Handling" of the document "General Specification of Basic Software
Modules" [4] describes the error handling of the Basic Software in detail. Above all,
it constitutes a classification scheme consisting of five error types which may occur in
BSW modules.
Based on this foundation, the following section specifies particular errors arranged in
the respective subsections below.

7.6.1 Development Errors

There are no development errors.

7.6.2 Runtime Errors

There are no runtime errors.

7.6.3 Transient Faults

There are no transient faults.

7.6.4 Production Errors

There are no production errors.

7.6.5 Extended Production Errors

There are no extended production errors.

24 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

8 API specification

8.1 Imported types


Not applicable.

8.2 Type definitions


[SWS_Platform_00061] dConcerning the signed integer types, AUTOSAR supports
for compiler and target implementation only 2 complement arithmetic. This directly
impacts the chosen ranges for these types.c()

8.2.1 boolean

[SWS_Platform_00026] d
Name boolean
Kind Type
Range FALSE 0 –
TRUE 1 –
Description This standard AUTOSAR type shall only be used together with the definitions TRUE and FALSE.
Variation –
Available via Platform_Types.h

c(SRS_BSW_00378)
See [SWS_Platform_00027] for implementation and usage.
[SWS_Platform_00060] dThe boolean type shall always be mapped to a platform
specific type where pointers can be applied to in order to enable a passing of parame-
ters via API.There are specific BIT types of some HW platforms which are very efficient
but where no pointers can point to.c()

8.2.2 uint8

[SWS_Platform_00013] d

25 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Name uint8
Kind Type
Range 0..255 – 0x00..0xFF
Description This standard AUTOSAR type shall be of 8 bit unsigned.
Variation –
Available via Platform_Types.h

c(SRS_BSW_00304)

8.2.3 uint16

[SWS_Platform_00014] d
Name uint16
Kind Type
Range 0..65535 – 0x0000..0xFFFF
Description This standard AUTOSAR type shall be of 16 bit unsigned.
Variation –
Available via Platform_Types.h

c(SRS_BSW_00304)

8.2.4 uint32

[SWS_Platform_00015] d
Name uint32
Kind Type
Range 0..4294967295 – 0x00000000..0xFFFFFFFF
Description This standard AUTOSAR type shall be 32 bit unsigned.
Variation –
Available via Platform_Types.h

c(SRS_BSW_00304)

8.2.5 uint64

[SWS_Platform_00066] d

26 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Name uint64
Kind Type
Range 0..18446744073709551615 – 0x0000000000000000..0x
FFFFFFFFFFFFFFFF
Description This standard AUTOSAR type shall be 64 bit unsigned.
Variation –
Available via Platform_Types.h

c()

8.2.6 sint8

[SWS_Platform_00016] d
Name sint8
Kind Type
Range -128..+127 – 0x80..0x7F
Description This standard AUTOSAR type shall be of 8 bit signed.
Variation –
Available via Platform_Types.h

c(SRS_BSW_00304)

8.2.7 sint16

[SWS_Platform_00017] d
Name sint16
Kind Type
Range -32768..+32767 – 0x8000..0x7FFF
Description This standard AUTOSAR type shall be of 16 bit signed.
Variation –
Available via Platform_Types.h

c(SRS_BSW_00304)

8.2.8 sint32

[SWS_Platform_00018] d

27 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Name sint32
Kind Type
Range -2147483648..+2147483647 – 0x80000000..0x7FFFFFFF
Description This standard AUTOSAR type shall be 32 bit signed.
Variation –
Available via Platform_Types.h

c(SRS_BSW_00304)

8.2.9 sint64

[SWS_Platform_00067] d
Name sint64
Kind Type
Range -9223372036854775808 .. – 0x8000000000000000 ..
9223372036854775807 0x7FFFFFFFFFFFFFFF
Description This standard AUTOSAR type shall be 64 bit signed.
Variation –
Available via Platform_Types.h

c()

8.2.10 uint8_least

[SWS_Platform_00020] d
Name uint8_least
Kind Type
Derived from uint
Range At least 0..255 – 0x00..0xFF
Description This optimized AUTOSAR type shall be at least 8 bit unsigned.
Available via Platform_Types.h

c(SRS_BSW_00304)
See chapter 7.4 for implementation and usage.

8.2.11 uint16_least

[SWS_Platform_00021] d

28 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Name uint16_least
Kind Type
Derived from uint
Range At least 0..65535 – 0x0000..0xFFFF
Description This optimized AUTOSAR type shall be at least 16 bit unsigned.
Available via Platform_Types.h

c(SRS_BSW_00304)
See chapter 7.4 for implementation and usage.

8.2.12 uint32_least

[SWS_Platform_00022] d
Name uint32_least
Kind Type
Derived from uint
Range At least 0..4294967295 – 0x00000000..0xFFFFFFFF
Description This optimized AUTOSAR type shall be at least 32 bit unsigned.
Available via Platform_Types.h

c(SRS_BSW_00304)
See chapter 7.4 for implementation and usage.

8.2.13 sint8_least

[SWS_Platform_00023] d
Name sint8_least
Kind Type
Derived from sint
Range At least -128..+127 – 0x80..0x7F
Description This optimized AUTOSAR type shall be at least 8 bit signed.
Available via Platform_Types.h

c(SRS_BSW_00304)
See chapter 7.4 for implementation and usage.

29 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

8.2.14 sint16_least

[SWS_Platform_00024] d
Name sint16_least
Kind Type
Derived from sint
Range At least -32768..+32767 – 0x8000..0x7FFF
Description This optimized AUTOSAR type shall be at least 16 bit signed.
Available via Platform_Types.h

c(SRS_BSW_00304)
See chapter 7.4 for implementation and usage.

8.2.15 sint32_least

[SWS_Platform_00025] d
Name sint32_least
Kind Type
Derived from sint
Range At least – 0x80000000..0x7FFFFFFF
-2147483648..+2147483647
Description This optimized AUTOSAR type shall be at least 32 bit signed.
Available via Platform_Types.h

c(SRS_BSW_00304)
See chapter 7.4 for implementation and usage.

8.2.16 float32

[SWS_Platform_00041] d
Name float32
Kind Type
Range -3.4028235e+38 .. – –
+3.4028235e+38
Description This standard AUTOSAR type shall follow the 32-bit binary interchange format according to IEEE
754-2008 with encoding parameters specified in chapter 3.6, table 3.5, column "binary32".
Variation –
Available via Platform_Types.h

c()

30 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

8.2.17 float64

[SWS_Platform_00042] d
Name float64
Kind Type
Range -1.7976931348623157e+308 .. – –
+1.7976931348623157e+308
Description This standard AUTOSAR type shall follow the 64-bit binary interchange format according to IEEE
754-2008 with encoding parameters specified in chapter 3.6, table 3.5, column "binary64".
Available via Platform_Types.h

c()

8.2.18 VoidPtr

[SWS_Platform_91001] d
Name VoidPtr
Kind Pointer
Type void*
Description This standard AUTOSAR type shall be a void pointer
Note: This type shall be used for buffers that contain data returned to the caller.
Variation –
Available via Platform_Types.h

c()

8.2.19 ConstVoidPtr

[SWS_Platform_91002] d
Name ConstVoidPtr
Kind Const Pointer
Type const void*
Description This standard AUTOSAR type shall be a void pointer to const.
Note: This type shall be used for buffers that are passed to the callee.
Variation –
Available via Platform_Types.h

c()

31 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

8.3 Symbol definitions

8.3.1 CPU_TYPE

[SWS_Platform_00064] d
Name CPU_TYPE
Kind Enumeration
Range CPU_TYPE_8 – Indicating a 8 bit processor
CPU_TYPE_16 – Indicating a 16 bit processor
CPU_TYPE_32 – Indicating a 32 bit processor
CPU_TYPE_64 – Indicating a 64 bit processor
Description This symbol shall be defined as #define having one of the values CPU_TYPE_8, CPU_TYPE_16,
CPU_TYPE_32 or CPU_TYPE_64 according to the platform.
Available via Platform_Types.h

c()

8.3.2 CPU_BIT_ORDER

[SWS_Platform_00038] d
Name CPU_BIT_ORDER
Kind Enumeration
Range MSB_FIRST – The most significant bit is the first bit of the bit
sequence.
LSB_FIRST – The least significant bit is the first bit of the bit
sequence.
Description This symbol shall be defined as #define having one of the values MSB_FIRST or LSB_FIRST
according to the platform.
Available via Platform_Types.h

c()

8.3.3 CPU_BYTE_ORDER

[SWS_Platform_00039] d
Name CPU_BYTE_ORDER
Kind Enumeration
Range HIGH_BYTE_FIRST – Within uint16, the high byte is located before
the low byte.
5

32 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

4
LOW_BYTE_FIRST – Within uint16, the low byte is located before
the high byte.
Description This symbol shall be defined as #define having one of the values HIGH_BYTE_FIRST or LOW_
BYTE_FIRST according to the platform.
Available via Platform_Types.h

c()

8.3.4 TRUE, FALSE

[SWS_Platform_00056] d
Name TRUE_FALSE
Kind Enumeration
Range FALSE 0x00 –
TRUE 0x01 –
Description The symbols TRUE and FALSE shall be defined as follows:
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
Available via Platform_Types.h

c()
[SWS_Platform_00054] dIn case of in-built compiler support of the symbols, redefini-
tions shall be avoided using a conditional check.c()
[SWS_Platform_00055] dThese symbols shall only be used in conjunction with the
boolean type defined in Platform_Types.h.c()

8.4 Function definitions


Not applicable.

8.5 Call-back notifications


Not applicable.

33 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

8.6 Scheduled functions


Not applicable.

8.7 Expected Interfaces


Not applicable.

34 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

9 Sequence diagrams
Not applicable.

35 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

10 Configuration specification

10.1 Published parameters


For details refer to the chapter 10.3 "Published Information" in [4].

36 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

A Annex

A.1 Type definitions - general


The platform type files for all platforms could contain the following symbols:
1 #define CPU_TYPE_8 8
2 #define CPU_TYPE_16 16
3 #define CPU_TYPE_32 32
4 #define CPU_TYPE_64 64
5 #define MSB_FIRST 0
6 #define LSB_FIRST 1
7 #define HIGH_BYTE_FIRST 0
8 #define LOW_BYTE_FIRST 1

A.2 Type definitions - S12X


The platform types for Freescale S12X[7][8][9] could have the following mapping to the
ANSI C types:
Symbols:
1 #define CPU_TYPE CPU_TYPE_16
2 #define CPU_BIT_ORDER LSB_FIRST
3 #define CPU_BYTE_ORDER HIGH_BYTE_FIRST

Types:
1 typedef unsigned char boolean;
2 typedef signed char sint8;
3 typedef unsigned char uint8;
4 typedef signed short sint16;
5 typedef unsigned short uint16;
6 typedef signed long sint32;
7 typedef signed long long sint64;
8 typedef unsigned long uint32;
9 typedef unsigned long long uint64;
10 typedef signed char sint8_least;
11 typedef unsigned char uint8_least;
12 typedef signed short sint16_least;
13 typedef unsigned short uint16_least;
14 typedef signed long sint32_least;
15 typedef unsigned long uint32_least;
16 typedef float float32;
17 typedef double float64;

A.3 Type definitions - ST10


The platform types for ST Microelectronics ST10[10][11] could have the following map-
ping to the ANSI C types:

37 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

Symbols:
1 #define CPU_TYPE CPU_TYPE_16
2 #define CPU_BIT_ORDER LSB_FIRST
3 #define CPU_BYTE_ORDER LOW_BYTE_FIRST

Types:
1 typedef unsigned char boolean;
2 typedef signed char sint8;
3 typedef unsigned char uint8;
4 typedef signed short sint16;
5 typedef unsigned short uint16;
6 typedef signed long sint32;
7 typedef signed long long sint64;
8 typedef unsigned long uint32;
9 typedef unsigned long long uint64;
10 typedef unsigned short uint8_least;
11 typedef unsigned short uint16_least;
12 typedef unsigned long uint32_least;
13 typedef signed short sint8_least;
14 typedef signed short sint16_least;
15 typedef signed long sint32_least;
16 typedef float float32;
17 typedef double float64;

A.4 Type definitions - ST30


The platform types for STMicroelectronics ST30 could have the following mapping to
the ANSI C types:
Symbols:
1 #define CPU_TYPE CPU_TYPE_32
2 #define CPU_BIT_ORDER LSB_FIRST
3 #define CPU_BYTE_ORDER LOW_BYTE_FIRST

Types:
1 typedef unsigned char boolean;
2 typedef signed char sint8;
3 typedef unsigned char uint8;
4 typedef signed short sint16;
5 typedef unsigned short uint16;
6 typedef signed long sint32;
7 typedef signed long long sint64;
8 typedef unsigned long uint32;
9 typedef unsigned long long uint64;
10 typedef unsigned long uint8_least;
11 typedef unsigned long uint16_least;
12 typedef unsigned long uint32_least;
13 typedef signed long sint8_least;
14 typedef signed long sint16_least;
15 typedef signed long sint32_least;

38 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

16 typedef float float32;


17 typedef double float64;

A.5 Type definitions - V850


The platform types for NEC V850[12] could have the following mapping to the ANSI C
types:
Symbols:
1 #define CPU_TYPE CPU_TYPE_32
2 #define CPU_BIT_ORDER LSB_FIRST
3 #define CPU_BYTE_ORDER LOW_BYTE_FIRST

Types:
1 typedef unsigned char boolean;
2 typedef signed char sint8;
3 typedef unsigned char uint8;
4 typedef signed short sint16;
5 typedef unsigned short uint16;
6 typedef signed long sint32;
7 typedef signed long long sint64;
8 typedef unsigned long uint32;
9 typedef unsigned long long uint64;
10 typedef unsigned long uint8_least;
11 typedef unsigned long uint16_least;
12 typedef unsigned long uint32_least;
13 typedef signed long sint8_least;
14 typedef signed long sint16_least;
15 typedef signed long sint32_least;
16 typedef float float32;
17 typedef double float64;

A.6 Type definitions - MPC5554


The platform types for Freescale MPC5554[13][14] could have the following mapping
to the ANSI C types:
Symbols:
1 #define CPU_TYPE CPU_TYPE_32
2 #define CPU_BIT_ORDER MSB_FIRST
3 #define CPU_BYTE_ORDER HIGH_BYTE_FIRST

Types:
1 typedef unsigned char boolean;
2 typedef signed char sint8;
3 typedef unsigned char uint8;
4 typedef signed short sint16;

39 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

5 typedef unsigned short uint16;


6 typedef signed long sint32;
7 typedef signed long long sint64;
8 typedef unsigned long uint32;
9 typedef unsigned long long uint64;
10 typedef unsigned long uint8_least;
11 typedef unsigned long uint16_least;
12 typedef unsigned long uint32_least;
13 typedef signed long sint8_least;
14 typedef signed long sint16_least;
15 typedef signed long sint32_least;
16 typedef float float32;
17 typedef double float64;

A.7 Type definitions - TC1796/TC1766


The platform types for Infineon TC1796/TC1766[15] could have the following mapping
to the ANSI C types:
Symbols:
1 #define CPU_TYPE CPU_TYPE_32
2 #define CPU_BIT_ORDER LSB_FIRST
3 #define CPU_BYTE_ORDER LOW_BYTE_FIRST

Types:
1 typedef unsigned char boolean;
2 typedef signed char sint8;
3 typedef unsigned char uint8;
4 typedef signed short sint16;
5 typedef unsigned short uint16;
6 typedef signed long sint32;
7 typedef signed long long sint64;
8 typedef unsigned long uint32;
9 typedef unsigned long long uint64;
10 typedef unsigned long uint8_least;
11 typedef unsigned long uint16_least;
12 typedef unsigned long uint32_least;
13 typedef signed long sint8_least;
14 typedef signed long sint16_least;
15 typedef signed long sint32_least;
16 typedef float float32;
17 typedef double float64;

A.8 Type definitions - MB91F


The platform types for Fujitsu MB91F could have the following mapping to the ANSI C
types:
Symbols:

40 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

1 #define CPU_TYPE CPU_TYPE_32


2 #define CPU_BIT_ORDER LSB_FIRST
3 #define CPU_BYTE_ORDER HIGH_BYTE_FIRST

Types:
1 typedef unsigned char boolean;
2 typedef signed char sint8;
3 typedef unsigned char uint8;
4 typedef signed short sint16;
5 typedef unsigned short uint16;
6 typedef signed long sint32;
7 typedef signed long long sint64;
8 typedef unsigned long uint32;
9 typedef unsigned long long uint64;
10 typedef unsigned long uint8_least;
11 typedef unsigned long uint16_least;
12 typedef unsigned long uint32_least;
13 typedef signed long sint8_least;
14 typedef signed long sint16_least;
15 typedef signed long sint32_least;
16 typedef float float32;
17 typedef double float64;

A.9 Type definitions - M16C/M32C


The platform types for Renesas M16C and M32C could have the following mapping to
the ANSI C types:
Symbols:
1 #define CPU_TYPE CPU_TYPE_16
2 #define CPU_BIT_ORDER LSB_FIRST
3 #define CPU_BYTE_ORDER LOW_BYTE_FIRST

Types:
1 typedef unsigned char boolean;
2 typedef signed char sint8;
3 typedef unsigned char uint8;
4 typedef signed short sint16;
5 typedef unsigned short uint16;
6 typedef signed long sint32;
7 typedef signed long long sint64;
8 typedef unsigned long uint32;
9 typedef unsigned long long uint64;
10 typedef unsigned short uint8_least;
11 typedef unsigned short uint16_least;
12 typedef unsigned long uint32_least;
13 typedef signed short sint8_least;
14 typedef signed short sint16_least;
15 typedef signed long sint32_least;
16 typedef float float32;
17 typedef double float64;

41 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

A.10 Type definitions - SHx


The platform types for Renesas SHx could have the following mapping to the ANSI C
types:
Symbols:
1 #define CPU_TYPE CPU_TYPE_32
2 #define CPU_BIT_ORDER LSB_FIRST
3 #define CPU_BYTE_ORDER HIGH_BYTE_FIRST

Types:
1 typedef unsigned char boolean;
2 typedef signed char sint8;
3 typedef unsigned char uint8;
4 typedef signed short sint16;
5 typedef unsigned short uint16;
6 typedef signed int sint32;
7 typedef signed long long sint64;
8 typedef unsigned int uint32;
9 typedef unsigned long long uint64;
10 typedef unsigned long uint8_least;
11 typedef unsigned long uint16_least;
12 typedef unsigned long uint32_least;
13 typedef signed long sint8_least;
14 typedef signed long sint16_least;
15 typedef signed long sint32_least;
16 typedef float float32;
17 typedef double float64;

A.11 Type definitions - ARM Cortex A53


The platform types for ARM Cortex A53[16] in Little Endian could have the following
mapping to the ANSI C types:
Symbols:
1 #define CPU_TYPE CPU_TYPE_64
2 #define CPU_BIT_ORDER LSB_FIRST
3 #define CPU_BYTE_ORDER LOW_BYTE_FIRST

Types:
1 typedef unsigned char boolean;
2 typedef unsigned char uint8;
3 typedef unsigned short uint16;
4 typedef unsigned int uint32;
5 typedef unsigned long long uint64;
6 typedef signed char sint8;
7 typedef signed short sint16;
8 typedef signed int sint32;
9 typedef signed long long sint64;
10 typedef unsigned int uint8_least;

42 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

11 typedef unsigned int uint16_least;


12 typedef unsigned int uint32_least;
13 typedef signed int sint8_least;
14 typedef signed int sint16_least;
15 typedef signed int sint32_least;
16 typedef float float32;
17 typedef double float64;

43 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes


Specification of Platform Types
AUTOSAR CP R20-11

B Not applicable requirements


[SWS_Platform_00063] dThese requirements are not applicable to this specifica-
tion.c(SRS_BSW_00344, SRS_BSW_00404, SRS_BSW_00405, SRS_BSW_00345,
SRS_BSW_00159, SRS_BSW_00167, SRS_BSW_00171, SRS_BSW_00170, SRS_-
BSW_00419, SRS_BSW_00381, SRS_BSW_00412, SRS_BSW_00383, SRS_-
BSW_00384, SRS_BSW_00387, SRS_BSW_00388, SRS_BSW_00389, SRS_-
BSW_00390, SRS_BSW_00391, SRS_BSW_00392, SRS_BSW_00393, SRS_-
BSW_00394, SRS_BSW_00395, SRS_BSW_00396, SRS_BSW_00397, SRS_-
BSW_00398, SRS_BSW_00399, SRS_BSW_00400, SRS_BSW_00375, SRS_-
BSW_00101, SRS_BSW_00416, SRS_BSW_00406, SRS_BSW_00168, SRS_-
BSW_00407, SRS_BSW_00423, SRS_BSW_00429, SRS_BSW_00432, SRS_-
BSW_00336, SRS_BSW_00337, SRS_BSW_00338, SRS_BSW_00369, SRS_-
BSW_00339, SRS_BSW_00422, SRS_BSW_00420, SRS_BSW_00417, SRS_-
BSW_00323, SRS_BSW_00409, SRS_BSW_00385, SRS_BSW_00386, SRS_-
BSW_00161, SRS_BSW_00162, SRS_BSW_00005, SRS_BSW_00415, SRS_-
BSW_00164, SRS_BSW_00325, SRS_BSW_00326, SRS_BSW_00342, SRS_-
BSW_00343, SRS_BSW_00160, SRS_BSW_00007, SRS_BSW_00300, SRS_-
BSW_00413, SRS_BSW_00347, SRS_BSW_00305, SRS_BSW_00307, SRS_-
BSW_00310, SRS_BSW_00373, SRS_BSW_00327, SRS_BSW_00335, SRS_-
BSW_00350, SRS_BSW_00408, SRS_BSW_00410, SRS_BSW_00411, SRS_-
BSW_00346, SRS_BSW_00158, SRS_BSW_00314, SRS_BSW_00370, SRS_-
BSW_00348, SRS_BSW_00361, SRS_BSW_00301, SRS_BSW_00302, SRS_-
BSW_00328, SRS_BSW_00312, SRS_BSW_00357, SRS_BSW_00377, SRS_-
BSW_00355, SRS_BSW_00306, SRS_BSW_00308, SRS_BSW_00309, SRS_-
BSW_00371, SRS_BSW_00358, SRS_BSW_00414, SRS_BSW_00376, SRS_-
BSW_00359, SRS_BSW_00360, SRS_BSW_00329, SRS_BSW_00330, SRS_-
BSW_00331, SRS_BSW_00009, SRS_BSW_00401, SRS_BSW_00172, SRS_-
BSW_00010, SRS_BSW_00333, SRS_BSW_00374, SRS_BSW_00379, SRS_-
BSW_00321, SRS_BSW_00341, SRS_BSW_00334)

44 of 44 Document ID 48: AUTOSAR_SWS_PlatformTypes

You might also like