Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 75 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,75 @@
# DaVinci Samples

Welcome to **DaVinci Samples**, an open-source repository designed to help developers understand and adopt **DaVinci Configurator Classic Version 6** workflows more easily.

## 📌 What is This Repository For?

This repository provides sample resources to help you integrate DaVinci Configurator Classic Version 6 workflows:

- **Ready-Set-Go-Scripts** demonstrating how DaVinci Configurator Classic Version 6 integrates into typical MICROSAR projects.
- Create a new DaVinci project and link additional workspaces.
- Project Import and Update
- **Project-Migration**
- Tool Migration (DaVinci Configurator, DaVinci Developer, vVIRTUALtarget)
- BSW-Package Migration Trigger
- Diagnostic Import
- Store User Code Blocks
- **Build-Starter** shows how to build and automate configurations using Bazel and modern build systems. You can leverage various Bazel rules depending on your build needs:
- Create a new DaVinci Project or reuse an existing one
- Execute EcuC-as-Code
- Project Import and Update
- Validate and generate the DaVinci Project

## 🛠 Requirements

Always required:

- Activated DaVinci Configurator Classic Version 6 License
- A valid MICROSAR BSW package

If using scripts:

- DaVinci Developer Classic (Release 4.17 SP2 or newer)
- DaVinci Team (Release 6.2 or newer)

If using pipelines (if using Bazel):

- Bazel by Google (see [.bazeliskrc](.bazeliskrc) for version)

If using EcuC as Code:

- EcuC-As-Code Development Kit

## 🚀 Getting Started

1. Clone the repository:

```bash
git clone https://github.com/vectorgrp/davinci-samples.git
```

2. Explore the samples:
- Navigate to the folder that matches your use case.
3. Follow the instructions in each folder’s README to get started.

## 📂 Repository Structure

```text
davinci-samples/
├─ build-starter/ # Bazel-based project setup example
├─ project-migration/ # Project migration template as example workflow
├─ ready-set-go-scripts/ # Ready-to-use scripts for quick workflow setup
├─ .bazelrc # Bazel configuration file defining build options and settings
├─ .editorconfig # Editor configuration for consistent coding styles across IDEs
├─ .gitignore # Specifies files and directories to be ignored by Git
├─ LICENSE # License information
├─ MODULE.bazel # Bazel module definition for dependency management
├─ MODULE.bazel.lock # Lock file for Bazel module dependencies to ensure reproducible builds
├─ README.md # Main documentation for the repository
└─ SECURITY.md # Security policy
```

## 📖 Documentation

Check the repository folders for step-by-step guides and explanations.

