50 Commits

Author SHA1 Message Date
Henrik Wahlqvist
dd28503adf Bug fix for ZC dids
The bit string was mirrored in the DID API function

Change-Id: Ia03d7cda1f59a089832eaf0433a6f7454b3c6fd3
2025-02-13 10:01:42 +01:00
Henrik Wahlqvist
52e12b8a3e Bug fix in composition_yaml.py
Don't throw error if variables are not CVC_CAL or CVC_DISP.
Just don't put them in the dict, there are valid cases such as
CVC_CONST.

Change-Id: I3e8293d9957684a103938b215cb9359e0a519152
2025-02-10 16:29:48 +01:00
Zuul
d45d16fb77 Merge "Adding lsb, offset to curves and maps" 2025-02-04 09:34:11 +00:00
olindgre
f6b42534e3 Adding lsb, offset to curves and maps
If this is not wanted, add scaleMapsAndCurves: false to composition
config in project config (default true).

Change-Id: Iaca39b9371be07e81c0ace2ba63c9ea0c57d4a8f
2025-01-31 11:51:20 +01:00
Lindgren
acc321cbcc Fix issue with mapping to Rte enums when enum does not have a key for integer 0
Change-Id: I9799f656aaddd9b4cd9e0d7d94ddbc76acdcdec2
2025-01-31 10:19:37 +00:00
Henrik Wahlqvist
6b5b321881 Copy all keys in parsed ZC files
* Also adding mode_switch_points key to runnables

Change-Id: I8819cc817e4bd272bf3f62671cfb619b5d3e5b9d
2025-01-30 15:18:04 +01:00
Lindgren
f939ff9242 Allow comments in enum definition file
This change allow comments around the enum member definitions in matlab
enum definition files. The comments is not transfered to the generated
source code.

Change-Id: I1770f1cdfc8e9cba83f58417c1d0b03a17ecb1d3
2025-01-29 09:20:41 +01:00
Henrik Wahlqvist
dce0d1910b Also init calibration variables in the calibration init function
Change-Id: I777590427fb4e15c7a61f45313f120c089c28315
2025-01-22 10:18:22 +01:00
Henrik Wahlqvist
abc94d70d2 Bug fix in rte_dummy.py
dt_NVM_LIST_X is not available when useRteNvmStructs is false so it
should use the structs from nvm_def.py instead.

Change-Id: I87555e9af9099a575d26fb2c01727698f51091d8
2025-01-17 15:36:05 +01:00
Zuul
1ceaf4832f Merge "Update towards breaking yaml generator changes" 2025-01-17 10:15:31 +00:00
Henrik Wahlqvist
76390d71f7 Update towards breaking yaml generator changes
Change-Id: I456b9f1bc4545600af78908886968c9b7c313309
2025-01-17 09:56:31 +01:00
Henrik Wahlqvist
2a7fb908c4 Fixing RTE Checkpoint ID feature
* Add possibility to generate the data type in RteDummy.
* Scheduling functions should include Rte_Type.h when
  generateRteCheckpintIds is true.

Change-Id: I1a3d8f6f5cfe8bc431553a9a4d32f8c57c22a77a
2025-01-16 16:07:24 +01:00
Zuul
55f9545791 Merge "Add option for generating RTE dummy files" 2025-01-16 12:54:12 +00:00
Zuul
290dc93839 Merge "Fix in ZC NVM generation" 2025-01-16 10:08:19 +00:00
Henrik Wahlqvist
0a8a2d69a6 Add option for generating RTE dummy files
Change-Id: Ie90031808b8cf47f6542caa73014445c803a2f94
2025-01-16 10:57:37 +01:00
Henrik Wahlqvist
ef521427c8 Fix in ZC NVM generation
We need to use the struct definitions from the RTE.

Change-Id: I6e380ab5a153cd725e229fe03bffc8887105eed4
2025-01-16 10:57:32 +01:00
olindgre
e4a1859c0f Bugfix, default_value refered to as default
Change-Id: I7a1eca105a28c7f4f364470dd47d32b528a3f127
2025-01-16 10:21:22 +01:00
olindgre
e95b0f0394 Enable enums in interface for zone controller
* Option to map TL generated enums to rte counterparts using
  'mapEnumsToRteCounterpart' in project config. This allows using enums
  directly in the interface.
