Commit graph

33 commits

Author SHA1 Message Date
Thomas Daubney
772056ccea Replace repo_root with project_root
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-22 16:23:16 +00:00
Thomas Daubney
b42c50bd60 Make use of new crypto_core_directory function
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-22 15:53:38 +00:00
Thomas Daubney
79cae20a02 Remove useless line
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-22 15:49:19 +00:00
Thomas Daubney
5556f908cb Rename variables in script
Rename some variables in generate_driver_wrappers.py
now that the script has to work in two repositories
as opposed to just mbed tls.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-15 16:50:23 +00:00
Thomas Daubney
4291bc27b9 Remove trailing whitespace
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-14 18:05:19 +00:00
Thomas Daubney
c1750bb23d Apply correct license to generate_driver_wrappers.py
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-14 15:16:38 +00:00
Thomas Daubney
b10cc7acc2 Modify generate_driver_wrappers.py to work in both repos
Add repository detection and conditional setting of
library_dir variable.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-11-14 12:02:26 +00:00
Dave Rodgman
16799db69a update headers
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-02 19:47:20 +00:00
Xiaokang Qian
7d546c7c88 Change to os.path functions base on comment
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Xiaokang Qian
fe9666b8c0 Change the extension type of the file psa_crypto_driver_wrapper
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Xiaokang Qian
54a4fdfe91 Automaticly generate psa_crypto_driver_wrappers_no_static.c
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Asfandyar Orakzai
6eaa75a79d fixed docstring sentence
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-10-10 19:55:40 +02:00
Asfandyar Orakzai
ac6f650a9f fixed formating
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-19 10:03:05 +02:00
Asfandyar Orakzai
4ca4a930a9 fixed opaque schemas paths
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-18 12:37:53 +02:00
Asfandyar Orakzai
9e6170d95e added some doc strings and fixed formating
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-17 23:37:16 +02:00
Asfandyar Orakzai
5c9569a2bc fixed formating
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-17 23:14:29 +02:00
Asfandyar Orakzai
de08803170 refactored and addressed reviewer observations in generate_driver_wrappers.py
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-17 22:07:58 +02:00
asfand-silabs
b549776a23
Merge branch 'Mbed-TLS:development' into codegen_1.1 2022-09-17 19:54:01 +02:00
Asfandyar Orakzai
39452a8ca4 fixed formating of driver generator script
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-16 13:02:06 +02:00
Asfandyar Orakzai
08f397a676 refactored generate_driver_wrappers.py
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-16 11:01:01 +02:00
Archana
22c7827876 Schema and script improvements
Signed-off-by: Archana <archana.madhavan@silabs.com>
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-16 11:01:01 +02:00
Archana
01aa39e3ff Arg parse improvements
Arg parse improved to update the input params path relative to
mbedtls_root passed, if the other params are not explicitly passed.

Signed-off-by: Archana <archana.madhavan@silabs.com>
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-16 11:01:01 +02:00
Archana
a78dc70a50 Fix JsonObject type for MyPy
Workaround a MyPy error by marking the driver json Object as of type
dict and indexable.

Signed-off-by: Archana <archana.madhavan@silabs.com>
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-16 11:01:01 +02:00
Archana
fdbbcba3eb JSONschema and python improvements
* JSON Schema manually updated to be more semantically valid.
* Python script improved to be more verbose with exceptions
* Templating file improved by adding an additional macro.

Signed-off-by: Archana <archana.madhavan@silabs.com>
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-16 11:01:01 +02:00
Archana
314380564c PyLint errors fixed
Signed-off-by: Archana <archana.madhavan@silabs.com>
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-16 11:01:01 +02:00
Archana
04cfe34639 JSON Validation added
(1) JSON file structure altered a bit.
(2) JSON validated against schema.
(3) Corresponding changes in the python script.

Signed-off-by: Archana <archana.madhavan@silabs.com>
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-16 11:01:01 +02:00
Archana
e829cd6953 Driver Wrapper CodeGen Rev 1.1
(1) Add in driver jsons.
(2) Improve Python scripts to take JSON file directory and template
directory paths as arguments.
(3) Add in file augment template files to template common functionality
(4) render tempplates for Header files, ID generation and key
management.
(5) Changed driver ID nomenclature to be in synch with function names.

Signed-off-by: Archana <archana.madhavan@silabs.com>
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-09-16 11:01:01 +02:00
Andrzej Kurek
5c65c5781f Fix additional misspellings found by codespell
Remaining hits seem to be hex data, certificates,
and other miscellaneous exceptions.
List generated by running codespell -w -L 
keypair,Keypair,KeyPair,keyPair,ciph,nd

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-05-11 21:25:54 +01:00
Archana
4a9e02632a
Review comments addressed
* Updated the default argument to create less noise with argument
  passing.
* Reworded ChangeLog to match MbedTLS documentation/ announcement
  requirements

Signed-off-by: Archana <archana.madhavan@silabs.com>
2021-12-19 13:37:37 +05:30
Archana
c08248d650
Rename the template file from .conf to .jinja
Signed-off-by: Archana <archana.madhavan@silabs.com>
2021-12-19 10:35:15 +05:30
Archana
e03960e460
Restructure Python script to use argparse and main
Signed-off-by: Archana <archana.madhavan@silabs.com>
2021-12-19 10:34:59 +05:30
Archana
6f21e45b78
Fix Pylint errors and improve Python script
Pylint errors are fixed.
The Python script is improved to take default arguments when not
passed (eg invoked from root of the tree)

check-generated-files.sh and CMakeLists.sh updated.

Signed-off-by: Archana <archana.madhavan@silabs.com>
2021-12-18 13:28:59 +05:30
Archana
a8939b6da3
Restructure scripts' folder alignment
Moved python script generate_driver_wrappers.py under scripts and
corresponding template file under script/data_files.

Signed-off-by: Archana <archana.madhavan@silabs.com>
2021-12-18 12:57:15 +05:30
Renamed from scripts/codegen_driverwrappers/generate_driver_wrappers.py (Browse further)