[Learn more about DaVinci Configurator Classic Version 6.](https://help.vector.com/davinci-configurator-classic/en/current/index.html)
# DaVinci Samples

Welcome to **DaVinci Samples**, an open-source repository designed to help developers understand and adopt **DaVinci Configurator Classic Version 6** workflows more easily.

## 📌 What is This Repository For?

This repository provides sample resources to help you integrate DaVinci Configurator Classic Version 6 workflows:

- **Ready-Set-Go-Scripts** demonstrating how DaVinci Configurator Classic Version 6 integrates into typical MICROSAR projects.
- **davinci-workspace-setup**: Create a new DaVinci Project and link additional workspaces. Execute project import and update.
- **project-migration**: Project migration template as example workflow.
- **Project-Migration**
- Tool Migration (DaVinci Configurator, DaVinci Developer, vVIRTUALtarget)
- BSW-Package Migration Trigger
- Diagnostic Import
- Store User Code Blocks
- **Build-Starter** shows how to build and automate configurations using Bazel and modern build systems. You can leverage various Bazel rules depending on your build needs:
- Create a new DaVinci Project or reuse an existing one
- Execute EcuC-as-Code
- Project Import and Update
- Validate and generate the DaVinci Project

## 🛠 Requirements

Always required:

- Activated DaVinci Configurator Classic Version 6 License
- A valid MICROSAR BSW package

If using scripts:

- DaVinci Developer Classic (Release 4.17 SP2 or newer)
- DaVinci Team (Release 6.2 or newer)

If using pipelines (if using Bazel):

- Bazel by Google (see [.bazeliskrc](.bazeliskrc) for version)

If using EcuC as Code:

- EcuC-As-Code Development Kit

## 🚀 Getting Started

1. Clone the repository:

```bash
git clone https://github.com/vectorgrp/davinci-samples.git
```

2. Explore the samples:
- Navigate to the folder that matches your use case.
3. Follow the instructions in each folder’s README to get started.

## 📂 Repository Structure

```text
davinci-samples/
├─ build-starter/ # Bazel-based project setup example
├─ ready-set-go-scripts/ # Ready-to-use scripts for quick workflow setup
├─ .bazelrc # Bazel configuration file defining build options and settings
├─ .editorconfig # Editor configuration for consistent coding styles across IDEs
├─ .gitignore # Specifies files and directories to be ignored by Git
├─ LICENSE # License information
├─ MODULE.bazel # Bazel module definition for dependency management
├─ MODULE.bazel.lock # Lock file for Bazel module dependencies to ensure reproducible builds
├─ README.md # Main documentation for the repository
└─ SECURITY.md # Security policy
```

## 📖 Documentation

Check the repository folders for step-by-step guides and explanations.

[Learn more about DaVinci Configurator Classic Version 6.](https://help.vector.com/davinci-configurator-classic/en/current/index.html)
52 changes: 2 additions & 50 deletions ready-set-go-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,5 @@
## 📦 What Does This Folder Contain?

- **Ready-Set-Go-Scripts** demonstrating how DaVinci Configurator Classic integrates into typical MICROSAR projects.

- Create a new DaVinci Project and link additional workspaces
- Project Import and Update

## 🧩 Ready-Set-Go-Script Options

- **DaVinci_WorkspaceSetup.bat** sets up and links DaVinci workspaces, and executes input file processing and updates.

This script automates the creation and setup of DaVinci projects using both DaVinci Configurator Classic and DaVinci Developer Classic.
It ensures workspaces exist or creates them, links CFG6 and DEV workspaces, analyzes input files with EcuXPro derives ECU configuration, and updates the CFG6 project automatically.
Note: This script is for a non-variant project only!

```mermaid
flowchart TB
subgraph B["Step 1: Store variables"]
B1["Step 1.1: Ask user for tool installation paths"]
B2["Step 1.2: Project specifics"]
B3["Step 1.3: Tool-specific variables"]
B1 --> B2 --> B3
end
subgraph C["Step 2: Check workspaces"]
C1["Ask for CFG6 workspace"]
C2["Ask for DEV workspace"]
end
A["Step 0: Initialize logging"] --> B
B --> C
C --> |"Workspaces do not exist "|D["Step 3: Create missing workspaces/projects"]
C --> |"Workspaces exist"|E
D --> E["Step 4: Convert and link DEV workspace to CFG6 workspace"]
E --> F["Step 5: Add DEV workspace reference to General.json"]
F --> G["Step 6: Analyze input files with EcuXPro"]
G --> H["Step 7: Execute extractSystemDesc.bat after path update"]
H --> I["Step 8: Derive ECUC from MergedECUExtract.arxml"]
I --> J["Step 9: Project update"]
J --> K["Step 10: Log completion"]
```

## 🚀 Getting Started with DaVinci_WorkspaceSetup.bat

1. Set variables in Step 1 as needed.
2. Run the script by double-clicking or executing via command line.
3. Check the output (Log file: Output_Log.txt).

## 🪄 Tips

- Always verify that installation paths are correct before running the script.
- Enclose paths in double quotes to handle spaces.
- Use the log file (Output_Log.txt) to debug any issues.
- This script assumes a basic understanding of AUTOSAR and DaVinci project structure.
- This script assumes either no CFG6 and/or DEV workspaces exist beforehand OR that the existing workspaces have never been linked before
- **davinci-workspace-setup**: Create a new DaVinci Project and link additional workspaces. Execute project import and update.
- **project-migration**: Project migration template as example workflow.
46 changes: 46 additions & 0 deletions ready-set-go-scripts/davinci-workspace-setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Ready-Set-Go-Script DaVinci Workspace Setup

- **DaVinci_WorkspaceSetup.bat** sets up and links DaVinci workspaces, and executes input file processing and updates.

This script automates the creation and setup of DaVinci projects using both DaVinci Configurator Classic and DaVinci Developer Classic.
It ensures workspaces exist or creates them, links CFG6 and DEV workspaces, analyzes input files with EcuXPro derives ECU configuration, and updates the CFG6 project automatically.
Note: This script is for a non-variant project only!

```mermaid
flowchart TB
subgraph B["Step 1: Store variables"]
B1["Step 1.1: Ask user for tool installation paths"]
B2["Step 1.2: Project specifics"]
B3["Step 1.3: Tool-specific variables"]
B1 --> B2 --> B3
end
subgraph C["Step 2: Check workspaces"]
C1["Ask for CFG6 workspace"]
C2["Ask for DEV workspace"]
end
A["Step 0: Initialize logging"] --> B
B --> C
C --> |"Workspaces do not exist "|D["Step 3: Create missing workspaces/projects"]
C --> |"Workspaces exist"|E
D --> E["Step 4: Convert and link DEV workspace to CFG6 workspace"]
E --> F["Step 5: Add DEV workspace reference to General.json"]
F --> G["Step 6: Analyze input files with EcuXPro"]
G --> H["Step 7: Execute extractSystemDesc.bat after path update"]
H --> I["Step 8: Derive ECUC from MergedECUExtract.arxml"]
I --> J["Step 9: Project update"]
J --> K["Step 10: Log completion"]
```

## 🚀 Getting Started with DaVinci_WorkspaceSetup.bat

1. Set variables in Step 1 as needed.
2. Run the script by double-clicking or executing via command line.
3. Check the output (Log file: Output_Log.txt).

## 🪄 Tips

- Always verify that installation paths are correct before running the script.
- Enclose paths in double quotes to handle spaces.
- Use the log file (Output_Log.txt) to debug any issues.
- This script assumes a basic understanding of AUTOSAR and DaVinci project structure.
- This script assumes either no CFG6 and/or DEV workspaces exist beforehand OR that the existing workspaces have never been linked before
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ flowchart TD

The BSW package migration in the GUI works the same way as it did in DvCfg5.
To enable the diagnostic import afterwards, the following steps must be executed:
[BSW-Package migration 1](_images/sip_migration_1.png), [BSW-Package migration 2](_images/sip_migration_2.png) and [BSW-Package migration 3](_images/sip_migration_3.png). If in the following project load an error pops up, it is recommended to check the Output\Log\ProjectLoad\ModelMergeReport.sarif file. These errors are mostly merge errors caused by AUTOSAR elements being defined in multiple files.
[BSW-Package migration 1](_images/sip_migration_1.png), [BSW-Package migration 2](_images/sip_migration_2.png) and [BSW-Package migration 3](_images/sip_migration_3.png). If in the following project load an error pops up, it is recommended to check the Output\Log\ProjectLoad\ModelMergeReport.sarif file. These errors are mostly merge errors caused by AUTOSAR elements being defined in multiple files. The recommendation is to solve these conflicts manually to make sure everything is merged correct. A description on how to do this is given in the documentation: [Model Merge Behavior on Project Load](https://help.vector.com/davinci-configurator-classic/en/current/dvcfg-classic/6.2.3-SP2/configuration/projects/model-merge-on-project-load.html). In general it is also possible to solve the conflicts with the setting _"allowMergeConflicts": true_. If using this option it is still required to check the merge results to make sure all decisions were made correct.

After completing these steps, the BSW package migration is triggered, and the next step in the workflow can be executed.

> For more information, see [Migrating Project to Newer BSW Package](https://help.vector.com/davinci-configurator-classic/en/current/dvcfg-classic/6.2-SP0/migration/bsw-migration.html)
Expand Down