* Added option to 'includeAllEnums' in project config. This adds all
  enums found in enumDefDir to header files, allowing projects to
  add their use in interfaces before they are added to model code.

Change-Id: I0cac83e3be3514cbc15e02de6d5f7ca519c3cea6
2025-01-08 17:46:24 +01:00
Henrik Wahlqvist
380b8b978e Fix for ZC projects using RTE checkpoint calls
Change-Id: I5f97936ae6986d3592cb08f3eacc8db1bab502ba
2024-12-19 11:09:54 +01:00
Henrik Wahlqvist
c41611432e Improve error messages in interface/zone_controller
Change-Id: I7a565e9a622deb23b08d3b401c75d5a14e821254
2024-12-19 10:21:31 +01:00
Henrik Wahlqvist
5bcd3a152f Add scheduler prefix to NVM functions
Change-Id: I5a378b7bbff744b8c47e4c19452305e7cdff9cb2
2024-12-09 11:01:31 +01:00
Henrik Wahlqvist
e2ffc662a9 Fixes in interface/zone_controller.py
* Added "supported_directions" dict.
* Bug fix were ports of direction CLINET/SERVER was added as IN/OUT in
  the generated yaml file.
* Copy everything except for element from port definitions.
  (yaml2arxml is updated every now and then and this feels like a better
  approach)

Change-Id: I2351bdc4f5ea102f863528964e05e2affa6bc06f
2024-11-29 11:05:46 +01:00
Henrik Wahlqvist
e06600dfe7 Need to generate ZC NVM structs in order to compile
Change-Id: Ia4e4a06d9b5fb0f1b82cb62282fb87e679295e31
2024-11-08 12:38:35 +01:00
Zuul
bf352ef7e1 Merge "Updates to be able to generate NVM RTE function calls" 2024-11-07 09:48:26 +00:00
Zuul
b78b6e6bda Merge "Adding NVM functionality to composition_yaml" 2024-11-07 09:48:25 +00:00
Henrik Wahlqvist
9222230762 Remove required key in config.py
Not available in py 3.6 which we support

Change-Id: Icf000a8e8d0a7468314e4c9bf16df79b37860d23
2024-11-06 10:51:01 +01:00
Henrik Wahlqvist
9e2c29fd4a Bug fix, order in calibration.py
Change-Id: Ic5144b7431c8f76248a47761863b046e03057078
2024-11-04 12:04:44 +01:00
Henrik Wahlqvist
248ab888bf Allow ZC ports without elements
Change-Id: I7fd918c49c376abacf1de82ca64612b720a974ae
2024-11-01 09:00:50 +01:00
Henrik Wahlqvist
e36e378e9b Updates to be able to generate NVM RTE function calls
Change-Id: If692ccdf96403b7132735b70bfd8be4a96458ff8
2024-10-30 12:49:06 +01:00
Henrik Wahlqvist
b55335a3a4 Adding NVM functionality to composition_yaml
This change does not include generating RTE calls,
it only updates the yaml2arxml input.

Change-Id: I67f32d3c31dccf0b290c6e5c934d71e27b1b439d
2024-10-30 10:54:50 +01:00
Axel Andersson
816553f1bc Added powertrain-build entrypoint
The entrypoint will make it easier to install powertrain-build to an
isolated venv without having to call python -m powertrain_build.

Change-Id: I3850c97d17707f9bc03640bd1d997508637d97ba
2024-10-30 10:33:42 +01:00
Henrik Wahlqvist
ec77977757 Bug fix in _add_autosar_data_types
Checking class == CVC_DISP is not enough.
Doesn't catch e.g. ASIL_A/CVC_DISP_ASIL_A.

