├── .devcontainer └── devcontainer.json ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug.yml │ ├── config.yml │ └── feature.yml ├── actions │ ├── add-label │ │ └── action.yml │ ├── build │ │ └── action.yml │ ├── check-branch-name │ │ ├── action.yml │ │ ├── check_branch_name.py │ │ └── requirements.txt │ ├── check-commit-message │ │ ├── action.yml │ │ ├── check_commit_message.py │ │ └── requirements.txt │ ├── get-issue-by-pull-request │ │ ├── action.yml │ │ ├── get_issue_id_from_pull_request.py │ │ └── requirements.txt │ ├── is-first-assigned │ │ ├── action.yml │ │ ├── check_first_assigned.py │ │ └── requirements.txt │ ├── remove-label │ │ └── action.yml │ └── test │ │ └── action.yml ├── dependabot.yml ├── pull_request_template.md └── workflows │ ├── devcontainer_update.yml │ ├── pull_request.yml │ ├── scheduled.yml │ └── workflow_issue_assigned.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── Dockerfile ├── LICENSE ├── Makefile ├── Makefile.variable ├── Release_Note.txt ├── autosar.code-workspace ├── software ├── application │ ├── CMakeLists.txt │ └── app_swc │ │ ├── CMakeLists.txt │ │ ├── core │ │ ├── main.c │ │ ├── tm4c123gh6pz.lds │ │ └── tm4c123gh6pz_startup_ccs_gcc.c │ │ ├── tests │ │ ├── stubs │ │ │ └── .gitkeep │ │ └── test_app_swc.c │ │ └── tools │ │ └── cmake │ │ ├── app_swc_compile.cmake │ │ └── app_swc_tests.cmake ├── bsw │ ├── CMakeLists.txt │ ├── cdd │ │ └── .gitkeep │ ├── com │ │ └── canif_swc │ │ │ ├── core │ │ │ ├── CanIf.h │ │ │ └── CanIf_Types.h │ │ │ ├── docs │ │ │ └── .gitkeep │ │ │ ├── tests │ │ │ └── unit │ │ │ │ └── stubs │ │ │ │ └── .gitkeep │ │ │ └── tools │ │ │ └── .gitkeep │ └── mcal │ │ ├── CMakeLists.txt │ │ ├── can_swc │ │ ├── CMakeLists.txt │ │ ├── core │ │ │ ├── Can.c │ │ │ └── Can.h │ │ ├── tests │ │ │ └── unit │ │ │ │ ├── stubs │ │ │ │ ├── .gitkeep │ │ │ │ ├── cmsis_gcc.h │ │ │ │ ├── stub.h │ │ │ │ └── test_can_swc_stubs.h │ │ │ │ ├── test_can_swc.c │ │ │ │ └── test_runners │ │ │ │ ├── all_tests.c │ │ │ │ └── can_Runner.c │ │ └── tools │ │ │ └── cmake │ │ │ ├── can_swc_compile.cmake │ │ │ └── can_swc_tests.cmake │ │ ├── dio_swc │ │ ├── CMakeLists.txt │ │ ├── core │ │ │ ├── Dio.c │ │ │ ├── Dio.h │ │ │ └── Dio_MemMap.h │ │ ├── tests │ │ │ └── unit │ │ │ │ ├── stubs │ │ │ │ └── stub_structure.h │ │ │ │ ├── test_dio_swc.c │ │ │ │ └── test_runners │ │ │ │ ├── test_main.c │ │ │ │ └── test_runner.c │ │ └── tools │ │ │ └── cmake │ │ │ ├── dio_swc_compile.cmake │ │ │ └── dio_swc_tests.cmake │ │ └── port_swc │ │ ├── CMakeLists.txt │ │ ├── core │ │ ├── Port.c │ │ ├── Port.h │ │ └── Port_MemMap.h │ │ ├── tests │ │ └── unit │ │ │ ├── test_port_swc.c │ │ │ └── test_runners │ │ │ ├── all_tests.c │ │ │ └── port_Runner.c │ │ └── tools │ │ └── cmake │ │ ├── port_swc_compile.cmake │ │ └── port_swc_tests.cmake ├── common │ ├── includes │ │ ├── Can_GeneralTypes.h │ │ ├── ComStack_Types.h │ │ ├── Compiler.h │ │ ├── MemMap.h │ │ ├── Platform_Types.h │ │ └── Std_Types.h │ ├── platform │ │ ├── BitHelper.h │ │ ├── Timer0A.c │ │ ├── Timer0A.h │ │ ├── can_lib.c │ │ ├── can_lib.h │ │ ├── cmsis_armcc.h │ │ ├── cmsis_armcc_V6.h │ │ ├── cmsis_ccs.h │ │ ├── cmsis_gcc.h │ │ ├── core_cm4.h │ │ ├── core_cmFunc.h │ │ ├── core_cmInstr.h │ │ ├── core_cmSimd.h │ │ ├── debug.h │ │ ├── hw_can.h │ │ ├── hw_ints.h │ │ ├── hw_memmap.h │ │ ├── hw_nvic.h │ │ ├── hw_sysctl.h │ │ ├── hw_types.h │ │ ├── irq.c │ │ ├── irq.h │ │ ├── qassert.h │ │ └── tm4c123gh6pm.h │ └── stubs │ │ ├── Dem.h │ │ ├── Dem_IntErrorId.h │ │ ├── Det.h │ │ ├── Os.h │ │ ├── Spi.h │ │ └── stub.c └── gendata │ ├── CanIf_Cbk.h │ ├── CanIf_Cfg.h │ ├── Can_Cfg.h │ ├── Can_PBcfg.c │ ├── Can_PBcfg.h │ ├── Dio_Cfg.h │ ├── Dio_Lcfg.c │ ├── EcuM_Cbk.h │ ├── Port_Cbkh.h │ ├── Port_Cfg.h │ ├── Port_Lcfg.c │ ├── Port_PBcfg.c │ ├── SchM_Can.h │ ├── SchM_Dio.h │ └── SchM_Port.h └── tools └── build ├── CMake ├── build_toolchain.cmake ├── cmockConfig.yml ├── test_toolchain.cmake └── user.cmake └── IDEs └── CCS ├── .ccsproject ├── .cproject └── .project /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "autosarz", 3 | "build": { 4 | "context": "..", 5 | "dockerfile": "../Dockerfile" 6 | }, 7 | "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached", 8 | "workspaceFolder": "/workspace", 9 | "features": { 10 | "ghcr.io/devcontainers-contrib/features/apt-packages:1": { 11 | "preserve_apt_list": true, 12 | "packages": "make file lsb-release cmake git aptitude gcc-multilib wget xz-utils ruby" 13 | } 14 | }, 15 | "customizations": { 16 | "vscode": { 17 | "extensions": [ 18 | "ms-vscode.cmake-tools", 19 | "github.vscode-github-actions", 20 | "dbaeumer.vscode-eslint", 21 | "eamodio.gitlens", 22 | "mhutchie.git-graph", 23 | "ms-vscode.cpptools" 24 | ] 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.txt text eol=lf 2 | *.c text eol=lf 3 | *.h text eol=lf 4 | *.cmake text eol=lf -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Report a bug. 3 | title: "[Bug]: " 4 | labels: ["bug"] 5 | projects: ["autosarzs"] 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | Thank you for taking the time to fill out this bug report! 11 | - type: input 12 | id: contact 13 | attributes: 14 | label: Contact Details 15 | description: How can we get in touch with you if we need more information? 16 | placeholder: e.g., email or Discord username 17 | validations: 18 | required: true 19 | - type: textarea 20 | id: describe-issue 21 | attributes: 22 | label: Describe the Issue 23 | description: Please provide detailed information,screenshots about the issue and steps to reproduce it. 24 | placeholder: Describe the issue you encountered 25 | value: "A bug occurred!" 26 | validations: 27 | required: true 28 | - type: dropdown 29 | id: env 30 | attributes: 31 | label: Environment 32 | description: What was your development environment? 33 | options: 34 | - Autosar devcontainer 35 | - Windows 36 | - Linux 37 | - macOS 38 | default: 0 39 | validations: 40 | required: true 41 | - type: textarea 42 | id: logs 43 | attributes: 44 | label: Relevant Log Output 45 | description: Please copy and paste any relevant log output. It will be automatically formatted into code, so there's no need for backticks. 46 | render: shell 47 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Facebook Group 4 | url: https://www.facebook.com/groups/754317328317348 5 | about: Join our Facebook group for project directions and updates. 6 | - name: Discord Channel 7 | url: https://discord.gg/jgVJCaaAPH 8 | about: Join our Discord server for discussions and announcements. 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.yml: -------------------------------------------------------------------------------- 1 | name: Feature 2 | description: Request a new feature. 3 | title: "[Feature Request]: " 4 | labels: ["feature"] 5 | projects: ["autosarzs"] 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | Thank you for taking the time to submit a feature request! 11 | - type: input 12 | id: contact 13 | attributes: 14 | label: Contact Details 15 | description: How can we get in touch with you if we need more information? 16 | placeholder: e.g., email or Discord username 17 | validations: 18 | required: true 19 | - type: textarea 20 | id: feature-request 21 | attributes: 22 | label: Description 23 | description: Please describe the new feature you'd like to request. 24 | placeholder: Describe the feature you envision 25 | value: "Feature ..." 26 | validations: 27 | required: true 28 | 29 | -------------------------------------------------------------------------------- /.github/actions/add-label/action.yml: -------------------------------------------------------------------------------- 1 | name: Assign Label Action 2 | description: Assign a label to an issue or pull request 3 | 4 | inputs: 5 | token: 6 | description: "Github Token" 7 | required: true 8 | 9 | number: 10 | description: 'The number of the issue or pull request to which the label will be added' 11 | required: true 12 | label: 13 | description: 'The label to be added to the issue' 14 | required: true 15 | 16 | runs: 17 | using: "composite" 18 | steps: 19 | - name: Assign label and assignee to issue 20 | id: assign-label 21 | shell: bash 22 | run: gh issue edit "$NUMBER" --add-label "$LABELS" 23 | env: 24 | GH_TOKEN: ${{ inputs.token }} 25 | GH_REPO: ${{ github.repository }} 26 | NUMBER: ${{ inputs.number }} 27 | LABELS: ${{ inputs.label }} 28 | -------------------------------------------------------------------------------- /.github/actions/build/action.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | runs: 4 | using: "composite" 5 | 6 | steps: 7 | # Run the build task inside the devcontainer 8 | - name: Run Build Stage 9 | uses: devcontainers/ci@v0.3 10 | with: 11 | cacheFrom: ghcr.io/${{ github.repository_owner }}/autosar-devcontainer 12 | push: never 13 | runCmd: make build 14 | 15 | # Copy artifacts from Docker container to host 16 | - name: Copy artifacts from Docker container to host 17 | shell: bash 18 | run: | 19 | CONTAINER_ID=$(docker ps --format "{{.ID}}" | head -n 1) 20 | mkdir -p ./artifacts 21 | docker cp $CONTAINER_ID:/workspace/tools/build/CMake/output/build ./artifacts 22 | ls -R ./artifacts 23 | 24 | # Upload build artifacts 25 | - name: Archive build artifacts 26 | uses: actions/upload-artifact@v4 27 | with: 28 | name: build-artifacts 29 | path: ./artifacts/build 30 | 31 | -------------------------------------------------------------------------------- /.github/actions/check-branch-name/action.yml: -------------------------------------------------------------------------------- 1 | name: Check Branch Name 2 | 3 | description: Check if branch name is valid 4 | 5 | runs: 6 | using: "composite" 7 | steps: 8 | 9 | - name: Run Python Script 10 | id: check_branch_name_script 11 | shell: bash 12 | run: | 13 | # Install dependencies 14 | pip install -r $GITHUB_ACTION_PATH/requirements.txt 15 | 16 | # Exec the sciprt 17 | output=$(python $GITHUB_ACTION_PATH/check_branch_name.py \ 18 | --branch_name "${{ github.event.pull_request.head.ref }}") 19 | 20 | # Print the whole script output for debugging 21 | echo "$output" 22 | -------------------------------------------------------------------------------- /.github/actions/check-branch-name/check_branch_name.py: -------------------------------------------------------------------------------- 1 | import re 2 | import argparse 3 | import sys 4 | 5 | 6 | def main(branch_name): 7 | try: 8 | # Check branch name format 9 | if not re.match(r"^issue_[0-9]+_[a-zA-Z0-9_-]{1,100}$", branch_name): 10 | print( 11 | "Branch names must follow the format 'issue__short_description' with a short description not exceeding 100 characters.", 12 | file=sys.stderr, 13 | ) 14 | print("Example: issue_15_canif_fix", file=sys.stderr) 15 | sys.exit(1) 16 | 17 | # Print result 18 | print(f"Branch name:{branch_name} is valid") 19 | 20 | except Exception as e: 21 | print(f"Error occurred while checking branch name: {e}", file=sys.stderr) 22 | sys.exit(1) 23 | 24 | 25 | if __name__ == "__main__": 26 | # Parse command-line arguments 27 | parser = argparse.ArgumentParser() 28 | parser.add_argument("--branch_name", help="Branch Name", required=True) 29 | args = parser.parse_args() 30 | 31 | # Call main function with parsed arguments 32 | main(args.branch_name) 33 | -------------------------------------------------------------------------------- /.github/actions/check-branch-name/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosarzs/Dev/927b7b675e4b117f4ce3d8c614df0adbdb8a067e/.github/actions/check-branch-name/requirements.txt -------------------------------------------------------------------------------- /.github/actions/check-commit-message/action.yml: -------------------------------------------------------------------------------- 1 | name: Check Commit Message 2 | 3 | description: Check if commit message is valid 4 | 5 | inputs: 6 | token: 7 | description: "Github Token" 8 | required: true 9 | 10 | runs: 11 | using: "composite" 12 | steps: 13 | 14 | - name: Run Python Script 15 | id: check_commit_message_script 16 | shell: bash 17 | run: | 18 | # Install dependencies 19 | pip install -r $GITHUB_ACTION_PATH/requirements.txt 20 | 21 | # Exec the script 22 | output=$(python $GITHUB_ACTION_PATH/check_commit_message.py \ 23 | --commits_url "${{ github.event.pull_request.commits_url }}" \ 24 | --token "${{ inputs.token }}") 25 | 26 | # Print the whole script output for debugging 27 | echo "$output" 28 | -------------------------------------------------------------------------------- /.github/actions/check-commit-message/check_commit_message.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import re 3 | import argparse 4 | import sys 5 | 6 | def main(commits_url, token): 7 | try: 8 | # Fetch commits from the pull request 9 | headers = {"Authorization": f"token {token}"} 10 | response = requests.get(commits_url + "?per_page=100", headers=headers) 11 | response.raise_for_status() 12 | commits = response.json() 13 | 14 | # Get the last commit message 15 | last_message = commits[-1]['commit']['message'] 16 | 17 | # Loop over each line of the commit message 18 | line_number = 1 19 | for line in last_message.split('\n'): 20 | # Check first line format 21 | if line_number == 1: 22 | if not re.match(r'^\[issue:#[0-9]+\] .{1,100}$', line): 23 | print("The first line of the commit message must start with '[issue:#]' followed by a description with a maximum of 100 characters.", file=sys.stderr) 24 | sys.exit(1) 25 | 26 | # Check empty line after the first line 27 | if line_number == 2 and line.strip() != "": 28 | print("The second line of the commit message must be empty.", file=sys.stderr) 29 | sys.exit(1) 30 | 31 | # Increment line number 32 | line_number += 1 33 | 34 | # Print result 35 | print(f"Commit with hash {commits[-1]['sha']} is valid") 36 | 37 | except Exception as e: 38 | print(f"Error occurred while checking commit message: {e}", file=sys.stderr) 39 | sys.exit(1) 40 | 41 | if __name__ == "__main__": 42 | # Parse command-line arguments 43 | parser = argparse.ArgumentParser() 44 | parser.add_argument("--commits_url", help="Pull Request Commits Url", required=True) 45 | parser.add_argument("--token", help="GitHub Token", required=True) 46 | args = parser.parse_args() 47 | 48 | # Call main function with parsed arguments 49 | main(args.commits_url, args.token) 50 | -------------------------------------------------------------------------------- /.github/actions/check-commit-message/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosarzs/Dev/927b7b675e4b117f4ce3d8c614df0adbdb8a067e/.github/actions/check-commit-message/requirements.txt -------------------------------------------------------------------------------- /.github/actions/get-issue-by-pull-request/action.yml: -------------------------------------------------------------------------------- 1 | name: Check Branch Name 2 | 3 | description: Check if branch name is valid 4 | 5 | outputs: 6 | issue_id: 7 | description: "Return Issue ID linked in pull request" 8 | value: ${{ steps.get_issue_id_script.outputs.issue_id }} 9 | 10 | runs: 11 | using: "composite" 12 | steps: 13 | 14 | - name: Run Python Script 15 | id: get_issue_id_script 16 | shell: bash 17 | run: | 18 | # Install dependencies 19 | pip install -r $GITHUB_ACTION_PATH/requirements.txt 20 | 21 | # Exec the sciprt 22 | output=$(python $GITHUB_ACTION_PATH/get_issue_id_from_pull_request.py \ 23 | --pull_request_body "${{ github.event.pull_request.body }}") 24 | 25 | # Print the whole script output for debugging 26 | echo "$output" 27 | 28 | # Extract the result of the script 29 | issue_id=$(echo "$output" | grep '^issue_id=') 30 | 31 | # Add the result to output buffer 32 | echo "$issue_id" >> $GITHUB_OUTPUT 33 | 34 | 35 | -------------------------------------------------------------------------------- /.github/actions/get-issue-by-pull-request/get_issue_id_from_pull_request.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import re 3 | import sys 4 | 5 | def extract_issue_id(pull_request_body): 6 | try: 7 | # Search for the issue ID using regex 8 | match = re.search(r'\*\*Issue ID:\*\* #(\d+)', pull_request_body) 9 | 10 | if match: 11 | issue_id = match.group(1) 12 | print(f"issue_id={issue_id}") 13 | else: 14 | print("Issue ID not found in the pull request body.", file=sys.stderr) 15 | print("Make sure you are using the pull request template.", file=sys.stderr) 16 | 17 | print(pull_request_body, file=sys.stderr) 18 | sys.exit(1) 19 | 20 | except Exception as e: 21 | print(f"Error occurred while extracting issue ID: {e}", file=sys.stderr) 22 | sys.exit(1) 23 | 24 | if __name__ == "__main__": 25 | # Parse command-line arguments 26 | parser = argparse.ArgumentParser() 27 | parser.add_argument("--pull_request_body", help="Pull Request Body Message", required=True) 28 | args = parser.parse_args() 29 | 30 | # Call the function to extract issue ID 31 | extract_issue_id(args.pull_request_body) 32 | -------------------------------------------------------------------------------- /.github/actions/get-issue-by-pull-request/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosarzs/Dev/927b7b675e4b117f4ce3d8c614df0adbdb8a067e/.github/actions/get-issue-by-pull-request/requirements.txt -------------------------------------------------------------------------------- /.github/actions/is-first-assigned/action.yml: -------------------------------------------------------------------------------- 1 | name: Check First Assignment 2 | 3 | description: Check if the issue is assigned for the first time 4 | 5 | inputs: 6 | pat_token: 7 | description: "PAT Token" 8 | required: true 9 | 10 | outputs: 11 | is_first_assignment: 12 | description: "Return True if issue is first assigned and False if not" 13 | value: ${{ steps.check_first_assgined_script.outputs.is_first_assignment }} 14 | 15 | runs: 16 | using: "composite" 17 | steps: 18 | 19 | - name: Run Python Script 20 | id: check_first_assgined_script 21 | shell: bash 22 | run: | 23 | # Install dependencies 24 | pip install -r $GITHUB_ACTION_PATH/requirements.txt 25 | 26 | # Exec the sciprt 27 | output=$(python $GITHUB_ACTION_PATH/check_first_assigned.py \ 28 | --repo "${{ github.repository }}" \ 29 | --issue "${{ github.event.issue.number }}" \ 30 | --token "${{ inputs.pat_token }}") 31 | 32 | # Print the whole script output for debugging 33 | echo "$output" 34 | 35 | # Extract the result of the script 36 | is_first_assignment=$(echo "$output" | grep '^is_first_assignment=') 37 | 38 | # Add the result to output buffer 39 | echo "$is_first_assignment" >> $GITHUB_OUTPUT -------------------------------------------------------------------------------- /.github/actions/is-first-assigned/check_first_assigned.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import sys 3 | import requests 4 | 5 | def main(repo_repository, issue_number, github_token): 6 | try: 7 | 8 | # GitHub API endpoint 9 | url = f"https://api.github.com/repos/{repo_repository}/issues/{issue_number}/timeline" 10 | 11 | # Headers for authentication 12 | headers = { 13 | "Authorization": f"Bearer {github_token}", 14 | "Accept": "application/vnd.github.mockingbird-preview+json" 15 | } 16 | 17 | # Send GET request to GitHub API 18 | response = requests.get(url, headers=headers) 19 | response.raise_for_status() 20 | 21 | # Extract timeline data from response 22 | timeline = response.json() 23 | 24 | # Count the number of "assigned" events 25 | assigned_count = sum(1 for event in timeline if event.get('event') == 'assigned') 26 | 27 | # Determine if it's the first assignment 28 | is_first_assignment = assigned_count == 1 29 | 30 | # Output the result 31 | print(f"is_first_assignment={is_first_assignment}") 32 | except requests.exceptions.RequestException as e: 33 | # Print error to stderr 34 | print(f"Error occurred while fetching issue timeline: {url} {headers} {repo_repository} {issue_number} {github_token} {e}", file=sys.stderr) 35 | sys.exit(1) 36 | 37 | if __name__ == "__main__": 38 | # Parse command-line arguments 39 | parser = argparse.ArgumentParser() 40 | parser.add_argument("--repo", help="Repository name", required=True) 41 | parser.add_argument("--issue", help="Issue number", required=True) 42 | parser.add_argument("--token", help="GitHub token", required=True) 43 | args = parser.parse_args() 44 | 45 | # Call main function with parsed arguments 46 | main(args.repo, args.issue, args.token) 47 | -------------------------------------------------------------------------------- /.github/actions/is-first-assigned/requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | -------------------------------------------------------------------------------- /.github/actions/remove-label/action.yml: -------------------------------------------------------------------------------- 1 | name: Remove Label Action 2 | description: Remove a label to an issue or pull request 3 | 4 | inputs: 5 | token: 6 | description: "Github Token" 7 | required: true 8 | 9 | number: 10 | description: 'The number of the issue or pull request to which the label will be removed from' 11 | required: true 12 | label: 13 | description: 'The label to be removed from the issue' 14 | required: true 15 | 16 | runs: 17 | using: "composite" 18 | steps: 19 | - name: Remove label from issue 20 | id: remove-label 21 | shell: bash 22 | run: gh issue edit "$NUMBER" --remove-label "$LABELS" 23 | env: 24 | GH_TOKEN: ${{ inputs.token }} 25 | GH_REPO: ${{ github.repository }} 26 | NUMBER: ${{ inputs.number }} 27 | LABELS: ${{ inputs.label }} 28 | -------------------------------------------------------------------------------- /.github/actions/test/action.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | runs: 4 | using: "composite" 5 | 6 | steps: 7 | # Run the build task inside the devcontainer 8 | - name: Run test stage 9 | uses: devcontainers/ci@v0.3 10 | with: 11 | cacheFrom: ghcr.io/${{ github.repository_owner }}/autosar-devcontainer 12 | push: never 13 | runCmd: make unit_test 14 | 15 | # Copy artifacts from Docker container to host 16 | - name: Copy artifacts from Docker container to host 17 | shell: bash 18 | run: | 19 | CONTAINER_ID=$(docker ps --format "{{.ID}}" | head -n 1) 20 | mkdir -p ./artifacts 21 | docker cp $CONTAINER_ID:/workspace/tools/build/CMake/output/tests/unit ./artifacts 22 | ls -R ./artifacts 23 | 24 | # Upload test artifacts 25 | - name: Archive test artifacts 26 | uses: actions/upload-artifact@v4 27 | with: 28 | name: test-artifacts 29 | path: ./artifacts/unit 30 | 31 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for more information: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | # https://containers.dev/guide/dependabot 6 | 7 | version: 2 8 | updates: 9 | - package-ecosystem: "devcontainers" 10 | directory: "/" 11 | schedule: 12 | interval: weekly 13 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | Please include a brief description of the changes introduced by this pull request. 4 | 5 | **Issue ID:** #[Issue ID] 6 | 7 | --- 8 | 9 | **Please Note:** 10 | 11 | If there's a relevant issue for this pull request, please link it above. 12 | 13 | If no issue exists: 14 | - For a new feature, please create a feature request issue using [Bug Report](https://github.com/autosarzs/Dev/issues/new?assignees=autosarzs&labels=development&projects=autosarzs&template=feature.yml&title=%5BFeature+Request%5D%3A+). 15 | - For a bug, please create a bug report issue using [Feature Request](https://github.com/autosarzs/Dev/issues/new?assignees=autosarzs&labels=bug&projects=autosarzs&template=bug.yml&title=%5BBug%5D%3A+). 16 | 17 | --- 18 | 19 | ### Checklist 20 | 21 | - [ ] The issue ID is linked to this pull request 22 | -------------------------------------------------------------------------------- /.github/workflows/devcontainer_update.yml: -------------------------------------------------------------------------------- 1 | name: Update Devcontainer 2 | 3 | on: workflow_dispatch 4 | 5 | jobs: 6 | push-container: 7 | runs-on: ubuntu-22.04 8 | steps: 9 | - name: Checkout code 10 | uses: actions/checkout@v4 11 | 12 | - name: Login to GitHub Container Registry 13 | uses: docker/login-action@v3 14 | with: 15 | registry: ghcr.io 16 | username: ${{ github.repository_owner }} 17 | password: ${{ secrets.GITHUB_TOKEN }} 18 | 19 | - name: Build and push Dev Container 20 | uses: devcontainers/ci@v0.3 21 | with: 22 | imageName: ghcr.io/${{ github.repository_owner }}/autosar-devcontainer 23 | push: always 24 | -------------------------------------------------------------------------------- /.github/workflows/pull_request.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened, synchronize] 6 | branches: 7 | - main 8 | 9 | jobs: 10 | sanity-check: 11 | runs-on: ubuntu-22.04 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | with: 17 | fetch-depth: 0 18 | 19 | - name: Remove needs-review label to the pull request 20 | uses: ./.github/actions/remove-label 21 | with: 22 | token: ${{ secrets.GITHUB_TOKEN }} 23 | number: ${{ github.event.number }} 24 | label: "needs-review" 25 | 26 | - name: Check Branch Name 27 | uses: ./.github/actions/check-branch-name 28 | 29 | - name: Check Commit Messages 30 | uses: ./.github/actions/check-commit-message 31 | with: 32 | token: ${{ secrets.GITHUB_TOKEN }} 33 | 34 | build: 35 | runs-on: ubuntu-22.04 36 | needs: sanity-check 37 | 38 | steps: 39 | - name: Checkout code 40 | uses: actions/checkout@v4 41 | with: 42 | fetch-depth: 0 43 | 44 | - name: Build 45 | uses: ./.github/actions/build 46 | 47 | test: 48 | runs-on: ubuntu-22.04 49 | needs: sanity-check 50 | 51 | steps: 52 | - name: Checkout code 53 | uses: actions/checkout@v4 54 | with: 55 | fetch-depth: 0 56 | submodules: 'recursive' 57 | 58 | - name: Test 59 | uses: ./.github/actions/test 60 | 61 | run-pull-request-workflow: 62 | runs-on: ubuntu-22.04 63 | needs: [sanity-check, build, test] 64 | 65 | steps: 66 | 67 | - name: Checkout code 68 | uses: actions/checkout@v4 69 | with: 70 | fetch-depth: 0 71 | 72 | - name: Get Pull Request linked Issue Number 73 | id: get_issue_by_pull_request 74 | uses: ./.github/actions/get-issue-by-pull-request 75 | 76 | - name: Get issue project id from issue number 77 | uses: monry/actions-get-project-item-id@v2.0.2 78 | id: get-project-item-id 79 | with: 80 | github-token: ${{ secrets.PAT }} 81 | project-owner: ${{ github.repository_owner }} 82 | project-number: ${{ vars.PROJECT_NUMBER }} 83 | issue-repository: ${{ github.repository_owner }}/Dev 84 | issue-number: ${{ steps.get_issue_by_pull_request.outputs.issue_id }} 85 | 86 | - name: Update issue to in review 87 | uses: titoportas/update-project-fields@v0.1.0 88 | with: 89 | project-url: https://github.com/users/${{ github.repository_owner }}/projects/${{ vars.PROJECT_NUMBER }} 90 | github-token: ${{ secrets.PAT }} 91 | item-id: ${{ steps.get-project-item-id.outputs.project-item-id }} 92 | field-keys: Status 93 | field-values: In Review 94 | 95 | - name: Add needs-review label to the pull request 96 | uses: ./.github/actions/add-label 97 | with: 98 | token: ${{ secrets.GITHUB_TOKEN }} 99 | number: ${{ github.event.number }} 100 | label: "needs-review" 101 | -------------------------------------------------------------------------------- /.github/workflows/scheduled.yml: -------------------------------------------------------------------------------- 1 | name: Scheduled Build 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-22.04 11 | steps: 12 | - name: Checkout code 13 | uses: actions/checkout@v4 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Build 18 | uses: ./.github/actions/build 19 | 20 | test: 21 | runs-on: ubuntu-22.04 22 | steps: 23 | - name: Checkout code 24 | uses: actions/checkout@v4 25 | with: 26 | fetch-depth: 0 27 | submodules: 'recursive' 28 | 29 | - name: Test 30 | uses: ./.github/actions/test -------------------------------------------------------------------------------- /.github/workflows/workflow_issue_assigned.yml: -------------------------------------------------------------------------------- 1 | name: Issue Assigned Workflow 2 | on: 3 | issues: 4 | types: [assigned] 5 | 6 | jobs: 7 | issue-assigned: 8 | runs-on: ubuntu-22.04 9 | steps: 10 | 11 | - name: Checkout code 12 | uses: actions/checkout@v4 13 | 14 | - name: Is First Assigned 15 | id: check_first_assigned 16 | uses: ./.github/actions/is-first-assigned 17 | with: 18 | pat_token: ${{ secrets.PAT }} 19 | 20 | - name: Get Issue Item ID 21 | if: steps.check_first_assigned.outputs.is_first_assignment == 'True' 22 | id: add-project 23 | uses: actions/add-to-project@v1.0.1 24 | with: 25 | project-url: https://github.com/users/${{ github.repository_owner }}/projects/${{ vars.PROJECT_NUMBER }} 26 | github-token: ${{ secrets.PAT }} 27 | 28 | - name: Update Issue Workflow 29 | if: steps.check_first_assigned.outputs.is_first_assignment == 'True' 30 | uses: titoportas/update-project-fields@v0.1.0 31 | with: 32 | project-url: https://github.com/users/${{ github.repository_owner }}/projects/${{ vars.PROJECT_NUMBER }} 33 | github-token: ${{ secrets.PAT }} 34 | item-id: ${{ steps.add-project.outputs.itemId }} 35 | field-keys: Status 36 | field-values: Assigned -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tools/build/CMake/Build/ 2 | tools/build/CMake/Test/ 3 | tools/build/CMake/output 4 | .vscode/settings.json 5 | .vscode/c_cpp_properties.json 6 | Testing 7 | tools/build/IDEs/CCS/Debug 8 | 9 | *.prefs 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "wiki"] 2 | path = wiki 3 | url = https://github.com/autosarzs/Dev.wiki.git 4 | branch = master 5 | [submodule "tools/frameworks/CMock"] 6 | path = tools/frameworks/CMock 7 | url = https://github.com/ThrowTheSwitch/CMock.git 8 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(autosarz) 4 | 5 | include(CTest) 6 | include("${CMAKE_PROJECT_DIR}/user.cmake") 7 | 8 | # Building BSW 9 | add_subdirectory("${bsw_dir}") 10 | 11 | # Building Application 12 | add_subdirectory("${app_swc}") 13 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:22.04 2 | 3 | # Avoid stuck at console asking for input 4 | ARG DEBIAN_FRONTEND=noninteractive 5 | 6 | # Install compiler and other tools 7 | RUN apt-get update && \ 8 | apt-get install -y \ 9 | make \ 10 | cmake \ 11 | lsb-release \ 12 | git \ 13 | file \ 14 | aptitude \ 15 | gcc-multilib \ 16 | python3 \ 17 | python3-pip \ 18 | wget \ 19 | xz-utils \ 20 | ruby \ 21 | && rm -rf /var/lib/apt/lists/* \ 22 | && pip3 install junit2html 23 | 24 | # Download Linaro GCC compiler 25 | RUN wget -c https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-eabi/gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi.tar.xz --no-check-certificate 26 | 27 | # Extract Linaro GCC compiler into a folder inside /opt/compilers 28 | RUN mkdir -p /opt/compilers/gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi && \ 29 | tar xf gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi.tar.xz -C /opt/compilers/gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi --strip-components=1 && \ 30 | rm gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi.tar.xz 31 | 32 | # Install gcovr tool 33 | RUN pip install gcovr==7.2 34 | 35 | # Set the default command 36 | CMD ["/bin/bash"] 37 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include Makefile.variable 2 | 3 | 4 | ############################################################################## 5 | # Shell Colors # 6 | ############################################################################## 7 | UND=\e[4m 8 | CUR=\e[3m 9 | NC=\033[0m 10 | 11 | ERROR=\033[0;31m 12 | INFO=\033[32m 13 | WARNING=\033[92m 14 | HEADRS=$(UND)$(CUR) 15 | 16 | ############################################################################## 17 | # Build # 18 | ############################################################################## 19 | 20 | CMAKE_BUILD_VARIABLES = 21 | CMAKE_BUILD_VARIABLES += -DCMAKE_TOOLCHAIN_FILE=$(CMAKE_PROJECT_DIR)/build_toolchain.cmake 22 | CMAKE_BUILD_VARIABLES += -DTOOLCHAIN_DIR=$(TOOLCHAIN_DIR) 23 | CMAKE_BUILD_VARIABLES += -DCMAKE_PROJECT_DIR=$(CMAKE_PROJECT_DIR) 24 | CMAKE_BUILD_VARIABLES += -DSW_DIR=$(SW_DIR) 25 | CMAKE_BUILD_VARIABLES += -DMODE=COMPILING 26 | 27 | build: 28 | ifeq ($(rebuild),1) 29 | -@rm -rf $(BUILD_DIR) 30 | endif 31 | @mkdir -p $(BUILD_DIR) 32 | @echo "BUILD_DIR=$(BUILD_DIR)" 33 | cd $(BUILD_DIR)/ && \ 34 | cmake -S $(CURDIR) -B $(BUILD_DIR) $(CMAKE_BUILD_VARIABLES) ;\ 35 | make app_swc install -j$(MAXIMUM_CPU_CORES) 36 | 37 | ############################################################################## 38 | # Test # 39 | ############################################################################## 40 | 41 | CMAKE_TEST_VARIABLES = 42 | CMAKE_TEST_VARIABLES += -DCMAKE_TOOLCHAIN_FILE=$(CMAKE_PROJECT_DIR)/test_toolchain.cmake 43 | CMAKE_TEST_VARIABLES += -DCMAKE_PROJECT_DIR=$(CMAKE_PROJECT_DIR) 44 | CMAKE_TEST_VARIABLES += -DSW_DIR=$(SW_DIR) 45 | CMAKE_TEST_VARIABLES += -DMODE=TESTING 46 | CMAKE_TEST_VARIABLES += -DBUILD_TESTS_DIR=$(BUILD_TESTS_DIR) 47 | 48 | 49 | # Test directories 50 | TEST_DIRS := $(wildcard $(BUILD_TESTS_DIR)/software/*/*/*) 51 | 52 | # Find test programs 53 | TEST_PROGRAMS := $(foreach dir,$(TEST_DIRS),$(wildcard $(dir)/*_test)) 54 | 55 | 56 | unit_test: 57 | ifeq ($(rebuild),1) 58 | -@rm -rf $(BUILD_TESTS_DIR) 59 | -@rm -rf $(UNIT_TESTS_INSTALL_DIR) 60 | endif 61 | @rm -f $(UNIT_TESTS_INSTALL_DIR)/test_results.txt 62 | @make check_dependencies 63 | @make build_test 64 | @make test 65 | @make coverage 66 | @echo "" 67 | @echo "${HEADRS}--------- TEST SUMMERY -------${NC}" 68 | @ruby $(UNITY_ROOT)/auto/parse_output.rb -xml $(UNIT_TESTS_INSTALL_DIR)/test_results.txt 69 | @mv $(WORKSPACE_DIR)/report.xml $(UNIT_TESTS_INSTALL_DIR)/test_results.xml 70 | 71 | 72 | ############################################################################## 73 | # Build Test files # 74 | ############################################################################## 75 | build_test: 76 | @mkdir -p $(BUILD_TESTS_DIR) 77 | @echo "BUILD_DIR=$(BUILD_TESTS_DIR)" 78 | cd $(BUILD_TESTS_DIR)/ && \ 79 | cmake -S $(CURDIR) -B $(BUILD_TESTS_DIR) $(CMAKE_TEST_VARIABLES) ;\ 80 | make -j$(MAXIMUM_CPU_CORES) ; 81 | 82 | 83 | test: $(TEST_PROGRAMS) 84 | @echo "" 85 | @echo "${HEADRS}Running all test programs${NC}" 86 | @echo "" 87 | @mkdir -p $(UNIT_TESTS_INSTALL_DIR) 88 | @for program in $^; do \ 89 | echo "-----------------------";\ 90 | echo "Running $$program"; \ 91 | $$program -v | sed -E 's#.*\.c:[0-9]+:TEST\(([^)]+)\)#TEST(\1)#g; s#/workspace/software/bsw/mcal/unity_swc/tests/##g' | tee -a $(UNIT_TESTS_INSTALL_DIR)/test_results.txt; \ 92 | done; 93 | 94 | ############################################################################## 95 | # Check Dependencies # 96 | ############################################################################## 97 | check_dependencies: 98 | @ruby --version ;\ 99 | if [ $$? -ne 0 ]; \ 100 | then \ 101 | make error_msg ;\ 102 | false; \ 103 | fi 104 | 105 | @gcovr --version ;\ 106 | if [ $$? -ne 0 ]; \ 107 | then \ 108 | make error_msg ;\ 109 | false ; \ 110 | fi 111 | 112 | error_msg: 113 | @echo "--------------------------------------------------------------------------------------------------------------------------------" 114 | @echo "${ERROR}Your dev container run out of data.${NC}" 115 | @echo "--------------------------------------" 116 | @echo " 1. Remove the Docker container using the command: ${INFO}docker rm -f mycontainer $(shell cat /etc/hostname)${NC}" 117 | @echo "If any of the above steps fail, please check your setup and try again." 118 | @echo "--------------------------------------------------------------------------------------------------------------------------------" 119 | 120 | ############################################################################## 121 | # Coverage # 122 | ############################################################################## 123 | # Search Path 124 | GCOVR_INCLUDE_PATHS := '.*/core/.*' 125 | # Options: {green,blue,github.blue,github.green,github.dark-green,github.dark-blue} 126 | HTML_THEME ?= github.green 127 | 128 | coverage: 129 | @echo "" 130 | @echo "${HEADRS}Generate Coverage Reports${NC}" 131 | @echo "" 132 | @mkdir -p $(UNIT_TESTS_INSTALL_DIR)/html 133 | @cd $(WORKSPACE_DIR) ;\ 134 | gcovr -r . --filter ${GCOVR_INCLUDE_PATHS} \ 135 | --html-self-contained \ 136 | --html-theme ${HTML_THEME} \ 137 | --html-nested \ 138 | --cobertura \ 139 | --html=$(UNIT_TESTS_INSTALL_DIR)/html/test_report.html \ 140 | --xml=$(UNIT_TESTS_INSTALL_DIR)/test_report.xml \ 141 | -j$(MAXIMUM_CPU_CORES); 142 | 143 | ############################################################################## 144 | # help # 145 | ############################################################################## 146 | help: 147 | @echo "" 148 | @echo "${HEADRS}Available targets:${NC}" 149 | @echo " build - Generate executable files for the target MCU." 150 | @echo " unit_test - Run unit tests of project components." 151 | @echo " build_test - Sub-process from ${HEADRS}unit_test${NC} to build test files only." 152 | @echo " test - Sub-process from ${HEADRS}unit_test${NC} to execute pre-built test files." 153 | @echo " coverage - Sub-process from ${HEADRS}unit_test${NC} to generate coverage files only." 154 | @echo "" 155 | @echo "${HEADRS}Available Options:${NC}" 156 | @echo " rebuild=1 - It will rebuild whole project (valid for build and unit_test only)." 157 | @echo " - ${HEADRS}Options${NC}: {0,1}" 158 | @echo " - ${HEADRS}Defailt Value${NC}: 0" 159 | @echo "" 160 | @echo " HTML_THEME=green - It will generate html with selected theme (valid for coverage and unit_test only)." 161 | @echo " - ${HEADRS}Options${NC}: {green,blue,github.blue,github.green,github.dark-green,github.dark-blue}" 162 | @echo " - ${HEADRS}Defailt Value${NC}: github.green" 163 | @echo "" 164 | @echo "${HEADRS}Use${NC}: make ${INFO} ...${NC} " 165 | @echo "" 166 | 167 | 168 | all: build unit_test 169 | 170 | .PHONY: build unit_test test all check_dependencies coverage 171 | -------------------------------------------------------------------------------- /Makefile.variable: -------------------------------------------------------------------------------- 1 | 2 | #################################### 3 | # Get the directory of the Makefile 4 | #################################### 5 | WORKSPACE_DIR := $(CURDIR) 6 | #################################### 7 | # Define Common Macros 8 | #################################### 9 | MAXIMUM_CPU_CORES?=$(shell grep -c ^processor /proc/cpuinfo) 10 | COMPILER_NAME=gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi 11 | #################################### 12 | # Define Common Dirs 13 | #################################### 14 | SW_DIR= $(WORKSPACE_DIR)/software 15 | TOOLS_DIR= $(WORKSPACE_DIR)/tools 16 | CMAKE_PROJECT_DIR = $(TOOLS_DIR)/build/CMake 17 | BUILD_DIR = $(CMAKE_PROJECT_DIR)/Build 18 | BUILD_TESTS_DIR = $(CMAKE_PROJECT_DIR)/Test 19 | INSTALL_DIR = $(CMAKE_PROJECT_DIR)/output 20 | BINARY_INSTALL_DIR = $(INSTALL_DIR)/build 21 | TESTS_INSTALL_DIR = $(INSTALL_DIR)/tests 22 | UNIT_TESTS_INSTALL_DIR = $(TESTS_INSTALL_DIR)/unit 23 | COMPILER_DIR=/opt/compilers 24 | TOOLCHAIN_DIR=$(COMPILER_DIR)/$(COMPILER_NAME) 25 | CMOCK_DIR = $(TOOLS_DIR)/frameworks/CMock 26 | UNITY_ROOT= $(CMOCK_DIR)/vendor/unity 27 | #################################### -------------------------------------------------------------------------------- /Release_Note.txt: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Release_Note.txt ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2020-11-1 ** 18 | ** ** 19 | ** VARIANT : ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** ** 29 | *******************************************************************************/ 30 | 31 | MAJOR_RELEASE_NUMBER = 01 32 | MINOR_RELEASE_NUMBER = 01 33 | MILESTONE_TAG = Can Module Milestone 34 | TAG_NAME = Eng01Dev01 35 | -------------------------------------------------------------------------------- /autosar.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ] 7 | } -------------------------------------------------------------------------------- /software/application/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | 4 | # building bsw 5 | message( STATUS "Building Application") -------------------------------------------------------------------------------- /software/application/app_swc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # CMake Version Check 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | # Project 5 | project(app_swc 6 | LANGUAGES C CXX 7 | VERSION "1.0.0" 8 | DESCRIPTION "app_swc") 9 | 10 | 11 | ############################################################################## 12 | # Include Common Compilation Settings # 13 | ############################################################################## 14 | 15 | include(tools/cmake/app_swc_compile.cmake) 16 | 17 | ############################################################################## 18 | # Build Configuration # 19 | ############################################################################## 20 | 21 | # Compilation Mode: Only build the library 22 | 23 | if(MODE STREQUAL "COMPILING") 24 | add_executable(app_swc ${app_swc_sources_list}) 25 | target_compile_options(app_swc PRIVATE ${app_swc_compile_options}) 26 | target_include_directories(app_swc PRIVATE ${app_swc_includes}) 27 | target_compile_definitions(app_swc PRIVATE ${app_swc_defines}) 28 | target_link_libraries(app_swc PRIVATE ${app_swc_libs}) 29 | 30 | # Installation 31 | install( PROGRAMS $ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ DESTINATION ${CMAKE_BINARY_DIR}/../output/build RENAME autosar_app.out) 32 | install( FILES $.map DESTINATION ${CMAKE_BINARY_DIR}/../output/build RENAME autosar_app.map ) 33 | 34 | elseif (MODE STREQUAL "TESTING") 35 | include(tools/cmake/app_swc_tests.cmake) 36 | add_executable(app_swc_test ${app_swc_tests_sources_list}) 37 | endif() 38 | 39 | -------------------------------------------------------------------------------- /software/application/app_swc/core/tm4c123gh6pz.lds: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Default Linker script for the Texas Instruments TM4C123GH6PZ 4 | * 5 | * This is derived from revision 15071 of the TivaWare Library. 6 | * 7 | *****************************************************************************/ 8 | 9 | MEMORY 10 | { 11 | FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x00040000 12 | SRAM (WX) : ORIGIN = 0x20000000, LENGTH = 0x00008000 13 | } 14 | 15 | REGION_ALIAS("REGION_TEXT", FLASH); 16 | REGION_ALIAS("REGION_BSS", SRAM); 17 | REGION_ALIAS("REGION_DATA", SRAM); 18 | REGION_ALIAS("REGION_STACK", SRAM); 19 | REGION_ALIAS("REGION_HEAP", SRAM); 20 | REGION_ALIAS("REGION_ARM_EXIDX", FLASH); 21 | REGION_ALIAS("REGION_ARM_EXTAB", FLASH); 22 | 23 | SECTIONS { 24 | 25 | PROVIDE (_intvecs_base_address = 0x0); 26 | 27 | .intvecs (_intvecs_base_address) : AT (_intvecs_base_address) { 28 | KEEP (*(.intvecs)) 29 | } > REGION_TEXT 30 | 31 | PROVIDE (_vtable_base_address = 0x20000000); 32 | 33 | .vtable (_vtable_base_address) : AT (_vtable_base_address) { 34 | KEEP (*(.vtable)) 35 | } > REGION_DATA 36 | 37 | .text : { 38 | CREATE_OBJECT_SYMBOLS 39 | *(.text) 40 | *(.text.*) 41 | . = ALIGN(0x4); 42 | KEEP (*(.ctors)) 43 | . = ALIGN(0x4); 44 | KEEP (*(.dtors)) 45 | . = ALIGN(0x4); 46 | __init_array_start = .; 47 | KEEP (*(.init_array*)) 48 | __init_array_end = .; 49 | *(.init) 50 | *(.fini*) 51 | } > REGION_TEXT 52 | 53 | PROVIDE (__etext = .); 54 | PROVIDE (_etext = .); 55 | PROVIDE (etext = .); 56 | 57 | .rodata : { 58 | *(.rodata) 59 | *(.rodata*) 60 | } > REGION_TEXT 61 | 62 | .data : ALIGN (4) { 63 | __data_load__ = LOADADDR (.data); 64 | __data_start__ = .; 65 | *(.data) 66 | *(.data*) 67 | . = ALIGN (4); 68 | __data_end__ = .; 69 | } > REGION_DATA AT> REGION_TEXT 70 | 71 | .ARM.exidx : { 72 | __exidx_start = .; 73 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) 74 | __exidx_end = .; 75 | } > REGION_ARM_EXIDX 76 | 77 | .ARM.extab : { 78 | *(.ARM.extab* .gnu.linkonce.armextab.*) 79 | } > REGION_ARM_EXTAB 80 | 81 | .bss : { 82 | __bss_start__ = .; 83 | *(.shbss) 84 | *(.bss) 85 | *(.bss.*) 86 | *(COMMON) 87 | . = ALIGN (4); 88 | __bss_end__ = .; 89 | } > REGION_BSS 90 | 91 | __end__ = .; 92 | 93 | .heap : { 94 | __heap_start__ = .; 95 | end = __heap_start__; 96 | _end = end; 97 | __end = end; 98 | KEEP(*(.heap)) 99 | __heap_end__ = .; 100 | __HeapLimit = __heap_end__; 101 | } > REGION_HEAP 102 | 103 | .stack : ALIGN(0x8) { 104 | _stack = .; 105 | __stack = .; 106 | KEEP(*(.stack)) 107 | } > REGION_STACK 108 | } 109 | -------------------------------------------------------------------------------- /software/application/app_swc/tests/stubs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosarzs/Dev/927b7b675e4b117f4ce3d8c614df0adbdb8a067e/software/application/app_swc/tests/stubs/.gitkeep -------------------------------------------------------------------------------- /software/application/app_swc/tests/test_app_swc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /software/application/app_swc/tools/cmake/app_swc_compile.cmake: -------------------------------------------------------------------------------- 1 | set( 2 | app_swc_sources_list 3 | 4 | ${app_swc}/core/main.c 5 | ${app_swc}/core/tm4c123gh6pz_startup_ccs_gcc.c 6 | ${stubs}/stub.c 7 | ${platform}/can_lib.c 8 | ${platform}/irq.c 9 | ${platform}/Timer0A.c 10 | ) 11 | 12 | set( 13 | app_swc_includes 14 | 15 | ${app_swc}/core 16 | ${can_swc}/core 17 | ${gendata} 18 | 19 | ${common_includes} 20 | ${platform} 21 | ${stubs} 22 | ) 23 | 24 | 25 | set( 26 | app_swc_compile_options 27 | ) 28 | 29 | set( 30 | app_swc_defines 31 | ) 32 | 33 | 34 | set( 35 | app_swc_libs 36 | 37 | "can_swc" 38 | "port_swc" 39 | "dio_swc" 40 | "-T ${app_swc}/core/tm4c123gh6pz.lds" 41 | ) 42 | 43 | -------------------------------------------------------------------------------- /software/application/app_swc/tools/cmake/app_swc_tests.cmake: -------------------------------------------------------------------------------- 1 | set( 2 | app_swc_tests_sources_list 3 | 4 | ${app_swc}/tests/test_app_swc.c 5 | ) 6 | 7 | set( 8 | app_swc_tests_includes 9 | ) 10 | 11 | set( 12 | app_swc_tests_compile_options 13 | ) 14 | 15 | set( 16 | app_swc_tests_defines 17 | ) 18 | -------------------------------------------------------------------------------- /software/bsw/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | # building bsw 5 | message( STATUS "Building BSW") 6 | 7 | # building mcal 8 | add_subdirectory("${mcal_dir}") 9 | -------------------------------------------------------------------------------- /software/bsw/cdd/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosarzs/Dev/927b7b675e4b117f4ce3d8c614df0adbdb8a067e/software/bsw/cdd/.gitkeep -------------------------------------------------------------------------------- /software/bsw/com/canif_swc/core/CanIf.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : CanIf ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-10-20 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Interface source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Inteface, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #ifndef __CANIF_H__ 36 | #define __CANIF_H__ 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | #endif /* __CANIF_H__ */ -------------------------------------------------------------------------------- /software/bsw/com/canif_swc/core/CanIf_Types.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : CanIf_Types ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-10-20 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Interface source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Inteface, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #ifndef __CANIF_TYPES_H__ 36 | #define __CANIF_TYPES_H__ 37 | 38 | /* Module Version 1.0.0 */ 39 | #define CANIF_TYPES_SW_MAJOR_VERSION (1U) 40 | #define CANIF_TYPES_SW_MINOR_VERSION (0U) 41 | #define CANIF_TYPES_SW_PATCH_VERSION (0U) 42 | 43 | /* AUTOSAR Version 4.3.1 */ 44 | #define CANIF_TYPES_AR_RELEASE_MAJOR_VERSION (4U) 45 | #define CANIF_TYPES_AR_RELEASE_MINOR_VERSION (3U) 46 | #define CANIF_TYPES_AR_RELEASE_PATCH_VERSION (1U) 47 | 48 | #include "ComStack_Types.h" 49 | /* AUTOSAR checking between ComStack_Types and CanIf_Types Modules */ 50 | #if ((COMSTACK_TYPES_AR_RELEASE_MAJOR_VERSION != CANIF_TYPES_AR_RELEASE_MAJOR_VERSION)\ 51 | || (COMSTACK_TYPES_AR_RELEASE_MINOR_VERSION != CANIF_TYPES_AR_RELEASE_MINOR_VERSION)\ 52 | || (COMSTACK_TYPES_AR_RELEASE_PATCH_VERSION != CANIF_TYPES_AR_RELEASE_PATCH_VERSION)) 53 | #error "The AR version of ComStack_Types.h does not match the expected version" 54 | #endif 55 | 56 | #include "Can_GeneralTypes.h" 57 | /* AUTOSAR checking between Can_GeneralTypes and CanIf_Types Modules */ 58 | #if ((CAN_GENERAL_TYPES_AR_RELEASE_MAJOR_VERSION != CANIF_TYPES_AR_RELEASE_MAJOR_VERSION)\ 59 | || (CAN_GENERAL_TYPES_AR_RELEASE_MINOR_VERSION != CANIF_TYPES_AR_RELEASE_MINOR_VERSION)\ 60 | || (CAN_GENERAL_TYPES_AR_RELEASE_PATCH_VERSION != CANIF_TYPES_AR_RELEASE_PATCH_VERSION)) 61 | #error "The AR version of Can_GeneralTypes.h does not match the expected version" 62 | #endif 63 | 64 | #include "Std_Types.h" 65 | /* AUTOSAR checking between Std_Types and CanIf_Types Modules */ 66 | #if ((STD_TYPES_AR_RELEASE_MAJOR_VERSION != CANIF_TYPES_AR_RELEASE_MAJOR_VERSION)\ 67 | || (STD_TYPES_AR_RELEASE_MINOR_VERSION != CANIF_TYPES_AR_RELEASE_MINOR_VERSION)\ 68 | || (STD_TYPES_AR_RELEASE_PATCH_VERSION != CANIF_TYPES_AR_RELEASE_PATCH_VERSION)) 69 | #error "The AR version of Std_Types.h does not match the expected version" 70 | #endif 71 | 72 | /* 73 | [SWS_CANIF_00144] 74 | This type defines a data structure for the post build parameters of the CAN 75 | interface for all underlying CAN drivers. At initialization the CanIf gets a 76 | pointer to a structure of this type to get access to its configuration data, which 77 | is necessary for initialization. 78 | The contents of the initialization data structure are CAN interface specific 79 | */ 80 | typedef struct CanIf_Config 81 | { 82 | 83 | }CanIf_ConfigType; 84 | 85 | /* 86 | [SWS_CANIF_00137] 87 | The PduMode of a channel defines its transmit or receive activity. 88 | Communication direction (transmission and/or reception) of the channel can 89 | be controlled separately or together by upper layers. 90 | CANIF_OFFLINE: Transmit and receive path of the corresponding channel are disabled => no communication mode 91 | CANIF_TX_OFFLINE: Transmit path of the corresponding channel is disabled. The receive path is enabled. 92 | CANIF_TX_OFFLINE_ACTIVE: Transmit path of the corresponding channel is in offline active mode (see SWS_CANIF_00072). 93 | The receive path is disabled. This mode requires CanIfTxOfflineActiveSupport = TRUE 94 | CANIF_ONLINE: Transmit and receive path of the corresponding channel are enabled => full operation mode 95 | */ 96 | typedef uint8 CanIf_PduModeType; 97 | #define CANIF_OFFLINE ((CanIf_PduModeType) 0x00U) 98 | #define CANIF_TX_OFFLINE ((CanIf_PduModeType) 0x01U) 99 | #define CANIF_TX_OFFLINE_ACTIVE ((CanIf_PduModeType) 0x02U) 100 | #define CANIF_ONLINE ((CanIf_PduModeType) 0x03U) 101 | 102 | /* 103 | [SWS_CANIF_00201] 104 | Return value of CAN L-PDU notification status 105 | CANIF_NO_NOTIFICATION: No transmit or receive event occurred for the requested L-PDU 106 | CANIF_TX_RX_NOTIFICATION: The requested Rx/Tx CAN L-PDU was successfully transmitted or received. 107 | */ 108 | typedef uint8 CanIf_NotifStatusType; 109 | #define CANIF_NO_NOTIFICATION ((CanIf_NotifStatusType) 0x00U) 110 | #define CANIF_TX_RX_NOTIFICATION ((CanIf_NotifStatusType) 0x01U) 111 | 112 | #endif /*__CANIF_TYPES_H__*/ 113 | -------------------------------------------------------------------------------- /software/bsw/com/canif_swc/docs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosarzs/Dev/927b7b675e4b117f4ce3d8c614df0adbdb8a067e/software/bsw/com/canif_swc/docs/.gitkeep -------------------------------------------------------------------------------- /software/bsw/com/canif_swc/tests/unit/stubs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosarzs/Dev/927b7b675e4b117f4ce3d8c614df0adbdb8a067e/software/bsw/com/canif_swc/tests/unit/stubs/.gitkeep -------------------------------------------------------------------------------- /software/bsw/com/canif_swc/tools/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosarzs/Dev/927b7b675e4b117f4ce3d8c614df0adbdb8a067e/software/bsw/com/canif_swc/tools/.gitkeep -------------------------------------------------------------------------------- /software/bsw/mcal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | 3 | # building mcal 4 | message( STATUS "Building MCAL") 5 | 6 | add_subdirectory("${can_swc}") 7 | add_subdirectory("${port_swc}") 8 | add_subdirectory("${dio_swc}") 9 | -------------------------------------------------------------------------------- /software/bsw/mcal/can_swc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # CMake Version Check 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | # Project 5 | project(can_swc 6 | LANGUAGES C CXX 7 | VERSION "1.0.0" 8 | DESCRIPTION "can_swc") 9 | 10 | ############################################################################## 11 | # Include Common Compilation Settings # 12 | ############################################################################## 13 | 14 | include(tools/cmake/can_swc_compile.cmake) 15 | 16 | ############################################################################## 17 | # Build Configuration # 18 | ############################################################################## 19 | 20 | # Compilation Mode: Only build the library 21 | 22 | # CMake Version Check 23 | cmake_minimum_required(VERSION 3.14) 24 | 25 | # Project 26 | project(can_swc 27 | LANGUAGES C CXX 28 | VERSION "1.0.0" 29 | DESCRIPTION "can_swc") 30 | 31 | ############################################################################## 32 | # Extract Module Path in build/CMake/Test/ # 33 | ############################################################################## 34 | extract_module_path(can_swc MOCK_FILE_PATH) 35 | 36 | ############################################################################## 37 | # Include Common Compilation Settings # 38 | ############################################################################## 39 | 40 | include(tools/cmake/can_swc_compile.cmake) 41 | 42 | ############################################################################## 43 | # Build Configuration # 44 | ############################################################################## 45 | 46 | # Compilation Mode: Only build the library 47 | 48 | 49 | if(MODE STREQUAL "COMPILING") 50 | add_library(can_swc ${can_swc_sources_list}) 51 | target_compile_options(can_swc PRIVATE ${can_swc_compile_options}) 52 | target_include_directories(can_swc PRIVATE ${can_swc_includes}) 53 | target_compile_definitions(can_swc PRIVATE ${can_swc_defines}) 54 | elseif (MODE STREQUAL "TESTING") 55 | include(tools/cmake/can_swc_tests.cmake) 56 | add_library(can_swc ${can_swc_ut_sources_list}) 57 | target_compile_options(can_swc PRIVATE ${can_swc_tests_compile_options}) 58 | target_include_directories(can_swc PRIVATE ${can_swc_tests_includes}) 59 | target_compile_definitions(can_swc PRIVATE ${can_swc_tests_defines}) 60 | endif() 61 | 62 | 63 | if(MODE STREQUAL "TESTING") 64 | # Execute CMock script 65 | execute_process( 66 | COMMAND ruby ${CMOCK_SCRIPT} -o${CMOCK_CONFIG_FILE} ${can_swc_mock_header_files} 67 | OUTPUT_VARIABLE CMOCK_OUTPUT 68 | WORKING_DIRECTORY ${MOCK_FILE_PATH} # /workspace/tools/build/CMake/Test/software/bsw/mcal/can_swc 69 | ) 70 | message("CMock output: ${CMOCK_OUTPUT}") 71 | 72 | # Testing Mode: Build the library and test executable 73 | add_executable(can_swc_test ${can_swc_tests_sources_list} ${unity_common_sources}) 74 | target_compile_definitions(can_swc_test PRIVATE ${can_swc_tests_defines}) 75 | target_compile_options(can_swc_test PRIVATE ${can_swc_tests_compile_options}) 76 | target_include_directories(can_swc_test PRIVATE ${can_swc_tests_includes} ${unity_common_includes}) 77 | target_link_libraries(can_swc_test PRIVATE can_swc) 78 | endif() 79 | -------------------------------------------------------------------------------- /software/bsw/mcal/can_swc/tests/unit/stubs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/autosarzs/Dev/927b7b675e4b117f4ce3d8c614df0adbdb8a067e/software/bsw/mcal/can_swc/tests/unit/stubs/.gitkeep -------------------------------------------------------------------------------- /software/bsw/mcal/can_swc/tests/unit/stubs/cmsis_gcc.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef __CMSIS_GCC_H 4 | #define __CMSIS_GCC_H 5 | 6 | 7 | #endif /* __CMSIS_GCC_H */ 8 | -------------------------------------------------------------------------------- /software/bsw/mcal/can_swc/tests/unit/stubs/stub.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Stub.c ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Driver source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #include "Std_Types.h" 36 | #include "ComStack_Types.h" 37 | #include "CanIf_Cbk.h" 38 | 39 | 40 | void CanIf_TxConfirmation(PduIdType CanTxPduId); 41 | 42 | void CanIf_ControllerModeIndication( uint8 ControllerId, Can_ControllerStateType ControllerMode ); 43 | /** 44 | * \brief This callout function is called whenever a CAN message is 45 | * received in CAN driver. 46 | */ 47 | void CanIf_RxIndication 48 | ( 49 | const Can_HwType * Mailbox, 50 | const PduInfoType * PduInfoPtr 51 | ); 52 | 53 | void CanIf_ControllerBusOff(uint8 ControllerId); 54 | 55 | 56 | -------------------------------------------------------------------------------- /software/bsw/mcal/can_swc/tests/unit/stubs/test_can_swc_stubs.h: -------------------------------------------------------------------------------- 1 | 2 | #include "Std_Types.h" 3 | 4 | void irq_Enable(void); 5 | 6 | void irq_Disable(void); 7 | 8 | void __DSB(void); 9 | 10 | void __NOP(void); -------------------------------------------------------------------------------- /software/bsw/mcal/can_swc/tests/unit/test_can_swc.c: -------------------------------------------------------------------------------- 1 | #include "Can.h" 2 | #include "unity.h" 3 | #include "unity_fixture.h" 4 | #include "mock_Det.h" 5 | #include "mock_stub.h" 6 | #include "mock_can_lib.h" 7 | #include "mock_test_can_swc_stubs.h" 8 | 9 | /**********CALLBACKS *****************/ 10 | Std_ReturnType Det_ReportError_CALLBACK(uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId) 11 | { 12 | (void)ModuleId; 13 | (void)InstanceId; 14 | (void)ApiId; 15 | (void)ErrorId; 16 | return E_OK; 17 | } 18 | /***********TESTS*************/ 19 | TEST_GROUP(can_swc); 20 | 21 | TEST_SETUP(can_swc) 22 | { 23 | mock_Det_Init(); 24 | mock_stub_Init(); 25 | mock_stub_Init(); 26 | mock_can_lib_Init(); 27 | mock_test_can_swc_stubs_Init(); 28 | } 29 | 30 | TEST_TEAR_DOWN(can_swc) 31 | { 32 | mock_Det_Verify(); 33 | mock_Det_Destroy(); 34 | mock_stub_Verify(); 35 | mock_stub_Destroy(); 36 | mock_can_lib_Verify(); 37 | mock_can_lib_Destroy(); 38 | mock_test_can_swc_stubs_Verify(); 39 | mock_test_can_swc_stubs_Destroy(); 40 | } 41 | 42 | TEST(can_swc, CAN_TEST_PASS) 43 | { 44 | TEST_MESSAGE("\n ------- FORCE PASS SCENARIO ----------\n"); 45 | TEST_ASSERT_EQUAL(1,1); 46 | } 47 | TEST(can_swc, CAN_TEST_FAIL) 48 | { 49 | TEST_MESSAGE("\n ------- FORCE FAIL SCENARIO ----------\n"); 50 | TEST_ASSERT_EQUAL(1,-1); 51 | } -------------------------------------------------------------------------------- /software/bsw/mcal/can_swc/tests/unit/test_runners/all_tests.c: -------------------------------------------------------------------------------- 1 | #include "unity_fixture.h" 2 | 3 | static void RunAllTests(void) 4 | { 5 | RUN_TEST_GROUP(can_swc); 6 | } 7 | 8 | int main(int argc, const char * argv[]) 9 | { 10 | return UnityMain(argc, argv, RunAllTests); 11 | } 12 | -------------------------------------------------------------------------------- /software/bsw/mcal/can_swc/tests/unit/test_runners/can_Runner.c: -------------------------------------------------------------------------------- 1 | #include "unity.h" 2 | #include "unity_fixture.h" 3 | 4 | TEST_GROUP_RUNNER(can_swc) 5 | { 6 | RUN_TEST_CASE(can_swc, CAN_TEST_PASS); 7 | RUN_TEST_CASE(can_swc, CAN_TEST_FAIL); 8 | } -------------------------------------------------------------------------------- /software/bsw/mcal/can_swc/tools/cmake/can_swc_compile.cmake: -------------------------------------------------------------------------------- 1 | set( 2 | can_swc_sources_list 3 | 4 | ${can_swc}/core/Can.c 5 | ${gendata}/Can_PBcfg.c 6 | 7 | ) 8 | 9 | set( 10 | can_swc_includes 11 | 12 | ${can_swc}/core 13 | 14 | ${gendata} 15 | ${platform} 16 | ${common_includes} 17 | ${stubs} 18 | ) 19 | 20 | set( 21 | can_swc_compile_options 22 | ) 23 | 24 | set( 25 | can_swc_defines 26 | ) 27 | -------------------------------------------------------------------------------- /software/bsw/mcal/can_swc/tools/cmake/can_swc_tests.cmake: -------------------------------------------------------------------------------- 1 | set( 2 | can_swc_tests_sources_list 3 | 4 | ${can_swc}/tests/unit/test_can_swc.c 5 | # /workspace/software/bsw/mcal/can_swc/ 6 | ${MOCK_FILE_PATH}/mocks/mock_Det.c 7 | ${MOCK_FILE_PATH}/mocks/mock_stub.c 8 | ${MOCK_FILE_PATH}/mocks/mock_can_lib.c 9 | ${MOCK_FILE_PATH}/mocks/mock_test_can_swc_stubs.c 10 | # Include Test Runners 11 | ${can_swc}/tests/unit/test_runners/can_Runner.c 12 | ${can_swc}/tests/unit/test_runners/all_tests.c 13 | ) 14 | 15 | set( 16 | can_swc_ut_sources_list 17 | 18 | ${can_swc}/core/Can.c 19 | ${gendata}/Can_PBcfg.c 20 | ) 21 | 22 | set ( 23 | can_swc_mock_header_files 24 | 25 | ${stubs}/Det.h 26 | ${can_swc}/tests/unit/stubs/stub.h 27 | ${platform}/can_lib.h 28 | ${can_swc}/tests/unit/stubs/test_can_swc_stubs.h 29 | ) 30 | 31 | # Create a list of all files in ${platform}/inc 32 | file(GLOB PLATFORM_INCLUDES "${platform}/*.h") 33 | 34 | # Create a temporary directory to store the filtered header files 35 | set(filtered_platform_includes "${CMAKE_CURRENT_BINARY_DIR}/filtered_include") 36 | 37 | # Create the temporary directory 38 | file(MAKE_DIRECTORY ${filtered_platform_includes}) 39 | 40 | # Iterate over each file in the list 41 | foreach(file ${PLATFORM_INCLUDES}) 42 | # Get the file name 43 | get_filename_component(filename ${file} NAME) 44 | 45 | # Check if the file is not cmsis_gcc.h 46 | if(NOT filename MATCHES "cmsis_gcc\\.h$") 47 | # Copy the file to the temporary directory 48 | file(COPY ${file} DESTINATION ${filtered_platform_includes}) 49 | endif() 50 | endforeach() 51 | 52 | set( 53 | can_swc_tests_includes 54 | 55 | ${can_swc}/core 56 | ${can_swc}/tests/unit/stubs 57 | ${MOCK_FILE_PATH}/mocks 58 | ${gendata} 59 | 60 | ${common_includes} 61 | ${filtered_platform_includes} 62 | ${stubs} 63 | 64 | ) 65 | set( 66 | can_swc_tests_compile_options 67 | ) 68 | 69 | set( 70 | can_swc_tests_defines 71 | ) 72 | -------------------------------------------------------------------------------- /software/bsw/mcal/dio_swc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # CMake Version Check 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | # Project 5 | project(dio_swc 6 | LANGUAGES C CXX 7 | VERSION "1.0.0" 8 | DESCRIPTION "dio_swc") 9 | 10 | ############################################################################## 11 | # Extract Module Path in build/CMake/Test/ # 12 | ############################################################################## 13 | extract_module_path(dio_swc MOCK_FILE_PATH) 14 | 15 | ############################################################################## 16 | # Include Common Compilation Settings # 17 | ############################################################################## 18 | include(tools/cmake/dio_swc_compile.cmake) 19 | 20 | ############################################################################## 21 | # Build Configuration # 22 | ############################################################################## 23 | 24 | # Compilation Mode: Only build the library 25 | 26 | if(MODE STREQUAL "COMPILING") 27 | add_library(dio_swc ${dio_swc_sources_list}) 28 | target_compile_options(dio_swc PRIVATE ${dio_swc_compile_options}) 29 | target_include_directories(dio_swc PRIVATE ${dio_swc_includes}) 30 | target_compile_definitions(dio_swc PRIVATE ${dio_swc_defines}) 31 | elseif (MODE STREQUAL "TESTING") 32 | include(tools/cmake/dio_swc_tests.cmake) 33 | add_library(dio_swc ${dio_swc_ut_sources_list}) 34 | target_compile_options(dio_swc PRIVATE ${dio_swc_tests_compile_options}) 35 | target_include_directories(dio_swc PRIVATE ${dio_swc_tests_includes}) 36 | target_compile_definitions(dio_swc PRIVATE ${dio_swc_tests_defines}) 37 | endif() 38 | 39 | if(MODE STREQUAL "TESTING") 40 | # Execute CMock script 41 | execute_process( 42 | COMMAND ruby ${CMOCK_SCRIPT} -o${CMOCK_CONFIG_FILE} ${dio_swc_mock_header_files} 43 | OUTPUT_VARIABLE CMOCK_OUTPUT 44 | WORKING_DIRECTORY ${MOCK_FILE_PATH} # /workspace/tools/build/CMake/Test/software/bsw/mcal/dio_swc 45 | ) 46 | message("CMock output: ${CMOCK_OUTPUT}") 47 | 48 | # Testing Mode: Build the library and test executable 49 | add_executable(dio_swc_test ${dio_swc_tests_sources_list} ${unity_common_sources}) 50 | target_compile_definitions(dio_swc_test PRIVATE ${dio_swc_tests_defines}) 51 | target_compile_options(dio_swc_test PRIVATE ${dio_swc_tests_compile_options}) 52 | target_include_directories(dio_swc_test PRIVATE ${dio_swc_tests_includes} ${unity_common_includes}) 53 | target_link_libraries(dio_swc_test PRIVATE ${dio_swc_tests_libs}) 54 | endif() 55 | -------------------------------------------------------------------------------- /software/bsw/mcal/dio_swc/core/Dio_MemMap.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Dio_MemMap.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2024-04-17 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : DIO Memory Mapping for Tiva C ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of DIO Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | #ifndef DIO_MEM_MAP_H_ 37 | #define DIO_MEM_MAP_H_ 38 | 39 | /*******************************************************************************/ 40 | /* Include headers */ 41 | /*******************************************************************************/ 42 | 43 | #endif /* DIO_MEM_MAP_H_ */ 44 | -------------------------------------------------------------------------------- /software/bsw/mcal/dio_swc/tests/unit/stubs/stub_structure.h: -------------------------------------------------------------------------------- 1 | #include "stdint.h" 2 | #include "Port.h" 3 | 4 | 5 | typedef struct 6 | { /*port Structure*/ 7 | int32_t RESERVED0[255]; 8 | uint32_t DATA; /*port Data*/ 9 | uint32_t DIR; /*port Direction*/ 10 | uint32_t IS; /*port Interrupt Sense*/ 11 | uint32_t IBE; /*port Interrupt Both Edges*/ 12 | uint32_t IEV; /*port Interrupt Event*/ 13 | uint32_t IM; /*port Interrupt Mask*/ 14 | uint32_t RIS; /*port Raw Interrupt Status*/ 15 | uint32_t MIS; /*port Masked Interrupt Status*/ 16 | int32_t ICR; /*port Interrupt Clear*/ 17 | uint32_t AFSEL; /*port Alternate Function Select*/ 18 | int32_t RESERVED1[55]; 19 | uint32_t DR2R; /*port 2-mA Drive Select*/ 20 | uint32_t DR4R; /*port 4-mA Drive Select*/ 21 | uint32_t DR8R; /*port 8-mA Drive Select*/ 22 | uint32_t ODR; /*port Open Drain Select*/ 23 | uint32_t PUR; /*port Pull-Up Select*/ 24 | uint32_t PDR; /*port Pull-Down Select*/ 25 | uint32_t SLR; /*port Slew Rate Control Select*/ 26 | uint32_t DEN; /*port Digital Enable*/ 27 | uint32_t LOCK; /*port Lock*/ 28 | int32_t CR; /*port Commit*/ 29 | uint32_t AMSEL; /*port Analog Mode Select*/ 30 | uint32_t PCTL; /*port Port Control*/ 31 | uint32_t ADCCTL; /*port ADC Control*/ 32 | uint32_t DMACTL; /*port DMA Control*/ 33 | } Port_Type; 34 | 35 | uint32_t PORTA_VAR = 0 ; 36 | uint32_t PORTB_VAR = 0 ; 37 | uint32_t PORTC_VAR = 0 ; 38 | uint32_t PORTD_VAR = 0 ; 39 | uint32_t PORTE_VAR = 0 ; 40 | uint32_t PORTF_VAR = 0 ; 41 | 42 | #define PORTA &PORTA_VAR 43 | #define PORTB &PORTB_VAR 44 | #define PORTC &PORTC_VAR 45 | #define PORTD &PORTD_VAR 46 | #define PORTE &PORTE_VAR 47 | #define PORTF &PORTF_VAR 48 | 49 | 50 | /* Define the base addresses of the ports */ 51 | Port_Type *portBaseAddresses[] = { 52 | PORTA, 53 | PORTB, 54 | PORTC, 55 | PORTD, 56 | PORTE, 57 | PORTF}; 58 | -------------------------------------------------------------------------------- /software/bsw/mcal/dio_swc/tests/unit/test_dio_swc.c: -------------------------------------------------------------------------------- 1 | #include "Dio.h" 2 | #include "unity.h" 3 | #include "unity_fixture.h" 4 | #include "mock_Det.h" 5 | #include "stub_structure.h" 6 | TEST_GROUP(dio_swc); 7 | 8 | TEST_SETUP(dio_swc) 9 | { 10 | } 11 | 12 | TEST_TEAR_DOWN(dio_swc) 13 | { 14 | } 15 | 16 | TEST(dio_swc, test_Dio_ReadChannel_OutOfRange) 17 | { 18 | Dio_LevelType ret ; 19 | Dio_ChannelType ChannelId = DIO_CONFIGURED_CHANNLES+1; 20 | Det_ReportError_ExpectAndReturn(DIO_MODULE_ID, 21 | DIO_INSTANCE_ID, 22 | DIO_READ_CHANNEL_SID, 23 | DIO_E_PARAM_INVALID_CHANNEL_ID,E_OK); 24 | ret = Dio_ReadChannel(ChannelId); 25 | TEST_ASSERT_EQUAL(STD_OFF,ret); 26 | } 27 | 28 | TEST(dio_swc, test_Dio_GetVersionInfo_ValidVersionInfo) 29 | { 30 | // Define a Std_VersionInfoType structure to hold version information 31 | Std_VersionInfoType versionInfo; 32 | 33 | // Call the function with a valid pointer to versionInfo 34 | Dio_GetVersionInfo(&versionInfo); 35 | 36 | // Check if the versionInfo structure is correctly filled 37 | TEST_ASSERT_EQUAL(0, versionInfo.vendorID); 38 | TEST_ASSERT_EQUAL(DIO_MODULE_ID, versionInfo.moduleID); 39 | TEST_ASSERT_EQUAL(DIO_INSTANCE_ID, versionInfo.instanceID); 40 | TEST_ASSERT_EQUAL(DIO_CFG_SW_MAJOR_VERSION, versionInfo.sw_major_version); 41 | TEST_ASSERT_EQUAL(DIO_CFG_SW_MINOR_VERSION, versionInfo.sw_minor_version); 42 | TEST_ASSERT_EQUAL(DIO_CFG_SW_PATCH_VERSION, versionInfo.sw_patch_version); 43 | TEST_ASSERT_EQUAL(DIO_CFG_AR_RELEASE_MAJOR_VERSION, versionInfo.ar_major_version); 44 | TEST_ASSERT_EQUAL(DIO_CFG_AR_RELEASE_MINOR_VERSION, versionInfo.ar_minor_version); 45 | TEST_ASSERT_EQUAL(DIO_CFG_AR_RELEASE_PATCH_VERSION, versionInfo.ar_patch_version); 46 | 47 | } 48 | TEST(dio_swc, test_Dio_GetVersionInfo_VersionInfo_Null) 49 | { 50 | // Expect a call to Det_ReportError with specific parameters and return E_OK 51 | Det_ReportError_ExpectAndReturn(DIO_MODULE_ID, DIO_INSTANCE_ID, DIO_GET_VERSION_INFO_SID, DIO_E_PARAM_POINTER,E_OK); 52 | 53 | // Call the function with a null pointer 54 | Dio_GetVersionInfo(NULL); 55 | 56 | } 57 | -------------------------------------------------------------------------------- /software/bsw/mcal/dio_swc/tests/unit/test_runners/test_main.c: -------------------------------------------------------------------------------- 1 | #include "unity_fixture.h" 2 | 3 | static void RunAllTests(void) 4 | { 5 | RUN_TEST_GROUP(dio_swc); 6 | } 7 | 8 | int main(int argc, const char * argv[]) 9 | { 10 | return UnityMain(argc, argv, RunAllTests); 11 | } 12 | -------------------------------------------------------------------------------- /software/bsw/mcal/dio_swc/tests/unit/test_runners/test_runner.c: -------------------------------------------------------------------------------- 1 | #include "unity.h" 2 | #include "unity_fixture.h" 3 | 4 | TEST_GROUP_RUNNER(dio_swc) 5 | { 6 | RUN_TEST_CASE(dio_swc, test_Dio_ReadChannel_OutOfRange); 7 | RUN_TEST_CASE(dio_swc, test_Dio_GetVersionInfo_ValidVersionInfo) 8 | RUN_TEST_CASE(dio_swc, test_Dio_GetVersionInfo_VersionInfo_Null) 9 | } -------------------------------------------------------------------------------- /software/bsw/mcal/dio_swc/tools/cmake/dio_swc_compile.cmake: -------------------------------------------------------------------------------- 1 | 2 | 3 | set( 4 | dio_swc_sources_list 5 | 6 | ${dio_swc}/core/Dio.c 7 | ${gendata}/Dio_Lcfg.c 8 | ) 9 | 10 | set( 11 | dio_swc_includes 12 | 13 | ${dio_swc}/core 14 | ${port_swc}/core 15 | ${gendata} 16 | 17 | ${common_includes} 18 | ${platform} 19 | ${stubs} 20 | ) 21 | 22 | set( 23 | dio_swc_defines 24 | ) 25 | 26 | set( 27 | dio_swc_compile_options 28 | ) 29 | 30 | -------------------------------------------------------------------------------- /software/bsw/mcal/dio_swc/tools/cmake/dio_swc_tests.cmake: -------------------------------------------------------------------------------- 1 | set( 2 | dio_swc_tests_sources_list 3 | 4 | ${dio_swc}/tests/unit/test_dio_swc.c 5 | 6 | # Any mocked file will be under ${MOCK_FILE_PATH}/mocks/mock_headerFileName.c 7 | ${MOCK_FILE_PATH}/mocks/mock_Det.c 8 | # Include Test Runners 9 | ${dio_swc}/tests/unit/test_runners/test_runner.c 10 | ${dio_swc}/tests/unit/test_runners/test_main.c 11 | ) 12 | 13 | set( 14 | dio_swc_ut_sources_list 15 | 16 | ${dio_swc}/core/Dio.c 17 | ${gendata}/Dio_Lcfg.c 18 | 19 | ) 20 | 21 | set ( 22 | dio_swc_mock_header_files 23 | 24 | ${stubs}/Det.h 25 | ${port_swc}/core/Port.h 26 | 27 | ) 28 | 29 | set( 30 | dio_swc_tests_includes 31 | 32 | ${dio_swc}/core 33 | ${port_swc}/core 34 | ${gendata} 35 | ${common_includes} 36 | ${platform} 37 | ${stubs} 38 | ${dio_swc}/tests/unit/stubs 39 | ${MOCK_FILE_PATH}/mocks/ 40 | ) 41 | 42 | set( 43 | dio_swc_tests_compile_options 44 | 45 | ) 46 | 47 | set( 48 | dio_swc_tests_defines 49 | ) 50 | 51 | set( 52 | dio_swc_tests_libs 53 | "dio_swc" 54 | ) 55 | 56 | -------------------------------------------------------------------------------- /software/bsw/mcal/port_swc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # CMake Version Check 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | # Project 5 | project(port_swc 6 | LANGUAGES C CXX 7 | VERSION "1.0.0" 8 | DESCRIPTION "port_swc") 9 | 10 | ############################################################################## 11 | # Extract Module Path in build/CMake/Test/ # 12 | ############################################################################## 13 | extract_module_path(port_swc MOCK_FILE_PATH) 14 | 15 | ############################################################################## 16 | # Include Common Compilation Settings # 17 | ############################################################################## 18 | 19 | include(tools/cmake/port_swc_compile.cmake) 20 | 21 | ############################################################################## 22 | # Build Configuration # 23 | ############################################################################## 24 | 25 | # Compilation Mode: Only build the library 26 | 27 | if(MODE STREQUAL "COMPILING") 28 | add_library(port_swc ${port_swc_sources_list}) 29 | target_compile_options(port_swc PRIVATE ${port_swc_compile_options}) 30 | target_include_directories(port_swc PRIVATE ${port_swc_includes}) 31 | target_compile_definitions(port_swc PRIVATE ${port_swc_defines}) 32 | elseif (MODE STREQUAL "TESTING") 33 | include(tools/cmake/port_swc_tests.cmake) 34 | add_library(port_swc ${port_swc_ut_sources_list}) 35 | target_compile_options(port_swc PRIVATE ${port_swc_tests_compile_options}) 36 | target_include_directories(port_swc PRIVATE ${port_swc_tests_includes}) 37 | target_compile_definitions(port_swc PRIVATE ${port_swc_tests_defines}) 38 | endif() 39 | 40 | if(MODE STREQUAL "TESTING") 41 | # Execute CMock script 42 | execute_process( 43 | COMMAND ruby ${CMOCK_SCRIPT} -o${CMOCK_CONFIG_FILE} ${port_swc_mock_header_files} 44 | OUTPUT_VARIABLE CMOCK_OUTPUT 45 | WORKING_DIRECTORY ${MOCK_FILE_PATH} 46 | ) 47 | message("CMock output: ${CMOCK_OUTPUT}") 48 | 49 | # Testing Mode: Build the library and test executable 50 | include(tools/cmake/port_swc_tests.cmake) 51 | add_executable(port_swc_test ${port_swc_tests_sources_list} ${unity_common_sources}) 52 | target_compile_definitions(port_swc_test PRIVATE ${port_swc_tests_defines}) 53 | target_compile_options(port_swc_test PRIVATE ${dio_swc_tests_compile_options}) 54 | target_include_directories(port_swc_test PRIVATE ${port_swc_tests_includes} ${unity_common_includes}) 55 | target_link_libraries(port_swc_test PRIVATE port_swc) 56 | # Until Integrate Gcovr 57 | add_test(NAME port_swc_test COMMAND port_swc_test) 58 | endif() 59 | -------------------------------------------------------------------------------- /software/bsw/mcal/port_swc/core/Port_MemMap.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Port_MemMap.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2024-04-17 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : Port Memory Mapping for Tiva C ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of Port Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | #ifndef PORT_MEM_MAP_H_ 37 | #define PORT_MEM_MAP_H_ 38 | 39 | /*******************************************************************************/ 40 | /* Include headers */ 41 | /*******************************************************************************/ 42 | 43 | #include "hw_memmap.h" 44 | #include "hw_sysctl.h" 45 | #include "Std_Types.h" 46 | 47 | /*******************************************************************************/ 48 | /* Macro Definition */ 49 | /*******************************************************************************/ 50 | 51 | #define __I volatile const /*!< Defines 'read only' permissions */ 52 | #define __O volatile /*!< Defines 'write only' permissions */ 53 | #define __IO volatile /*!< Defines 'read / write' permissions */ 54 | 55 | /******************************************************************************* 56 | * Module Data Types * 57 | *******************************************************************************/ 58 | 59 | typedef struct 60 | { /*port Structure*/ 61 | __I uint32 RESERVED0[255]; 62 | __IO uint32 DATA; /*port Data*/ 63 | __IO uint32 DIR; /*port Direction*/ 64 | __IO uint32 IS; /*port Interrupt Sense*/ 65 | __IO uint32 IBE; /*port Interrupt Both Edges*/ 66 | __IO uint32 IEV; /*port Interrupt Event*/ 67 | __IO uint32 IM; /*port Interrupt Mask*/ 68 | __IO uint32 RIS; /*port Raw Interrupt Status*/ 69 | __IO uint32 MIS; /*port Masked Interrupt Status*/ 70 | __O uint32 ICR; /*port Interrupt Clear*/ 71 | __IO uint32 AFSEL; /*port Alternate Function Select*/ 72 | __I uint32 RESERVED1[55]; 73 | __IO uint32 DR2R; /*port 2-mA Drive Select*/ 74 | __IO uint32 DR4R; /*port 4-mA Drive Select*/ 75 | __IO uint32 DR8R; /*port 8-mA Drive Select*/ 76 | __IO uint32 ODR; /*port Open Drain Select*/ 77 | __IO uint32 PUR; /*port Pull-Up Select*/ 78 | __IO uint32 PDR; /*port Pull-Down Select*/ 79 | __IO uint32 SLR; /*port Slew Rate Control Select*/ 80 | __IO uint32 DEN; /*port Digital Enable*/ 81 | __IO uint32 LOCK; /*port Lock*/ 82 | __I uint32 CR; /*port Commit*/ 83 | __IO uint32 AMSEL; /*port Analog Mode Select*/ 84 | __IO uint32 PCTL; /*port Port Control*/ 85 | __IO uint32 ADCCTL; /*port ADC Control*/ 86 | __IO uint32 DMACTL; /*port DMA Control*/ 87 | } Port_Type; 88 | 89 | /*Base Addresses of Ports*/ 90 | #define PORTA ((Port_Type *)GPIO_PORTA_BASE) 91 | #define PORTB ((Port_Type *)GPIO_PORTB_BASE) 92 | #define PORTC ((Port_Type *)GPIO_PORTC_BASE) 93 | #define PORTD ((Port_Type *)GPIO_PORTD_BASE) 94 | #define PORTE ((Port_Type *)GPIO_PORTE_BASE) 95 | #define PORTF ((Port_Type *)GPIO_PORTF_BASE) 96 | 97 | /* RCC Registers */ 98 | #define SYSCTL_REGCGC2_REG (*((volatile uint32 *)SYSCTL_RCGC2)) 99 | 100 | #endif /* PORT_MEM_MAP_H_ */ 101 | -------------------------------------------------------------------------------- /software/bsw/mcal/port_swc/tests/unit/test_port_swc.c: -------------------------------------------------------------------------------- 1 | #include "unity.h" 2 | #include "unity_fixture.h" 3 | 4 | #include "Port.h" 5 | #include "mock_Det.h" 6 | 7 | TEST_GROUP(port_swc); 8 | 9 | TEST_SETUP(port_swc) 10 | { 11 | } 12 | 13 | TEST_TEAR_DOWN(port_swc) 14 | { 15 | } 16 | 17 | TEST(port_swc, test_PORT_GetVersionInfo_Function) 18 | { 19 | Std_VersionInfoType VersionInfo = {0} ; 20 | PORT_GetVersionInfo(&VersionInfo); 21 | TEST_ASSERT_EQUAL(0,VersionInfo.vendorID); 22 | TEST_ASSERT_EQUAL(PORT_MODULE_ID,VersionInfo.moduleID); 23 | TEST_ASSERT_EQUAL(PORT_INSTANCE_ID,VersionInfo.instanceID); 24 | } 25 | 26 | TEST(port_swc, test_PORT_GetVersionInfo_WithNull) 27 | { 28 | Std_VersionInfoType VersionInfo = {0} ; 29 | Det_ReportError_ExpectAnyArgsAndReturn(E_NOT_OK); 30 | PORT_GetVersionInfo(NULL); 31 | } 32 | -------------------------------------------------------------------------------- /software/bsw/mcal/port_swc/tests/unit/test_runners/all_tests.c: -------------------------------------------------------------------------------- 1 | #include "unity_fixture.h" 2 | 3 | static void RunAllTests(void) 4 | { 5 | RUN_TEST_GROUP(port_swc); 6 | } 7 | 8 | int main(int argc, const char * argv[]) 9 | { 10 | return UnityMain(argc, argv, RunAllTests); 11 | } 12 | -------------------------------------------------------------------------------- /software/bsw/mcal/port_swc/tests/unit/test_runners/port_Runner.c: -------------------------------------------------------------------------------- 1 | #include "unity.h" 2 | #include "unity_fixture.h" 3 | 4 | TEST_GROUP_RUNNER(port_swc) 5 | { 6 | RUN_TEST_CASE(port_swc, test_PORT_GetVersionInfo_Function); 7 | RUN_TEST_CASE(port_swc, test_PORT_GetVersionInfo_WithNull); 8 | } -------------------------------------------------------------------------------- /software/bsw/mcal/port_swc/tools/cmake/port_swc_compile.cmake: -------------------------------------------------------------------------------- 1 | 2 | 3 | set( 4 | port_swc_sources_list 5 | 6 | ${port_swc}/core/Port.c 7 | ${gendata}/Port_Lcfg.c 8 | ${gendata}/Port_PBcfg.c 9 | ) 10 | 11 | set( 12 | port_swc_includes 13 | 14 | ${port_swc}/core 15 | ${gendata} 16 | ${common_includes} 17 | ${platform} 18 | ${stubs} 19 | ) 20 | 21 | set( 22 | port_swc_defines 23 | ) 24 | 25 | set( 26 | port_swc_compile_options 27 | ) 28 | -------------------------------------------------------------------------------- /software/bsw/mcal/port_swc/tools/cmake/port_swc_tests.cmake: -------------------------------------------------------------------------------- 1 | set( 2 | port_swc_tests_sources_list 3 | # Main test files 4 | ${port_swc}/tests/unit/test_port_swc.c 5 | # Any mocked file will be under ${MOCK_FILE_PATH}/mocks/mock_headerFileName.c 6 | ${MOCK_FILE_PATH}/mocks/mock_Det.c 7 | # Include Test Runners 8 | ${port_swc}/tests/unit/test_runners/port_Runner.c 9 | ${port_swc}/tests/unit/test_runners/all_tests.c 10 | 11 | ) 12 | 13 | set( 14 | port_swc_ut_sources_list 15 | 16 | ${port_swc}/core/Port.c 17 | ${gendata}/Port_Lcfg.c 18 | ${gendata}/Port_PBcfg.c 19 | 20 | ) 21 | 22 | set ( 23 | port_swc_mock_header_files 24 | 25 | ${stubs}/Det.h 26 | 27 | ) 28 | 29 | set( 30 | port_swc_tests_includes 31 | 32 | ${port_swc}/core 33 | ${gendata} 34 | 35 | ${common_includes} 36 | ${platform} 37 | ${stubs} 38 | #Include mocked folder 39 | ${MOCK_FILE_PATH}/mocks 40 | ) 41 | 42 | set( 43 | port_swc_tests_compile_options 44 | ) 45 | 46 | set( 47 | port_swc_tests_defines 48 | ) 49 | -------------------------------------------------------------------------------- /software/common/includes/ComStack_Types.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : ComStack_Types.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Driver source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #ifndef __COMSTACK_H__ 36 | #define __COMSTACK_H__ 37 | 38 | /* Module Version 1.0.0 */ 39 | #define COMSTACK_TYPES_SW_MAJOR_VERSION (1U) 40 | #define COMSTACK_TYPES_SW_MINOR_VERSION (0U) 41 | #define COMSTACK_TYPES_SW_PATCH_VERSION (0U) 42 | 43 | /* AUTOSAR Version 4.3.1 */ 44 | #define COMSTACK_TYPES_AR_RELEASE_MAJOR_VERSION (4U) 45 | #define COMSTACK_TYPES_AR_RELEASE_MINOR_VERSION (3U) 46 | #define COMSTACK_TYPES_AR_RELEASE_PATCH_VERSION (1U) 47 | 48 | #include "Std_Types.h" 49 | /* AUTOSAR checking between Std_Types and ComStack_Types Modules */ 50 | #if ((STD_TYPES_AR_RELEASE_MAJOR_VERSION != COMSTACK_TYPES_AR_RELEASE_MAJOR_VERSION)\ 51 | || (STD_TYPES_AR_RELEASE_MINOR_VERSION != COMSTACK_TYPES_AR_RELEASE_MINOR_VERSION)\ 52 | || (STD_TYPES_AR_RELEASE_PATCH_VERSION != COMSTACK_TYPES_AR_RELEASE_PATCH_VERSION)) 53 | #error "The AR version of Std_Types.h does not match the expected version" 54 | #endif 55 | 56 | /* 57 | [SWS_COMTYPE_00005] 58 | This type is used within the entire AUTOSAR Com Stack except for bus drivers. 59 | Zero-based integer number The size of this global type depends on the maximum 60 | number of PDUs used within one software module. This parameter shall be generated by the generator tool 61 | depending on the value configured in EcuC virtual layer. This parameter shall be generated in ComStack_Cfg.h file 62 | Example : If '''no''' software module deals with more PDUs that 256, this type can be set to uint8. 63 | If at least one software module handles more than 256 PDUs, this type must globally be set to uint16 64 | */ 65 | typedef uint16 PduIdType ; 66 | 67 | /* 68 | [SWS_COMTYPE_00008] 69 | This type shall be used within the entire AUTOSAR Com Stack of an ECU except for bus drivers. 70 | Zero-based integer number The size of this global type depends on the maximum length of PDUs to be sent by an ECU. 71 | This parameter shall be generated by the generator tool depending on the value configured in EcuC virtual layer. 72 | This parameter shall be generated in ComStack_Cfg.h file 73 | Example : If no segmentation is used the length depends on the maximum payload size of a frame of the underlying 74 | communication system (for FlexRay maximum size is 255, therefore uint8). 75 | If segmentation is used it depends on the maximum length of a segmented N-PDU (in general uint16 is used) 76 | */ 77 | typedef uint32 PduLengthType ; 78 | 79 | /* 80 | [SWS_COMTYPE_00011] 81 | Variables of this type shall be used to store the basic information about a PDU of any type, 82 | namely a pointer variable pointing to its SDU (payload), a pointer to Meta Data of the PDU, 83 | and the corresponding length of the SDU in bytes. 84 | 1- SduDataPtr: Pointer to the SDU (i.e. payload data) of the PDU. 85 | The type of this pointer depends on the memory model being used at compile time. 86 | 2- MetaDataPtr: Pointer to the meta data (e.g. CAN ID, socket ID, diagnostic addresses) of the PDU, 87 | consisting of a sequence of meta data items. 88 | The length and type of the meta data items is statically configured for each PDU. 89 | Meta data items with more than 8 bits use platform byte order. 90 | 3- SduLength: Length of the SDU in bytes. 91 | */ 92 | typedef struct 93 | { 94 | uint8* SduDataPtr ; 95 | uint8* MetaDataPtr ; 96 | PduLengthType SduLength ; 97 | 98 | }PduInfoType; 99 | 100 | /* 101 | [SWS_COMTYPE_00039] 102 | IcomConfigIdType defines the configuration ID. An ID of 0 is the defaultconfiguration. 103 | An ID greater than 0 shall identify a configuration for Pretended Networking. 104 | There is more than 1 configuration possible. 105 | */ 106 | typedef uint8 IcomConfigIdType; 107 | 108 | /* 109 | [SWS_COMTYPE_00040] 110 | IcomSwitch_ErrorType defines the errors which can occur when activating or 111 | deactivating Pretended Networking. 112 | 1- The activation of Pretended Networking was successful. 113 | 2- The activation of Pretended Networking was not successful 114 | */ 115 | typedef uint8 IcomSwitch_ErrorType; 116 | #define ICOM_SWITCH_E_OK ((IcomSwitch_ErrorType) 0x00U) 117 | #define ICOM_SWITCH_E_FAILED ((IcomSwitch_ErrorType) 0x01U) 118 | 119 | 120 | #endif /* __COMSTACK_H__ */ 121 | -------------------------------------------------------------------------------- /software/common/includes/Compiler.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Compiler.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Driver source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #ifndef COMPILER_H 36 | #define COMPILER_H 37 | 38 | #define AUTOMATIC 39 | #define TYPEDEF typedef 40 | #define STATIC static 41 | 42 | 43 | #define INLINE __inline__ 44 | 45 | #define FUNC(rettype,memclass) rettype 46 | 47 | #define FUNC_P2VAR(rettype, ptrclass, memclass) rettype *(memclass) 48 | 49 | #define FUNC_P2CONST(rettype, ptrclass, memclass)const rettype *(memclass) 50 | 51 | #define P2VAR(ptrtype, memclass, ptrclass) ptrtype * 52 | 53 | #define P2CONST(ptrtype, memclass, ptrclass) const ptrtype * 54 | 55 | #define CONSTP2VAR(ptrtype,memclass,ptrclass) ptrtype * const 56 | 57 | #define CONSTP2CONST(ptrtype, memclass, ptrclass) const ptrtype * const 58 | 59 | #define P2FUNC(rettype,ptrclass,fctname) rettype (*fctname) 60 | 61 | #ifndef CONST 62 | #define CONST(consttype,memclass) const consttype 63 | #endif 64 | 65 | #define VAR(vartype,memclass) vartype 66 | 67 | 68 | #endif /* COMPILER_H */ 69 | -------------------------------------------------------------------------------- /software/common/includes/MemMap.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : MemMap.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Driver source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #ifndef MEMMAP_H_ 36 | #define MEMMAP_H_ 37 | 38 | 39 | 40 | #endif /* MEMMAP_H_ */ 41 | -------------------------------------------------------------------------------- /software/common/includes/Platform_Types.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Platform_Types.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Driver source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | #ifndef PLATFORM_TYPES_H 37 | #define PLATFORM_TYPES_H 38 | ///[SWS_Platform_00027] 39 | 40 | /** CPU Type & CPU_BIT_ORDER & CPU_BYTE_ORDER. **/ 41 | #define CPU_TYPE_8 8 42 | #define CPU_TYPE_16 16 43 | #define CPU_TYPE_32 32 44 | #define CPU_TYPE_64 64 45 | 46 | #define MSB_FIRST 0 47 | #define LSB_FIRST 1 48 | 49 | #define HIGH_BYTE_FIRST 0 50 | #define LOW_BYTE_FIRST 1 51 | 52 | #define CPU_TYPE CPU_TYPE_32 53 | #define CPU_BIT_ORDER MSB_FIRST 54 | #define CPU_BYTE_ORDER HIGH_BYTE_FIRST 55 | 56 | typedef _Bool boolean; 57 | typedef char sint8; 58 | typedef unsigned char uint8; 59 | typedef signed short sint16; 60 | typedef unsigned short uint16; 61 | typedef signed long sint32; 62 | typedef unsigned long uint32; 63 | typedef signed long long sint64; 64 | typedef unsigned long long uint64; 65 | typedef unsigned long uint8_least; 66 | typedef unsigned long uint16_least; 67 | typedef unsigned long uint32_least; 68 | typedef signed long sint8_least; 69 | typedef signed long sint16_least; 70 | typedef signed long sint32_least; 71 | typedef float float32; 72 | typedef double float64; 73 | 74 | 75 | typedef volatile char vint8_t; 76 | typedef volatile uint8 vuint8_t; 77 | 78 | typedef volatile sint16 vint16_t; 79 | typedef volatile uint16 vuint16_t; 80 | 81 | typedef volatile sint32 vint32_t; 82 | typedef volatile uint32 vuint32_t; 83 | 84 | typedef volatile sint64 vint64_t; 85 | typedef volatile uint64 vuint64_t; 86 | 87 | 88 | //Optimized integer data types 89 | /** Boolean data type. **/ 90 | ///[SWS_Platform_00034] 91 | #ifndef FALSE 92 | #define FALSE (0U) 93 | #endif 94 | #ifndef TRUE 95 | #define TRUE (1U) 96 | #endif 97 | 98 | #ifndef False 99 | #define False (boolean)0 100 | #endif 101 | #ifndef True 102 | #define True (boolean)1 103 | #endif 104 | 105 | #endif 106 | -------------------------------------------------------------------------------- /software/common/includes/Std_Types.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Std_Types.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Driver source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #ifndef STD_TYPES_H 36 | #define STD_TYPES_H 37 | 38 | #include "Platform_Types.h" 39 | #include "Compiler.h" 40 | 41 | #ifndef NULL 42 | #define NULL 0 43 | #endif 44 | 45 | typedef struct { 46 | uint16 vendorID; 47 | uint16 moduleID; 48 | uint8 instanceID; 49 | /** Vendor numbers */ 50 | uint8 sw_major_version; 51 | uint8 sw_minor_version; 52 | uint8 sw_patch_version; 53 | /** Autosar spec. numbers */ 54 | uint8 ar_major_version; 55 | uint8 ar_minor_version; 56 | uint8 ar_patch_version; 57 | } Std_VersionInfoType; 58 | 59 | /** See AUTOSAR_SWS_CompilerAbstraction-->11.3 Published Information. **/ 60 | /** make compare number... #if version > 10203 ( 1.2.3 ) */ 61 | #define STD_GET_VERSION (_major,_minor,_patch) (_major * 10000 + _minor * 100 + _patch) 62 | 63 | /** Create Std_VersionInfoType */ 64 | #define STD_GET_VERSION_INFO(_vi,_module) \ 65 | if(_vi != NULL) {\ 66 | ((_vi)->vendorID = _module ## _VENDOR_ID);\ 67 | ((_vi)->moduleID = _module ## _MODULE_ID);\ 68 | ((_vi)->sw_major_version = _module ## _SW_MAJOR_VERSION);\ 69 | ((_vi)->sw_minor_version = _module ## _SW_MINOR_VERSION);\ 70 | ((_vi)->sw_patch_version = _module ## _SW_PATCH_VERSION);\ 71 | ((_vi)->ar_major_version = _module ## _AR_MAJOR_VERSION);\ 72 | ((_vi)->ar_minor_version = _module ## _AR_MINOR_VERSION);\ 73 | ((_vi)->ar_patch_version = _module ## _AR_PATCH_VERSION);\ 74 | } 75 | 76 | 77 | typedef uint8 Std_ReturnType; 78 | 79 | 80 | #define E_OK (Std_ReturnType)0 81 | #define E_NOT_OK (Std_ReturnType)1 82 | 83 | 84 | #define STD_HIGH 0x01 85 | #define STD_LOW 0x00 86 | 87 | #define STD_ACTIVE 0x01 88 | #define STD_IDLE 0x00 89 | 90 | #define STD_ON 0x01 91 | #define STD_OFF 0x00 92 | 93 | #define STD_TYPES_AR_RELEASE_MAJOR_VERSION (4U) 94 | #define STD_TYPES_AR_RELEASE_MINOR_VERSION (3U) 95 | #define STD_TYPES_AR_RELEASE_PATCH_VERSION (1U) 96 | 97 | #endif 98 | -------------------------------------------------------------------------------- /software/common/platform/BitHelper.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : BitHelper.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Driver source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #ifndef _BIT_MATH_H 36 | #define _BIT_MATH_H 37 | 38 | #define BITBAND_BASE 0x42000000 39 | #define SET_BIT(x,i) x|=(1<<(i)) 40 | #define CLR_BIT(x,i) x&=~(1<<(i)) 41 | #define TOGGLE_BIT(x,i) x^=(1<<(i)) 42 | #define GET_BIT(x,i) (x>>(i))&1 43 | #define CLR_BITS(x,i,Mask) x&=~(Mask<<(i)) 44 | #define SET_BITS(x,i,Mask) x|=(Mask<<(i)) 45 | 46 | #define BYTE_OFFSET(REG_ADD) (REG_ADD - 0x40000000) 47 | #define BIT_WORD_OFFSET(REG_ADD,BIT_NUM) (( BYTE_OFFSET(REG_ADD)* 32) + (BIT_NUM * 4)) 48 | #define BIT_WORD_ADDR(REG_ADD,BIT_NUM) (BITBAND_BASE + BIT_WORD_OFFSET(REG_ADD,BIT_NUM)) 49 | #define GET_BIT_PERPHBAND(REG_ADD,BIT_NUM) (*((volatile uint32 *)BIT_WORD_ADDR(REG_ADD,BIT_NUM))) 50 | #define SET_BIT_PERPHBAND(REG_ADD,BIT_NUM) (GET_BIT_PERPHBAND(REG_ADD,BIT_NUM) = (uint32)0x01) 51 | #define CLR_BIT_PERPHBAND(REG_ADD,BIT_NUM) (GET_BIT_PERPHBAND(REG_ADD,BIT_NUM) = (uint32)0x00) 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /software/common/platform/Timer0A.c: -------------------------------------------------------------------------------- 1 | // Timer0A.c 2 | // Runs on LM4F120/TM4C123 3 | // Use Timer0A in periodic mode to request interrupts at a particular 4 | // period. 5 | // Daniel Valvano 6 | // September 11, 2013 7 | 8 | /* This example accompanies the book 9 | "Embedded Systems: Introduction to ARM Cortex M Microcontrollers" 10 | ISBN: 978-1469998749, Jonathan Valvano, copyright (c) 2014 11 | Volume 1, Program 9.8 12 | 13 | "Embedded Systems: Real Time Interfacing to ARM Cortex M Microcontrollers", 14 | ISBN: 978-1463590154, Jonathan Valvano, copyright (c) 2014 15 | Volume 2, Program 7.5, example 7.6 16 | 17 | Copyright 2014 by Jonathan W. Valvano, valvano@mail.utexas.edu 18 | You may use, edit, run or distribute this file 19 | as long as the above copyright notice remains 20 | THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED 21 | OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF 22 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. 23 | VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, 24 | OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. 25 | For more information about my classes, my research, and my books, see 26 | http://users.ece.utexas.edu/~valvano/ 27 | */ 28 | #include "Can_Cfg.h" 29 | #include 30 | #include "tm4c123gh6pm.h" 31 | 32 | 33 | // 34 | //void DisableInterrupts(void); // Disable interrupts 35 | //void EnableInterrupts(void); // Enable interrupts 36 | //long StartCritical (void); // previous I bit, disable interrupts 37 | //void EndCritical(long sr); // restore I bit to previous value 38 | //void WaitForInterrupt(void); // low power mode 39 | //void (*PeriodicTask)(void); // user function 40 | 41 | 42 | // ***************** Timer0A_Init **************** 43 | // Activate TIMER0 interrupts to run user task periodically 44 | // Inputs: task is a pointer to a user function 45 | // period in units (1/clockfreq), 32 bits 46 | // Outputs: none 47 | 48 | //Can_ConfigType can=general; 49 | 50 | 51 | 52 | void Timer0A_Init(void) 53 | { 54 | // uint32_t period = 1600000; 55 | 56 | SYSCTL_RCGCTIMER_R |= 0x01; // 0) activate TIMER0 57 | 58 | TIMER0_CTL_R = 0x00000000; // 1) disable TIMER0A during setup 59 | TIMER0_CFG_R = 0x00000000; // 2) configure for 32-bit mode 60 | TIMER0_TAMR_R = 0x00000001; // 3) configure for periodic mode, default down-count settings 61 | TIMER0_TAILR_R =16000000*CanTimeoutDuration; // 4) reload value 62 | TIMER0_TAPR_R = 0; // 5) bus clock resolution 63 | TIMER0_ICR_R = 0x00000001; // 6) clear TIMER0A timeout flag 64 | TIMER0_IMR_R = 0x00000001; // 7) arm timeout interrupt 65 | /* NVIC_PRI4_R = (NVIC_PRI4_R&0x00FFFFFF)|0x80000000; */// 8) priority 4 66 | // interrupts enabled in the main program after all devices initialized 67 | // vector number 35, interrupt number 19 68 | /*NVIC_EN0_R = 1<<19; */ // 9) enable IRQ 19 in NVIC 69 | TIMER0_CTL_R = 0x00000001; // 10) enable TIMER0A 70 | 71 | } 72 | 73 | void Timer0A_Handler(void){ 74 | // TIMER0_ICR_R = TIMER_ICR_TATOCINT;// acknowledge timer0A timeout 75 | // COM_Transmition(); // execute user task 76 | } 77 | -------------------------------------------------------------------------------- /software/common/platform/Timer0A.h: -------------------------------------------------------------------------------- 1 | // Timer0A.h 2 | // Runs on LM4F120/TM4C123 3 | // Use Timer0A in periodic mode to request interrupts at a particular 4 | // period. 5 | // Daniel Valvano 6 | // September 11, 2013 7 | 8 | /* This example accompanies the book 9 | "Embedded Systems: Real Time Interfacing to Arm Cortex M Microcontrollers", 10 | ISBN: 978-1463590154, Jonathan Valvano, copyright (c) 2013 11 | Program 7.5, example 7.6 12 | 13 | Copyright 2013 by Jonathan W. Valvano, valvano@mail.utexas.edu 14 | You may use, edit, run or distribute this file 15 | as long as the above copyright notice remains 16 | THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED 17 | OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF 18 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. 19 | VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, 20 | OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. 21 | For more information about my classes, my research, and my books, see 22 | http://users.ece.utexas.edu/~valvano/ 23 | */ 24 | 25 | #ifndef __TIMER0AINTS_H__ // do not include more than once 26 | #define __TIMER0AINTS_H__ 27 | 28 | // ***************** Timer0A_Init **************** 29 | // Activate Timer0A interrupts to run user task periodically 30 | // Inputs: task is a pointer to a user function 31 | // period in units (1/clockfreq), 32 bits 32 | // Outputs: none 33 | void Timer0A_Init(void); 34 | 35 | #endif // __TIMER0AINTS_H__ 36 | -------------------------------------------------------------------------------- /software/common/platform/cmsis_ccs.h: -------------------------------------------------------------------------------- 1 | //***************************************************************************** 2 | // 3 | // Copyright (C) 2012 - 2014 Texas Instruments Incorporated - http://www.ti.com/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions 7 | // are met: 8 | // 9 | // Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // 12 | // Redistributions in binary form must reproduce the above copyright 13 | // notice, this list of conditions and the following disclaimer in the 14 | // documentation and/or other materials provided with the 15 | // distribution. 16 | // 17 | // Neither the name of Texas Instruments Incorporated nor the names of 18 | // its contributors may be used to endorse or promote products derived 19 | // from this software without specific prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | // 33 | // MSP432 Family CMSIS Definitions 34 | // 35 | //**************************************************************************** 36 | 37 | #ifndef CMSIS_CCS_H_ 38 | #define CMSIS_CCS_H_ 39 | 40 | // Data Synchronization Barrier 41 | __attribute__( ( always_inline ) ) static inline void __DSB(void) 42 | { 43 | __asm(" dsb"); 44 | } 45 | 46 | #if (0) 47 | // Get Main Stack Pointer 48 | static inline uint32_t __get_MSP(void) 49 | { 50 | register uint32_t result; 51 | //__asm (" mrs result, msp"); 52 | return(result); 53 | } 54 | 55 | // Set Main Stack Pointer 56 | static inline void __set_MSP(uint32_t topOfMainStack) 57 | { 58 | asm(" .global topOfMainStack"); 59 | __asm (" msr msp, topOfMainStack"); 60 | } 61 | 62 | 63 | // Get Priority Mask 64 | static inline uint32_t __get_PRIMASK(void) 65 | { 66 | uint32_t result; 67 | __asm (" mrs result, primask"); 68 | return(result); 69 | } 70 | 71 | 72 | // Set Priority Mask 73 | static inline void __set_PRIMASK(uint32_t priMask) 74 | { 75 | __asm (" msr primask, priMask"); 76 | } 77 | #endif 78 | 79 | 80 | // 81 | // v5e, v6, Cortex-M3, Cortex-M4, Cortex-R4, and Cortex-A8 compiler intrinsics 82 | // 83 | #define __CLZ _norm 84 | #define __SXTB _sxtb 85 | #define __SXTH _sxth 86 | #define __UXTB _uxtb 87 | #define __UXTH _uxth 88 | #define __NOP __nop 89 | #define __WFI __wfi 90 | 91 | // CCS supports intrinsics to take advantage of the shift operand left/right 92 | // before saturation extension of SSAT, but CMSIS does not take advantage 93 | // of those, so tell the compiler to use a sat & shift left with a shift 94 | // value of 0 whenever it encounters an SSAT 95 | #define __SSAT(VAL, BITPOS) \ 96 | _ssatl(VAL , 0, BITPOS) 97 | 98 | // 99 | // Only define M4 based intrinsics if we're not using an M4 100 | // 101 | #if defined (__TI_TMS470_V7M4__) 102 | // 103 | // V5E, V6, Cortex-M4, Cortex-R4, and Cortex-A8 compiler intrinsics 104 | // 105 | #define __QADD _sadd 106 | #define __QDADD _sdadd 107 | #define __QDSUB _sdsub 108 | #define __SMLABB _smlabb 109 | #define __SMLABT _smlabt 110 | #define __SMLALBB _smlalbb 111 | #define __SMLALBT _smlalbt 112 | #define __SMLALTB _smlaltb 113 | #define __SMLALTT _smlaltt 114 | #define __SMLATB _smlatb 115 | #define __SMLATT _smlatt 116 | #define __SMLAWB _smlawb 117 | #define __SMLAWT _smlawt 118 | 119 | #define __SMULBB _smulbb 120 | #define __SMULBT _smulbt 121 | #define __SMULTB _smultb 122 | #define __SMULTT _smultt 123 | #define __SMULWB _smulwb 124 | #define __SMULWT _smulwt 125 | #define __QSUB _ssub 126 | #define __SUBC _subc 127 | 128 | // 129 | // v6, Cortex-M4, Cortex-R4, and Cortex-A8 compiler intrinsics 130 | // 131 | #define __SHASX _shaddsubx 132 | #define __SHSAX _shsubaddx 133 | #define __PKHBT _pkhbt 134 | #define __PKHTB _pkhtb 135 | #define __QADD16 _qadd16 136 | #define __QADD8 _qadd8 137 | #define __QSUB16 _qsub16 138 | #define __QSUB8 _qsub8 139 | #define __QASX _saddsubx 140 | #define __QSAX _qsubaddx 141 | #define __SADD16 _sadd16 142 | #define __SADD8 _sadd8 143 | #define __SASX _saddsubx 144 | #define __SEL _sel 145 | #define __SHADD16 _shadd16 146 | #define __SHADD8 _shadd8 147 | #define __SHSUB16 _shsub16 148 | #define __SHSUB8 _shsub8 149 | #define __SMLAD _smlad 150 | #define __SMLADX _smladx 151 | #define __SMLALD _smlald 152 | #define __SMLALDX _smlaldx 153 | #define __SMLSD _smlsd 154 | #define __SMLSDX _smlsdx 155 | #define __SMLSLD _smlsld 156 | #define __SMLSLDX _smlsldx 157 | #define __SMMLA _smmla 158 | #define __SMMLAR _smmlar 159 | #define __SMMLS _smmls 160 | #define __SMMLSR _smmlsr 161 | #define __SMMUL _smmul 162 | #define __SMMULR _smmulr 163 | #define __SMUAD _smuad 164 | #define __SMUADX _smuadx 165 | #define __SMUSD _smusd 166 | #define __SMUSDX _smusd 167 | #define __SSAT16 _ssat16 168 | #define __SSUB16 _ssub16 169 | #define __SSUB8 _ssub8 170 | #define __SSAX _ssubaddx 171 | #define __SXTAB _sxtab 172 | #define __SXTAB16 _sxtab16 173 | #define __SXTAH _sxtah 174 | #define __UMAAL _umaal 175 | #define __UADD16 _uadd16 176 | #define __UADD8 _uadd8 177 | #define __UHADD16 _uhadd16 178 | #define __UHADD8 _uhadd8 179 | #define __UASX _uaddsubx 180 | #define __UHSUB16 _uhsub16 181 | #define __UHSUB8 _uhsub8 182 | #define __UQADD16 _uqadd16 183 | #define __UQADD8 _uqadd8 184 | #define __UQASX _uqaddsubx 185 | #define __UQSUB16 _uqsub16 186 | #define __UQSUB8 _uqsub8 187 | #define __UQSAX _uqsubaddx 188 | #define __USAD8 _usad8 189 | #define __USAT16 _usat16 190 | #define __USUB16 _usub16 191 | #define __USUB8 _usub8 192 | #define __USAX _usubaddx 193 | #define __UXTAB _uxtab 194 | #define __UXTAB16 _uxtab16 195 | #define __UXTAH _uxtah 196 | #define __UXTB16 _uxtb16 197 | #endif /*__TI_TMS470_V7M4__*/ 198 | 199 | #endif /*CMSIS_CCS_H_*/ 200 | -------------------------------------------------------------------------------- /software/common/platform/core_cmFunc.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file core_cmFunc.h 3 | * @brief CMSIS Cortex-M Core Function Access Header File 4 | * @version V4.30 5 | * @date 20. October 2015 6 | ******************************************************************************/ 7 | /* Copyright (c) 2009 - 2015 ARM LIMITED 8 | 9 | All rights reserved. 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | - Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | - Neither the name of ARM nor the names of its contributors may be used 18 | to endorse or promote products derived from this software without 19 | specific prior written permission. 20 | * 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE 25 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | POSSIBILITY OF SUCH DAMAGE. 32 | ---------------------------------------------------------------------------*/ 33 | 34 | 35 | #if defined ( __ICCARM__ ) 36 | #pragma system_include /* treat file as system include file for MISRA check */ 37 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) 38 | #pragma clang system_header /* treat file as system include file */ 39 | #endif 40 | 41 | #ifndef __CORE_CMFUNC_H 42 | #define __CORE_CMFUNC_H 43 | 44 | 45 | /* ########################### Core Function Access ########################### */ 46 | /** \ingroup CMSIS_Core_FunctionInterface 47 | \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions 48 | @{ 49 | */ 50 | 51 | /*------------------ RealView Compiler -----------------*/ 52 | #if defined ( __CC_ARM ) 53 | #include "cmsis_armcc.h" 54 | 55 | /*------------------ ARM Compiler V6 -------------------*/ 56 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) 57 | #include "cmsis_armcc_V6.h" 58 | 59 | /*------------------ GNU Compiler ----------------------*/ 60 | #elif defined ( __GNUC__ ) 61 | #include "cmsis_gcc.h" 62 | 63 | /*------------------ ICC Compiler ----------------------*/ 64 | #elif defined ( __ICCARM__ ) 65 | #include 66 | 67 | /*------------------ TI CCS Compiler -------------------*/ 68 | #elif defined ( __TMS470__ ) 69 | #include 70 | 71 | /*------------------ TASKING Compiler ------------------*/ 72 | #elif defined ( __TASKING__ ) 73 | /* 74 | * The CMSIS functions have been implemented as intrinsics in the compiler. 75 | * Please use "carm -?i" to get an up to date list of all intrinsics, 76 | * Including the CMSIS ones. 77 | */ 78 | 79 | /*------------------ COSMIC Compiler -------------------*/ 80 | #elif defined ( __CSMC__ ) 81 | #include 82 | 83 | #endif 84 | 85 | /*@} end of CMSIS_Core_RegAccFunctions */ 86 | 87 | #endif /* __CORE_CMFUNC_H */ 88 | -------------------------------------------------------------------------------- /software/common/platform/core_cmInstr.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file core_cmInstr.h 3 | * @brief CMSIS Cortex-M Core Instruction Access Header File 4 | * @version V4.30 5 | * @date 20. October 2015 6 | ******************************************************************************/ 7 | /* Copyright (c) 2009 - 2015 ARM LIMITED 8 | 9 | All rights reserved. 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | - Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | - Neither the name of ARM nor the names of its contributors may be used 18 | to endorse or promote products derived from this software without 19 | specific prior written permission. 20 | * 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE 25 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | POSSIBILITY OF SUCH DAMAGE. 32 | ---------------------------------------------------------------------------*/ 33 | 34 | 35 | #if defined ( __ICCARM__ ) 36 | #pragma system_include /* treat file as system include file for MISRA check */ 37 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) 38 | #pragma clang system_header /* treat file as system include file */ 39 | #endif 40 | 41 | #ifndef __CORE_CMINSTR_H 42 | #define __CORE_CMINSTR_H 43 | 44 | 45 | /* ########################## Core Instruction Access ######################### */ 46 | /** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface 47 | Access to dedicated instructions 48 | @{ 49 | */ 50 | 51 | /*------------------ RealView Compiler -----------------*/ 52 | #if defined ( __CC_ARM ) 53 | #include "cmsis_armcc.h" 54 | 55 | /*------------------ ARM Compiler V6 -------------------*/ 56 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) 57 | #include "cmsis_armcc_V6.h" 58 | 59 | /*------------------ GNU Compiler ----------------------*/ 60 | #elif defined ( __GNUC__ ) 61 | #include "cmsis_gcc.h" 62 | 63 | /*------------------ ICC Compiler ----------------------*/ 64 | #elif defined ( __ICCARM__ ) 65 | #include 66 | 67 | /*------------------ TI CCS Compiler -------------------*/ 68 | #elif defined ( __TMS470__ ) 69 | #include 70 | 71 | /*------------------ TASKING Compiler ------------------*/ 72 | #elif defined ( __TASKING__ ) 73 | /* 74 | * The CMSIS functions have been implemented as intrinsics in the compiler. 75 | * Please use "carm -?i" to get an up to date list of all intrinsics, 76 | * Including the CMSIS ones. 77 | */ 78 | 79 | /*------------------ COSMIC Compiler -------------------*/ 80 | #elif defined ( __CSMC__ ) 81 | #include 82 | 83 | #endif 84 | 85 | /*@}*/ /* end of group CMSIS_Core_InstructionInterface */ 86 | 87 | #endif /* __CORE_CMINSTR_H */ 88 | -------------------------------------------------------------------------------- /software/common/platform/core_cmSimd.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file core_cmSimd.h 3 | * @brief CMSIS Cortex-M SIMD Header File 4 | * @version V4.30 5 | * @date 20. October 2015 6 | ******************************************************************************/ 7 | /* Copyright (c) 2009 - 2015 ARM LIMITED 8 | 9 | All rights reserved. 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | - Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | - Neither the name of ARM nor the names of its contributors may be used 18 | to endorse or promote products derived from this software without 19 | specific prior written permission. 20 | * 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE 25 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | POSSIBILITY OF SUCH DAMAGE. 32 | ---------------------------------------------------------------------------*/ 33 | 34 | 35 | #if defined ( __ICCARM__ ) 36 | #pragma system_include /* treat file as system include file for MISRA check */ 37 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) 38 | #pragma clang system_header /* treat file as system include file */ 39 | #endif 40 | 41 | #ifndef __CORE_CMSIMD_H 42 | #define __CORE_CMSIMD_H 43 | 44 | #ifdef __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | 49 | /* ################### Compiler specific Intrinsics ########################### */ 50 | /** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics 51 | Access to dedicated SIMD instructions 52 | @{ 53 | */ 54 | 55 | /*------------------ RealView Compiler -----------------*/ 56 | #if defined ( __CC_ARM ) 57 | #include "cmsis_armcc.h" 58 | 59 | /*------------------ ARM Compiler V6 -------------------*/ 60 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) 61 | #include "cmsis_armcc_V6.h" 62 | 63 | /*------------------ GNU Compiler ----------------------*/ 64 | #elif defined ( __GNUC__ ) 65 | #include "cmsis_gcc.h" 66 | 67 | /*------------------ ICC Compiler ----------------------*/ 68 | #elif defined ( __ICCARM__ ) 69 | #include 70 | 71 | /*------------------ TI CCS Compiler -------------------*/ 72 | #elif defined ( __TMS470__ ) 73 | #include 74 | 75 | /*------------------ TASKING Compiler ------------------*/ 76 | #elif defined ( __TASKING__ ) 77 | /* 78 | * The CMSIS functions have been implemented as intrinsics in the compiler. 79 | * Please use "carm -?i" to get an up to date list of all intrinsics, 80 | * Including the CMSIS ones. 81 | */ 82 | 83 | /*------------------ COSMIC Compiler -------------------*/ 84 | #elif defined ( __CSMC__ ) 85 | #include 86 | 87 | #endif 88 | 89 | /*@} end of group CMSIS_SIMD_intrinsics */ 90 | 91 | 92 | #ifdef __cplusplus 93 | } 94 | #endif 95 | 96 | #endif /* __CORE_CMSIMD_H */ 97 | -------------------------------------------------------------------------------- /software/common/platform/debug.h: -------------------------------------------------------------------------------- 1 | //***************************************************************************** 2 | // 3 | // debug.h - Macros for assisting debug of the driver library. 4 | // 5 | // Copyright (c) 2006-2017 Texas Instruments Incorporated. All rights reserved. 6 | // Software License Agreement 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions 10 | // are met: 11 | // 12 | // Redistributions of source code must retain the above copyright 13 | // notice, this list of conditions and the following disclaimer. 14 | // 15 | // Redistributions in binary form must reproduce the above copyright 16 | // notice, this list of conditions and the following disclaimer in the 17 | // documentation and/or other materials provided with the 18 | // distribution. 19 | // 20 | // Neither the name of Texas Instruments Incorporated nor the names of 21 | // its contributors may be used to endorse or promote products derived 22 | // from this software without specific prior written permission. 23 | // 24 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | // 36 | // This is part of revision 2.1.4.178 of the Tiva Peripheral Driver Library. 37 | // 38 | //***************************************************************************** 39 | 40 | #ifndef __DRIVERLIB_DEBUG_H__ 41 | #define __DRIVERLIB_DEBUG_H__ 42 | 43 | //***************************************************************************** 44 | // 45 | // Prototype for the function that is called when an invalid argument is passed 46 | // to an API. This is only used when doing a DEBUG build. 47 | // assert_failed Function Definition exists in Can.c 48 | //***************************************************************************** 49 | __attribute__((naked)) void assert_failed (char const *file, int line); 50 | //extern void __error__(char *pcFilename, uint32_t ui32Line); 51 | 52 | //***************************************************************************** 53 | // 54 | // The ASSERT macro, which does the actual assertion checking. Typically, this 55 | // will be for procedure arguments in assembly to avoid pushing in the stack 56 | // if stack overflow happened. 57 | // 58 | //***************************************************************************** 59 | #ifdef DEBUG 60 | #define ASSERT(expr) do \ 61 | { \ 62 | if(!(expr)) \ 63 | { \ 64 | __asm volatile ( \ 65 | " ldr r0,=str_dflt\n\t" \ 66 | " mov r1,#1\n\t" \ 67 | " b assert_failed\n\t" \ 68 | "str_dflt: .asciz \"Default\"\n\t" \ 69 | " .align 2\n\t" \ 70 | ); \ 71 | assert_failed(__FILE__, __LINE__); \ 72 | } \ 73 | } \ 74 | while(0) 75 | #else 76 | #define ASSERT(expr) 77 | #endif 78 | 79 | #endif // __DRIVERLIB_DEBUG_H__ 80 | -------------------------------------------------------------------------------- /software/common/platform/hw_types.h: -------------------------------------------------------------------------------- 1 | //***************************************************************************** 2 | // 3 | // hw_types.h - Common types and macros. 4 | // 5 | // Copyright (c) 2005-2017 Texas Instruments Incorporated. All rights reserved. 6 | // Software License Agreement 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions 10 | // are met: 11 | // 12 | // Redistributions of source code must retain the above copyright 13 | // notice, this list of conditions and the following disclaimer. 14 | // 15 | // Redistributions in binary form must reproduce the above copyright 16 | // notice, this list of conditions and the following disclaimer in the 17 | // documentation and/or other materials provided with the 18 | // distribution. 19 | // 20 | // Neither the name of Texas Instruments Incorporated nor the names of 21 | // its contributors may be used to endorse or promote products derived 22 | // from this software without specific prior written permission. 23 | // 24 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | // 36 | // This is part of revision 2.1.4.178 of the Tiva Firmware Development Package. 37 | // 38 | //***************************************************************************** 39 | 40 | #ifndef __HW_TYPES_H__ 41 | #define __HW_TYPES_H__ 42 | 43 | //***************************************************************************** 44 | // 45 | // Macros for hardware access, both direct and via the bit-band region. 46 | // 47 | //***************************************************************************** 48 | #define HWREG(x) \ 49 | (*((volatile uint32 *)(x))) 50 | #define HWREGH(x) \ 51 | (*((volatile uint16 *)(x))) 52 | #define HWREGB(x) \ 53 | (*((volatile uint8 *)(x))) 54 | #define HWREGBITW(x, b) \ 55 | HWREG(((uint32)(x) & 0xF0000000) | 0x02000000 | \ 56 | (((uint32)(x) & 0x000FFFFF) << 5) | ((b) << 2)) 57 | #define HWREGBITH(x, b) \ 58 | HWREGH(((uint32)(x) & 0xF0000000) | 0x02000000 | \ 59 | (((uint32)(x) & 0x000FFFFF) << 5) | ((b) << 2)) 60 | #define HWREGBITB(x, b) \ 61 | HWREGB(((uint32)(x) & 0xF0000000) | 0x02000000 | \ 62 | (((uint32)(x) & 0x000FFFFF) << 5) | ((b) << 2)) 63 | 64 | //***************************************************************************** 65 | // 66 | // Helper Macros for determining silicon revisions, etc. 67 | // 68 | // These macros will be used by Driverlib at "run-time" to create necessary 69 | // conditional code blocks that will allow a single version of the Driverlib 70 | // "binary" code to support multiple(all) Tiva silicon revisions. 71 | // 72 | // It is expected that these macros will be used inside of a standard 'C' 73 | // conditional block of code, e.g. 74 | // 75 | // if(CLASS_IS_TM4C123) 76 | // { 77 | // do some TM4C123-class specific code here. 78 | // } 79 | // 80 | // By default, these macros will be defined as run-time checks of the 81 | // appropriate register(s) to allow creation of run-time conditional code 82 | // blocks for a common DriverLib across the entire Tiva family. 83 | // 84 | // However, if code-space optimization is required, these macros can be "hard- 85 | // coded" for a specific version of Tiva silicon. Many compilers will then 86 | // detect the "hard-coded" conditionals, and appropriately optimize the code 87 | // blocks, eliminating any "unreachable" code. This would result in a smaller 88 | // Driverlib, thus producing a smaller final application size, but at the cost 89 | // of limiting the Driverlib binary to a specific Tiva silicon revision. 90 | // 91 | //***************************************************************************** 92 | #ifndef CLASS_IS_TM4C123 93 | #define CLASS_IS_TM4C123 \ 94 | ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ 95 | (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_TM4C123)) 96 | #endif 97 | 98 | #ifndef CLASS_IS_TM4C129 99 | #define CLASS_IS_TM4C129 \ 100 | ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_VER_M | SYSCTL_DID0_CLASS_M)) == \ 101 | (SYSCTL_DID0_VER_1 | SYSCTL_DID0_CLASS_TM4C129)) 102 | #endif 103 | 104 | #ifndef REVISION_IS_A0 105 | #define REVISION_IS_A0 \ 106 | ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ 107 | (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_0)) 108 | #endif 109 | 110 | #ifndef REVISION_IS_A1 111 | #define REVISION_IS_A1 \ 112 | ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ 113 | (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_0)) 114 | #endif 115 | 116 | #ifndef REVISION_IS_A2 117 | #define REVISION_IS_A2 \ 118 | ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ 119 | (SYSCTL_DID0_MAJ_REVA | SYSCTL_DID0_MIN_2)) 120 | #endif 121 | 122 | #ifndef REVISION_IS_B0 123 | #define REVISION_IS_B0 \ 124 | ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ 125 | (SYSCTL_DID0_MAJ_REVB | SYSCTL_DID0_MIN_0)) 126 | #endif 127 | 128 | #ifndef REVISION_IS_B1 129 | #define REVISION_IS_B1 \ 130 | ((HWREG(SYSCTL_DID0) & (SYSCTL_DID0_MAJ_M | SYSCTL_DID0_MIN_M)) == \ 131 | (SYSCTL_DID0_MAJ_REVB | SYSCTL_DID0_MIN_1)) 132 | #endif 133 | 134 | //***************************************************************************** 135 | // 136 | // For TivaWare 2.1, we removed all references to Tiva IC codenames from the 137 | // source. To ensure that existing customer code doesn't break as a result 138 | // of this change, make sure that the old definitions are still available at 139 | // least for the time being. 140 | // 141 | //***************************************************************************** 142 | #ifndef DEPRECATED 143 | #define CLASS_IS_BLIZZARD CLASS_IS_TM4C123 144 | #define CLASS_IS_SNOWFLAKE CLASS_IS_TM4C123 145 | #endif 146 | 147 | #endif // __HW_TYPES_H__ 148 | -------------------------------------------------------------------------------- /software/common/platform/irq.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : irq.c ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Driver source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | /* For GNU GCC Compiler : 37 | * naked: This attribute allows the compiler to construct the requisite function declaration, 38 | * while allowing the body of the function to be assembly code. The 39 | * specified function will not have prologue/epilogue sequences generated by the 40 | * compiler. Only basic asm statements can safely be included in naked functions. 41 | * While using extended asm or a mixture of basic asm and C code may appear to work, 42 | * they cannot be depended upon to work reliably and are not supported. 43 | */ 44 | /* Enable all interrupts */ 45 | __attribute__((naked)) void irq_Enable(void) 46 | { 47 | __asm(" CPSIE I"); 48 | __asm(" BX LR") ; 49 | } 50 | 51 | /* Disable all interrupts */ 52 | 53 | __attribute__((naked)) void irq_Disable(void) 54 | { 55 | __asm(" CPSID I"); 56 | __asm(" BX LR") ; 57 | } 58 | -------------------------------------------------------------------------------- /software/common/platform/irq.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : irq.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : interrupts header file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | 37 | #ifndef IRQ_H_ 38 | #define IRQ_H_ 39 | 40 | void irq_Enable(void); 41 | void irq_Disable(void); 42 | 43 | 44 | #endif /* IRQ_H_ */ 45 | -------------------------------------------------------------------------------- /software/common/stubs/Dem.h: -------------------------------------------------------------------------------- 1 | /** 2 | * If an implementation defines implementation specific production errors, 3 | the Can module shall include the header file Dem.h. By this inclusion, the APIs to 4 | report production errors as well as the required Event Id symbols are included 5 | * 6 | * 7 | */ 8 | #ifndef DEM_H_ 9 | #define DEM_H_ 10 | 11 | 12 | 13 | #endif /* DEM_H_ */ 14 | -------------------------------------------------------------------------------- /software/common/stubs/Dem_IntErrorId.h: -------------------------------------------------------------------------------- 1 | #ifndef DEM_INTERRORID_H_ 2 | #define DEM_INTERRORID_H_ 3 | 4 | 5 | 6 | #endif /* DEM_INTERRORID_H_ */ 7 | -------------------------------------------------------------------------------- /software/common/stubs/Det.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Det.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Driver source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #ifndef __DET_H__ 36 | #define __DET_H__ 37 | 38 | #include "Std_Types.h" 39 | /* Module Version 1.0.0 */ 40 | #define DET_MAJOR_VERSION (1U) 41 | #define DET_MINOR_VERSION (0U) 42 | #define DET_PATCH_VERSION (0U) 43 | 44 | /* AUTOSAR Version 4.3.1 */ 45 | #define DET_AR_RELEASE_MAJOR_VERSION (4U) 46 | #define DET_AR_RELEASE_MINOR_VERSION (3U) 47 | #define DET_AR_RELEASE_PATCH_VERSION (1U) 48 | 49 | /* AUTOSAR checking between Std Types and CAN Modules */ 50 | #if ((STD_TYPES_AR_RELEASE_MAJOR_VERSION != DET_AR_RELEASE_MAJOR_VERSION)\ 51 | || (STD_TYPES_AR_RELEASE_MINOR_VERSION != DET_AR_RELEASE_MINOR_VERSION)\ 52 | || (STD_TYPES_AR_RELEASE_PATCH_VERSION != DET_AR_RELEASE_PATCH_VERSION)) 53 | #error "The AR version of Std_Types.h does not match the expected version" 54 | #endif 55 | 56 | 57 | /*****************************************************************************************/ 58 | /* Function Declaration */ 59 | /*****************************************************************************************/ 60 | 61 | Std_ReturnType Det_ReportError(uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId); 62 | 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /software/common/stubs/Os.h: -------------------------------------------------------------------------------- 1 | void syst_GetTimeStampus(uint64 * timer); 2 | -------------------------------------------------------------------------------- /software/common/stubs/Spi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Can module implementations for off-chip CAN controllers shall include 3 | the header file Spi.h. By this inclusion, the APIs to access an external CAN controller 4 | by the SPI module [12] are include 5 | * 6 | * 7 | */ 8 | 9 | #ifndef SPI_H_ 10 | #define SPI_H_ 11 | 12 | 13 | 14 | #endif /* SPI_H_ */ 15 | -------------------------------------------------------------------------------- /software/common/stubs/stub.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Stub.c ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-09-22 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Driver source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #include "Std_Types.h" 36 | #include "ComStack_Types.h" 37 | #include "CanIf_Cbk.h" 38 | 39 | uint8 ReadData=0; 40 | Std_ReturnType Det_ReportError(uint16 ModuleId, uint8 InstanceId, uint8 ApiId, 41 | uint8 ErrorId) 42 | { 43 | return 0; 44 | } 45 | 46 | void CanIf_TxConfirmation(PduIdType CanTxPduId) 47 | { 48 | 49 | } 50 | 51 | void CanIf_ControllerModeIndication( uint8 ControllerId, Can_ControllerStateType ControllerMode ) 52 | { 53 | 54 | } 55 | 56 | /** 57 | * \brief This callout function is called whenever a CAN message is 58 | * received in CAN driver. 59 | */ 60 | void CanIf_RxIndication 61 | ( 62 | const Can_HwType * Mailbox, 63 | const PduInfoType * PduInfoPtr 64 | ) 65 | 66 | { 67 | ReadData= *(PduInfoPtr->SduDataPtr); 68 | } 69 | 70 | void CanIf_ControllerBusOff(uint8 ControllerId) 71 | { 72 | 73 | } 74 | 75 | 76 | -------------------------------------------------------------------------------- /software/gendata/CanIf_Cbk.h: -------------------------------------------------------------------------------- 1 | #ifndef __CANIF_CBK_H__ 2 | #define __CANIF_CBK_H__ 3 | 4 | #include "Can_GeneralTypes.h" 5 | 6 | /* Module Version 1.0.0 */ 7 | #define CAN_IF_TYPES_SW_MAJOR_VERSION (1U) 8 | #define CAN_IF_TYPES_SW_MINOR_VERSION (0U) 9 | #define CAN_IF_TYPES_SW_PATCH_VERSION (0U) 10 | 11 | /* AUTOSAR Version 4.3.1 */ 12 | #define CAN_IF_TYPES_AR_RELEASE_MAJOR_VERSION (4U) 13 | #define CAN_IF_TYPES_AR_RELEASE_MINOR_VERSION (3U) 14 | #define CAN_IF_TYPES_AR_RELEASE_PATCH_VERSION (1U) 15 | 16 | 17 | #include "Std_Types.h" 18 | /* AUTOSAR checking between Std Types and CAN Modules */ 19 | #if ((STD_TYPES_AR_RELEASE_MAJOR_VERSION != CAN_IF_TYPES_AR_RELEASE_MAJOR_VERSION)\ 20 | || (STD_TYPES_AR_RELEASE_MINOR_VERSION != CAN_IF_TYPES_AR_RELEASE_MINOR_VERSION)\ 21 | || (STD_TYPES_AR_RELEASE_PATCH_VERSION != CAN_IF_TYPES_AR_RELEASE_PATCH_VERSION)) 22 | #error "The AR version of Std_Types.h does not match the expected version" 23 | #endif 24 | 25 | 26 | //typedef uint32 PduIdType; 27 | 28 | void CanIf_TxConfirmation(PduIdType CanTxPduId); 29 | 30 | /*apply the cnhages */ 31 | void CanIf_ControllerModeIndication( uint8 ControllerId, Can_ControllerStateType ControllerMode ); 32 | void CanIf_ControllerBusOff(uint8 ControllerId); 33 | /** 34 | * \brief This callout function is called whenever a CAN message is 35 | * received in CAN driver. 36 | */ 37 | extern void CanIf_RxIndication 38 | ( 39 | const Can_HwType * Mailbox, 40 | const PduInfoType * PduInfoPtr 41 | ); 42 | 43 | 44 | #endif //__CANIF_CBK_H__ 45 | -------------------------------------------------------------------------------- /software/gendata/CanIf_Cfg.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : CanIf_Cfg ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2019-10-20 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : CAN Interface source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of CAN Inteface, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | #ifndef __CANIF_CFG_H__ 36 | #define __CANIF_CFG_H__ 37 | 38 | #endif /* __CANIF_CFG_H__ */ -------------------------------------------------------------------------------- /software/gendata/Can_PBcfg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Can_PBcfg.c 3 | * 4 | * Created on: Sep 20, 2019 5 | * Author: Sad MultiVerse 6 | */ 7 | 8 | #include "Can.h" 9 | 10 | McuClockReferencePoint Clk = CLOCK; 11 | 12 | /*BaudRate Configuration For Controller 0*/ 13 | CanControllerBaudrateConfig CanControllerBaudrateConf[] = 14 | { 15 | { 16 | 500, /* BaudRate in Kbps */ 17 | CONTROLLER_0_BDR_ID, /* Baudrate Configuration ID */ 18 | 3, /* propagation delay */ 19 | 10, /* Phase1 */ 20 | 2, /* Phase2 */ 21 | 2 /* SJW */ 22 | } 23 | 24 | }; 25 | 26 | /* Controller0 Configuration */ 27 | CanController CanControllerCfg[] = 28 | { 29 | { 30 | 0, /* Controller ID */ 31 | 0x40040000, /* BASE Address */ 32 | &Clk, /* Reference to System clock in Hz */ 33 | &CanControllerBaudrateConf[0] /* Reference to Baudrate configuration */ 34 | }, 35 | { 36 | 1, /* Controller ID */ 37 | 0x40041000, /* BASE Address */ 38 | &Clk, /* Reference to System clock in Hz */ 39 | &CanControllerBaudrateConf[0] /* Reference to Baudrate configuration */ 40 | } 41 | }; 42 | 43 | /*Filter configuration for HOH0*/ 44 | CanHwFilter CanHwFilterHTH[] = 45 | { 46 | { 47 | 1, /* ID */ 48 | 0x7FF /* Mask.not used as it's TRANSMIT HOH */ 49 | } 50 | }; 51 | 52 | /*Filter configuration for HOH1*/ 53 | CanHwFilter CanHwFilterHRH[] = 54 | { 55 | { 56 | 2, /* ID */ 57 | 0x7FF /* Mask filter */ 58 | } 59 | , 60 | { 61 | 3, /* ID */ 62 | 0x7FF /* Mask filter */ 63 | } 64 | }; 65 | 66 | /*Configuration FOR all used Hardware objects*/ 67 | CanHardwareObject HOHObj[] = 68 | { 69 | { FULL, /* Can controller type for tm4c123gh6pm */ 70 | 1, /* Number of FIFO elements for this HOH */ 71 | STANDARD, /* Arbitration ID type */ 72 | HTH0_0, /* HOH ID */ 73 | TRANSMIT, /* HOH Type */ 74 | &CanControllerCfg[0], /* Reference to the controller this HOH belongs to */ 75 | &CanHwFilterHTH[0], /* Reference to the Filter configuartion */ 76 | FALSE /* Enable or diasble using polling */ 77 | }, 78 | { 79 | FULL, /* Can controller type for tm4c123gh6pm */ 80 | 1, /* Number of FIFO elements for this HOH */ 81 | STANDARD, /* Arbitration ID type */ 82 | HRH0_0, /* HOH ID */ 83 | RECEIVE, /* HOH Type */ 84 | &CanControllerCfg[0], /* Reference to the controller this HOH belongs to */ 85 | &CanHwFilterHRH[0], /* Reference to the Filter configuartion */ 86 | FALSE /* Enable or diasble using polling */ 87 | }, 88 | { 89 | FULL, /* Can controller type for tm4c123gh6pm */ 90 | 1, /* Number of FIFO elements for this HOH */ 91 | STANDARD, /* Arbitration ID type */ 92 | HTH0_1, /* HOH ID */ 93 | TRANSMIT, /* HOH Type */ 94 | &CanControllerCfg[0], /* Reference to the controller this HOH belongs to */ 95 | &CanHwFilterHTH[0], /* Reference to the Filter configuartion */ 96 | TRUE /* Enable or diasble using polling */ 97 | }, 98 | { 99 | FULL, /* Can controller type for tm4c123gh6pm */ 100 | 1, /* Number of FIFO elements for this HOH */ 101 | STANDARD, /* Arbitration ID type */ 102 | HRH0_1, /* HOH ID */ 103 | RECEIVE, /* HOH Type */ 104 | &CanControllerCfg[0], /* Reference to the controller this HOH belongs to */ 105 | &CanHwFilterHRH[1], /* Reference to the Filter configuartion */ 106 | TRUE /* Enable or diasble using polling */ 107 | } 108 | }; 109 | 110 | 111 | /*This is the type of the external data structure containing the overall initialization 112 | data for the CAN driver and SFR settings affecting all controllers. Furthermore it 113 | contains pointers to controller configuration structures. The contents of the 114 | initialization data structure are CAN hardware specific. */ 115 | const Can_ConfigType Can_Configurations = 116 | { 117 | CanControllerCfg, 118 | HOHObj 119 | }; 120 | -------------------------------------------------------------------------------- /software/gendata/Can_PBcfg.h: -------------------------------------------------------------------------------- 1 | #ifndef INCLUDES_CAN_PBCFG_H_ 2 | #define INCLUDES_CAN_PBCFG_H_ 3 | 4 | 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /software/gendata/Dio_Cfg.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Dio_Cfg.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2024-04-17 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : DIO Driver config header file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of DIO Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | 37 | #ifndef DIO_CFG_H_ 38 | #define DIO_CFG_H_ 39 | 40 | /* Pre-compile option for Development Error Detect */ 41 | #define DIO_DEV_ERROR_DETECT (STD_ON) 42 | 43 | /* Pre-compile option for Version Info API */ 44 | #define DIO_VERSION_INFO_API (STD_OFF) 45 | 46 | /* Pre-compile option for presence of Dio_FlipChannel API */ 47 | #define DIO_FLIP_CHANNEL_API (STD_ON) 48 | 49 | /* Number of the configured Dio Channels */ 50 | #define DIO_CONFIGURED_CHANNLES (2U) 51 | 52 | #endif /* DIO_CFG_H_ */ 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /software/gendata/Dio_Lcfg.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Dio_Lcfg.c ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2024-04-17 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : DIO Driver config source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of DIO Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | /*******************************************************************************/ 37 | /* Include headers */ 38 | /*******************************************************************************/ 39 | #include "Dio.h" 40 | #include "Port_MemMap.h" 41 | 42 | /*******************************************************************************/ 43 | /* Static Configurations */ 44 | /*******************************************************************************/ 45 | 46 | /*Array Of Channels Defined By User*/ 47 | Dio_ConfiguredChannel channels[DIO_CONFIGURED_CHANNLES] = { 48 | {CHANNEL_39, PORTA_ID, 1, OUTPUT}, 49 | {CHANNEL_35, PORTE_ID, 3, OUTPUT} 50 | }; 51 | -------------------------------------------------------------------------------- /software/gendata/EcuM_Cbk.h: -------------------------------------------------------------------------------- 1 | #ifndef ECUM_CBK_H_ 2 | #define ECUM_CBK_H_ 3 | 4 | 5 | 6 | #endif /* ECUM_CBK_H_ */ 7 | -------------------------------------------------------------------------------- /software/gendata/Port_Cbkh.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Port_Cbkh.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2024-04-17 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : Port Driver config header file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Port Driver Callbacks, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | #ifndef PORT_CBKH_H_ 37 | #define PORT_CBKH_H_ 38 | 39 | /*******************************************************************************/ 40 | /* Include headers */ 41 | /*******************************************************************************/ 42 | 43 | #endif /* PORT_CBKH_H_ */ 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /software/gendata/Port_Cfg.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Port_Cfg.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2024-04-17 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : Port Driver config header file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of Port Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | #ifndef PORT_CFG_H_ 37 | #define PORT_CFG_H_ 38 | 39 | /*******************************************************************************/ 40 | /* Include headers */ 41 | /*******************************************************************************/ 42 | 43 | /* 44 | * Module Version 1.0.0 45 | */ 46 | #define PORT_CFG_SW_MAJOR_VERSION (1U) 47 | #define PORT_CFG_SW_MINOR_VERSION (0U) 48 | #define PORT_CFG_SW_PATCH_VERSION (0U) 49 | 50 | /* 51 | * AUTOSAR Version 4.0.3 52 | */ 53 | #define PORT_CFG_AR_RELEASE_MAJOR_VERSION (4U) 54 | #define PORT_CFG_AR_RELEASE_MINOR_VERSION (0U) 55 | #define PORT_CFG_AR_RELEASE_PATCH_VERSION (3U) 56 | 57 | /* Pre-compile option for Development Error Detect */ 58 | #define PORT_DEV_ERROR_DETECT (STD_ON) 59 | 60 | /* Pre-compile option for Version Info API */ 61 | #define PORT_VERSION_INFO_API (STD_ON) 62 | 63 | /* Pre-compile option for presence of Port_SetPinDirection API */ 64 | #define PORT_SET_PIN_DIRECTION_API (STD_ON) 65 | 66 | /* Pre-compile option for presence of Port_SetPinMode API */ 67 | #define PORT_SET_PIN_MODE_API (STD_ON) 68 | 69 | /* Number of PINS */ 70 | #define PORT_CONFIGURED_PINS (43U) 71 | 72 | #endif /* PORT_CFG_H_ */ 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /software/gendata/Port_Lcfg.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Port_Lcfg.c ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2024-04-17 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : Port Driver config source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of Port Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | /*******************************************************************************/ 37 | /* Include headers */ 38 | /*******************************************************************************/ 39 | 40 | #include "Port.h" 41 | #include "Port_MemMap.h" 42 | 43 | /* Optional */ 44 | #include "Port_Cbkh.h" 45 | -------------------------------------------------------------------------------- /software/gendata/Port_PBcfg.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : Port_PBcfg.c ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2024-04-17 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : Port Driver config source file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of Port Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | /*******************************************************************************/ 37 | /* Include headers */ 38 | /*******************************************************************************/ 39 | 40 | #include "Port.h" 41 | #include "Port_MemMap.h" 42 | 43 | /* Optional */ 44 | #include "Port_Cbkh.h" 45 | 46 | /* PB structure used with Port_Init API */ 47 | const Port_ConfigType Port_PinConfig = 48 | {{{PORTA_ID, PA0, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 49 | {PORTA_ID, PA1, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 50 | {PORTA_ID, PA2, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 51 | {PORTA_ID, PA3, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 52 | {PORTA_ID, PA4, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 53 | {PORTA_ID, PA5, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 54 | {PORTA_ID, PA6, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 55 | {PORTA_ID, PA7, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 56 | {PORTB_ID, PB0, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 57 | {PORTB_ID, PB1, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 58 | {PORTB_ID, PB2, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 59 | {PORTB_ID, PB3, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 60 | {PORTB_ID, PB4, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 61 | {PORTB_ID, PB5, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 62 | {PORTB_ID, PB6, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 63 | {PORTB_ID, PB7, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 64 | {PORTC_ID, PC0, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_OFF, STD_OFF, STD_ON, STD_ON}, 65 | {PORTC_ID, PC1, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 66 | {PORTC_ID, PC2, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 67 | {PORTC_ID, PC3, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_OFF, STD_OFF, STD_ON, STD_ON}, 68 | {PORTC_ID, PC4, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 69 | {PORTC_ID, PC5, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 70 | {PORTC_ID, PC6, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 71 | {PORTC_ID, PC7, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 72 | {PORTD_ID, PD0, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 73 | {PORTD_ID, PD1, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 74 | {PORTD_ID, PD2, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 75 | {PORTD_ID, PD3, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 76 | {PORTD_ID, PD4, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 77 | {PORTD_ID, PD5, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 78 | {PORTD_ID, PD6, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 79 | {PORTD_ID, PD7, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_ON, STD_ON, STD_ON}, 80 | {PORTE_ID, PE0, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 81 | {PORTE_ID, PE1, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 82 | {PORTE_ID, PE2, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 83 | {PORTE_ID, PE3, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 84 | {PORTE_ID, PE4, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 85 | {PORTE_ID, PE5, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 86 | {PORTF_ID, PF0, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_ON, STD_ON, STD_ON}, 87 | {PORTF_ID, PF1, PORT_PIN_OUT, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 88 | {PORTF_ID, PF2, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 89 | {PORTF_ID, PF3, PORT_PIN_IN, OFF, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}, 90 | {PORTF_ID, PF4, PORT_PIN_IN, PULL_UP, PORT_PIN_LEVEL_LOW, PORT_PIN_MODE_DIO, STD_ON, STD_OFF, STD_ON, STD_ON}}}; -------------------------------------------------------------------------------- /software/gendata/SchM_Can.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHM_CAN_H_ 2 | #define SCHM_CAN_H_ 3 | 4 | 5 | 6 | #endif /* SCHM_CAN_H_ */ 7 | -------------------------------------------------------------------------------- /software/gendata/SchM_Dio.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : SchM_Dio.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2024-04-17 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : DIO Driver Schm file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of DIO Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | #ifndef DIO_SCHM_H_ 37 | #define DIO_SCHM_H_ 38 | 39 | #endif /* SCHM */ 40 | 41 | 42 | -------------------------------------------------------------------------------- /software/gendata/SchM_Port.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** ** 3 | ** Copyright (C) AUTOSarZs olc (2019) ** 4 | ** ** 5 | ** All rights reserved. ** 6 | ** ** 7 | ** This document contains proprietary information belonging to AUTOSarZs ** 8 | ** olc . Passing on and copying of this document, and communication ** 9 | ** of its contents is not permitted without prior written authorization. ** 10 | ** ** 11 | ******************************************************************************** 12 | ** ** 13 | ** FILENAME : SchM_Port.h ** 14 | ** ** 15 | ** VERSION : 1.0.0 ** 16 | ** ** 17 | ** DATE : 2024-04-17 ** 18 | ** ** 19 | ** VARIANT : Variant PB ** 20 | ** ** 21 | ** PLATFORM : TIVA C ** 22 | ** ** 23 | ** AUTHOR : AUTOSarZs-DevTeam ** 24 | ** ** 25 | ** VENDOR : AUTOSarZs OLC ** 26 | ** ** 27 | ** ** 28 | ** DESCRIPTION : PORT Driver Schm file ** 29 | ** ** 30 | ** SPECIFICATION(S) : Specification of PORT Driver, AUTOSAR Release 4.3.1 ** 31 | ** ** 32 | ** MAY BE CHANGED BY USER : no ** 33 | ** ** 34 | *******************************************************************************/ 35 | 36 | #ifndef PORT_SCHM_H_ 37 | #define PORT_SCHM_H_ 38 | 39 | #endif /* PORT_SCHM */ 40 | 41 | 42 | -------------------------------------------------------------------------------- /tools/build/CMake/build_toolchain.cmake: -------------------------------------------------------------------------------- 1 | set(COMMON_FLAGS "-mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=soft -mfpu=fpv4-sp-d16 -DPART_TM4C123GH6PZ -Og -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall") 2 | 3 | set(CMAKE_C_FLAGS "${COMMON_FLAGS}") 4 | set(CMAKE_CXX_FLAGS "${COMMON_FLAGS}") 5 | 6 | set(CMAKE_C_COMPILER ${TOOLCHAIN_DIR}/bin/arm-eabi-gcc) 7 | set(CMAKE_CXX_COMPILER ${TOOLCHAIN_DIR}/bin/arm-eabi-gcc) 8 | set(CMAKE_AR ${TOOLCHAIN_DIR}/bin/arm-eabi-ar) 9 | 10 | set(CMAKE_EXE_LINKER_FLAGS "-specs=nosys.specs -mthumb -Wl,-Map,app_swc.map -Wl,--build-id=none") 11 | 12 | set(CMAKE_C_CREATE_STATIC_LIBRARY " -crs ") 13 | 14 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 15 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) 16 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) 17 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH) 18 | -------------------------------------------------------------------------------- /tools/build/CMake/cmockConfig.yml: -------------------------------------------------------------------------------- 1 | --- 2 | :cmock: 3 | :plugins: 4 | - :array 5 | - :ignore 6 | - :callback 7 | - :return_thru_ptr 8 | - :ignore_arg 9 | - :expect_any_args 10 | :includes: [] 11 | :mock_path: ./mocks 12 | :mock_prefix: mock_ 13 | :treat_externs: :include 14 | :treat_as: 15 | uint8: HEX8 16 | uint16: HEX16 17 | uint32: UINT32 18 | int8: INT8 19 | bool: UINT8 20 | void: void 21 | 22 | -------------------------------------------------------------------------------- /tools/build/CMake/test_toolchain.cmake: -------------------------------------------------------------------------------- 1 | set(COMMON_FLAGS "-Og -g -Wall --coverage") 2 | 3 | set(CMAKE_C_FLAGS "${COMMON_FLAGS}") 4 | set(CMAKE_CXX_FLAGS "${COMMON_FLAGS}") 5 | 6 | set(CMAKE_C_COMPILER gcc) 7 | set(CMAKE_CXX_COMPILER g++) 8 | set(CMAKE_AR ar) 9 | 10 | set(CMAKE_EXE_LINKER_FLAGS "-Wl,-Map,test_swc.map") 11 | 12 | set(CMAKE_C_CREATE_STATIC_LIBRARY " -crs ") 13 | 14 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 15 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) 16 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) 17 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH) 18 | -------------------------------------------------------------------------------- /tools/build/CMake/user.cmake: -------------------------------------------------------------------------------- 1 | message(STATUS "SW_DIR = ${SW_DIR}") 2 | message(STATUS "BUILD_TESTS_DIR = ${BUILD_TESTS_DIR}") 3 | 4 | set( CMAKE_INSTALL_PREFIX "./" CACHE PATH "Default install path") 5 | 6 | ############################################################################## 7 | # Common Directories # 8 | ############################################################################## 9 | set( common_includes "${SW_DIR}/common/includes" CACHE PATH "Default") 10 | set( platform "${SW_DIR}/common/platform" CACHE PATH "Default") 11 | set( stubs "${SW_DIR}/common/stubs" CACHE PATH "Default") 12 | 13 | set( application_dir "${SW_DIR}/application" CACHE PATH "Default") 14 | set( bsw_dir "${SW_DIR}/bsw" CACHE PATH "Default") 15 | set( mcal_dir "${SW_DIR}/bsw/mcal" CACHE PATH "Default") 16 | 17 | set( gendata "${SW_DIR}/gendata" CACHE PATH "Default") 18 | 19 | ############################################################################## 20 | # MCAL Software Components # 21 | ############################################################################## 22 | set( can_swc "${SW_DIR}/bsw/mcal/can_swc" CACHE PATH "Default") 23 | set( port_swc "${SW_DIR}/bsw/mcal/port_swc" CACHE PATH "Default") 24 | set( dio_swc "${SW_DIR}/bsw/mcal/dio_swc" CACHE PATH "Default") 25 | 26 | ############################################################################## 27 | # App Software Components # 28 | ############################################################################## 29 | set( app_swc "${SW_DIR}/application/app_swc" CACHE PATH "Default") 30 | 31 | ############################################################################## 32 | # Frameworks # 33 | ############################################################################## 34 | 35 | set( CMOCK_ROOT_DIR "/workspace/tools/frameworks/CMock" CACHE PATH "Default") 36 | set( UNITY_ROOT_DIR "${CMOCK_ROOT_DIR}/vendor/unity" CACHE PATH "Default") 37 | 38 | set(CMOCK_SCRIPT "${CMOCK_ROOT_DIR}/lib/cmock.rb") 39 | set(CMOCK_CONFIG_FILE "/workspace/tools/build/CMake/cmockConfig.yml") 40 | 41 | ############################################################################## 42 | # Dependencies # 43 | ############################################################################## 44 | set( 45 | unity_common_sources 46 | 47 | ${UNITY_ROOT_DIR}/src/unity.c 48 | ${UNITY_ROOT_DIR}/extras/fixture/src/unity_fixture.c 49 | ${CMOCK_ROOT_DIR}/src/cmock.c 50 | ) 51 | set( 52 | unity_common_includes 53 | 54 | ${CMOCK_ROOT_DIR}/src 55 | ${UNITY_ROOT_DIR}/src 56 | ${UNITY_ROOT_DIR}/extras/fixture/src 57 | ${UNITY_ROOT_DIR}/extras/memory/src/ 58 | ) 59 | ############################################################################## 60 | # Functions # 61 | ############################################################################## 62 | function(extract_module_path source_var_name dest_var_name) 63 | # Extract the desired path 64 | string(REGEX REPLACE "^/workspace" "" MODULE_PATH "${${source_var_name}}") 65 | 66 | # Concatenate with BUILD_TESTS_DIR 67 | set(${dest_var_name} "${BUILD_TESTS_DIR}${MODULE_PATH}" PARENT_SCOPE) 68 | endfunction() -------------------------------------------------------------------------------- /tools/build/IDEs/CCS/.ccsproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tools/build/IDEs/CCS/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | AutosarzsProject 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 15 | full,incremental, 16 | 17 | 18 | 19 | 20 | 21 | com.ti.ccstudio.core.ccsNature 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.core.ccnature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | 29 | software 30 | 2 31 | PARENT-4-PROJECT_LOC/software 32 | 33 | 34 | 35 | --------------------------------------------------------------------------------