Toolchain Workflow
From Arctic Core - the open source AUTOSAR embedded platform
Toolchain Workflow
Setup Project
Follow the quick start tutorial to create your project. Quick-start Tutorial
Create Component Library
Software component models are stored in one or several arxml files. To create a new arxml file press File -> New -> Other and select "Autosar File" Right click on your new autosar file and press Open With -> Swc Builder.
Configure Component Library
In Swc Builder you will see all Autosar objects in the project (Model Domain), at the top level you have packages. Packages are used to group your objects. For example, you can have one package where you store all interfaces and one package to store all data types. You will probably see only one package that was automatically created in your new file. If you have other arxml files in your project you will see packages from these files too, these packages will have a small chain icon that indicates they are stored in a different file.
To get a quick start, select your top package and press "Add Component Kit" You will then get a package with the basic objects you need for a software component.
When you have created some objects, open the Autosar Validation view. If you dont have it visible in your workspace open it from Window -> Show View -> Autosar Validation. Then you press the validation button in SWC Builder:
Create Extract
The extract contains all software components instantiated at one Ecu. To create a new extract press File -> New -> Other and select Ecu Extract. Right click on your new file and press Open With -> Extract Builder.
The first page in Extract Builder will list all software somponents available in all arxml files in the current project. Select the components you want to instantiate on one Ecu.
Connect Components
In Extract Builder open the page "Port Mappings"
In this page you connect ports to other ports. Ports can also be connected to signals coming from the Com module, there will be no signals visible yet because the Com module is not configured.
Create Ecu Configuration
Now when you have the Ecu Extract it is time to configure the Ecu. To create a new Ecu Configuration press File -> New -> Other and select Ecu Configuration. Right click on the new file and select Open With -> BSW Builder.
Configure Com and IO Hardware Abstraction
Com and IO Hardware Abstraction are modules which enables the software components to communicate outside the Ecu. These modules create elements that you can connect ports to using Extract Builder.
Configure Com
The easiest way of setting up COM and the entire COM-stack is to import a CanDB file. If you have such a file use the "Import..." button on the overview page. Otherwise press "Add.." and select Com and EcuC.
Each PDU in your ECU configuration needs to be defined in the EcuC editor. Open this editor and add your PDUs. Also select a nice name for them and define their sizes.
Proceed to the COM editor and configure all your PDUs and signals. For each of the signals that you add, a corresponding system signal will be created to which you can later connect a port in Extract Builder.
Configure IO Hardware Abstraction
If you want your software components to connect to the peripheral devices of you MCU (i.e. DIO, ADC, PWM) you need to add these modules and IO Hardware Abstraction to your ECU. Configure each of the drivers that you use.
IO Hardware Abstaction has no configurable elements. But when you have it in your Ecu Configuration, model objects will be available for software components to use. You might want to go back to SWC Builder and use interfaces created by IO Hardware abstraction. In Extract Builder you will also be able to add the IoHwAb-component to your extract, and connect your ports to it.
Assign BSW generated interfaces
When you have configured IO Hardware Abstraction and other perhipheral modules, new objects should be available for software components to use. Open Swc Builder and expand the ecu package, you should see something similiar to this:
In Extract Builder the IO Hardware Abstraction component should be visible, go ahead and add it to your extract.
Connect BSW signals and ports
Now when the Com module is configured there will be signals to map to ports in Extract Builder. There will also be a be a new component generated by IO Hardware Abstraction. Open Extract Builder and connect signals and ports in the "Port Mappings" page.
Configure other BSW modules
There are several BSW modules in Arctic Core, you dont need to use all of them. The minimum requirements to run Arctic Core is to have these modules: Os, EcuM and Mcu.
Configure RTE
Open BSW Builder and add the RTE module with the "Add.." button. First you need to select your Ecu extract in the top left part. Then press "Synchronize ECU Extract" All your components instantiated on this Ecu will show up, they will either have a green check or a red error sign on. If they are red there is something missing in the software component, common misstakes are to forget to assign an Internal Behavior object or an Implementation object.
When your components are marked with a green check you can start to map Runnables to Tasks. In the "Runnable to Task Mappings" section you simply drag one of the runnables under "Unmapped Runnables" to one of your tasks. Tasks can be edited in the OS module in BSW Builder.
Generate Configuration
When you are finished press the validate button and fix your validation errors, then press the two gears button to generate configuration for all BSW modules. You can generate configuration for the BSW modules separatly by clicking the one gear button.
Implement Runnables
The RTE generator will generate header files for your software components. The header files contains among other stuff the runnable declaration which you need to implement. You can place your c files directly under your project, they will then be automatically included in the build.
Build
When you have generated configuration for the BSW modules and implemented your software component runnables you can compile Arctic Core. To build press Project -> Build Project.