Change-Id: I8dcebd90d258c3cea103e6691525def772eb923e
2024-10-30 09:36:06 +01:00
Zuul
03ac4c732a Merge "Join the use of useSwcAsPrefix and get_scheduler_prefix" 2024-10-30 07:27:25 +00:00
Henrik Wahlqvist
b93719754e Join the use of useSwcAsPrefix and get_scheduler_prefix
Change-Id: I3c020d64f13b8fb4b298087b7b80195114552526
2024-10-29 13:33:20 +01:00
Axel Andersson
721fd18baf Added support for Python 3.13
Change-Id: I8c985476d1dab34bab28605e5839d21f53701ab7
2024-10-29 07:06:37 +00:00
olindgre
f04961b9bd Missed to update use of get function
Change-Id: I3dda5407ae8e4d9a6d060a8e5b7a07d6330c695c
2024-10-23 14:05:01 +02:00
Henrik Wahlqvist
fc03669666 Add option for supplying custom step function name
Note that this only applies to the runnable in the generated yaml file.

Change-Id: I11eea48b41801d3a0dfc479b6cc489108659bb55
2024-10-22 11:24:06 +00:00
olindgre
7888ebe2b7 Aggregate project settings for ARXML specifications in ProjectCfg
Change-Id: Ia54f7ae0164aeb62361b0839b79b178779616402
2024-10-22 12:51:01 +02:00
Henrik Wahlqvist
4e53b9818a Add option for supplying custom init function name
Note that this only applies to the runnable in the generated yaml file.

Change-Id: I4f6ac188bcfdeddddb390b9627b7cbddcd6456ad
2024-10-04 10:29:02 +02:00
Zuul
6fc1252f70 Merge "Updated documentation" 2024-09-27 12:47:23 +00:00
Henrik Wahlqvist
635045a3f2 Updated documentation
Change-Id: I65c140c3ab156406ba8a6ee18eba60692438e4b4
2024-09-27 10:19:31 +02:00
Henrik Wahlqvist
179ebf01a7 Bug fix in build.py
Generating interface calibration files can only happen when
generateYamlInterfaceFile is true.

Change-Id: Ib8c1f64c0e8328e924e19508da1845bf9f906586
2024-09-25 10:02:56 +02:00
Henrik Wahlqvist
c1e138cb47 Add option for softwareComponentBase
This setting changes the ASIL classification of the software component
by adding the swcbase key to the yaml file.
ZC projects only.

Change-Id: Ic94dbb3cb4ca617f4637066d50ee0817e1e923cc
2024-09-24 16:06:47 +02:00
Henrik Wahlqvist
73eca42a6a Bug fix, read diagnostics key in interface/zone_controller too
Introduced in a280614c1f3323b1ba4510afa0815e2ef7c3f55c

Change-Id: Iea2376e95aba1838762c03c13b09aafda278bd23
2024-09-18 17:07:33 +02:00
Henrik Wahlqvist
a280614c1f Make composition_yaml read diagnostics key instead
Diagnostics -> diagnostics (initial lower case d)

Change-Id: Idfc421dad060fa5b874031e5efb4230dc2b99cfa
2024-09-18 12:32:00 +02:00
Henrik Wahlqvist
ecdf390a2c Devs asked for missing ZC dids to be erroneous
Change-Id: Id6b4b478e7f7d465062ceb1a44de27d8d73d9ce8
2024-09-18 09:25:39 +02:00
Henrik Wahlqvist
fda739bc13 Refactor usage of ecu_supplier
Removed most of the decisions based on ecu_supplier and made it more
granular using individual configuration.
Current project types will keep their config by adding templates in the
BaseConfig.json file.
Some usecases were kept for legacy reasons.

Change-Id: I3d6199713006489baff0bf73751596770fd1f968
2024-09-17 08:25:46 +00:00
olindgre
2ece01e1d7 Make powertrain-build not overlap with pybuild in site-packages
Change-Id: I7b59f3f04f0f787d35db0b9389f295bf1ad24f56
2024-09-17 10:25:04 +02:00
Henrik Wahlqvist
65c1d746a7 Copy from Volvo Cars local project
We don't transfer git history since it may contain proprietary data that
we cannot have in an open sources version.

Change-Id: I9586124c1720db69a76b9390e208e9f0ba3b86d4
2024-05-29 08:03:54 +02:00
Alberto Gonzalez
05acd5e750 Add tox jobs
This change adds tox jobs that lint and test python code.
Together with the job definition and configuration, this
change adds some dummy directories and tests that should
be replaced once the actual code for this repo is migrated.

Change-Id: Iaa201562faf2dbee0647b3366d6d0c5ece0561d0
2024-04-29 10:25:58 +02:00