- Sep 25, 2024
-
-
Ahmed Ismail authored
Top level README.md along with applications' documents are updated to illustrate how the new PSA Crypto APIs implementation configuration option can be used, and mention the available configurations for the new option. Signed-off-by:
Ahmed Ismail <Ahmed.Ismail@arm.com>
-
Devaraj Ranganna authored
A new configuration option is added to control which library (TF-M/MBED TLS) is providing the PSA Crypto APIs implementation. In addition, enable using PSA crypto APIs in Mbed TLS running on Non-Secure side. Signed-off-by:
Devaraj Ranganna <devaraj.ranganna@arm.com>
-
Devaraj Ranganna authored
A new configuration option is added to control which library (TF-M/MBED TLS) is providing the PSA Crypto APIs implementation. In addition, enable using PSA crypto APIs in Mbed TLS running on Non-Secure side. Signed-off-by:
Devaraj Ranganna <devaraj.ranganna@arm.com>
-
Devaraj Ranganna authored
FRI supports PSA crypto implementation either using TF-M on the secure side or using Mbed TLS on the non-secure side. When using Mbed TLS on the non-secure side as PSA crypto implementation, the device and provision keys are defined as volatile since we currently don't have support for file system. Signed-off-by:
Devaraj Ranganna <devaraj.ranganna@arm.com>
-
Devaraj Ranganna authored
FRI supports PSA crypto implementation either using TF-M on the secure side or using Mbed TLS on the non-secure side. When using Mbed TLS on the non-secure side as PSA crypto implementation, the device and provision keys are defined as volatile since we currently don't have support for file system. In addition, when using Mbed TLS on the non-secure side as PSA crypto implementation, `MBEDTLS_PKCS1_V21` (support for PKCS#1 v2.1 encoding) is enabled for OTA image validation to work. Signed-off-by:
Devaraj Ranganna <devaraj.ranganna@arm.com>
-
Ahmed Ismail authored
-g3 compiler options can be used in generating provisioning AXF file without any issues. Signed-off-by:
Ahmed Ismail <Ahmed.Ismail@arm.com>
-
Ahmed Ismail authored
Signed-off-by:
Ahmed Ismail <Ahmed.Ismail@arm.com>
-
Ahmed Ismail authored
A new configuration option is added to control which library (TF-M/MBED TLS) is providing the PSA Crypto APIs implementation. Signed-off-by:
Ahmed Ismail <Ahmed.Ismail@arm.com>
-
Devaraj Ranganna authored
To enable using PSA Crypto APIs in Mbed TLS running on Non-Secure side, the following changes were done: * `MBEDTLS_PSA_CRYPTO` macro is defined in `aws_mbedtls_config.h` header file to indicate that PSA Crypto APIs should be used. * `tfm-ns-interface` library is linked to mbedtls library to make TF-M's PSA Crypto APIs interfaces available for mbedtls library. * `CRYPTO_IOVEC_BUFFER_SIZE` is changed from 5120 to 20000 as the PSA Crypto APIs require larger buffer size for communication between secure and non-secure spaces. * A new Mbed TLS patch is added to fix guard protection for functions/ headers, the patch is to be added upstream. * All platforms' stack sizes were increased from `0x1000` to `0x2000` as in case of using ARMClang toolchain, a stack overflow was noticed after applying the previous changes. Signed-off-by:
Devaraj Ranganna <devaraj.ranganna@arm.com> Signed-off-by:
Ahmed Ismail <Ahmed.Ismail@arm.com>
-
Reuben Cartwright authored
Adds ~35 unit tests covering all functions in the file and some edge cases. Also modifies CMakeLists.txt to include the .cpp test file. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Reuben Cartwright authored
Previously, removeSubscription did not produce any output, nor return a value if it failed to remove a subscription (e.g. if the subscription did not exist). This commit makes removeSubscription return true if successful, and false otherwise. This commit also documents this change. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Reuben Cartwright authored
The LogWarning macro was being defined via SdkLogError instead of SdkLogWarning, which made some unit test cases inaccurate. LogWarning is now defined using the SdkLogWarning fake function. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Reuben Cartwright authored
Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
- Sep 20, 2024
-
-
Reuben Cartwright authored
This commit adds an explanation in `unit_testing.md` on how configASSERT is handled in `freertos_command_pool.c` tests and other test files. The intended behaviour is that an assertion failure causes the rest of the code to stop running, but can be handled by a test and does not stop the rest of the test's checks running. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Reuben Cartwright authored
Makes CMakeLists.txt use `BUILD_TESTING` as well as `CMAKE_CROSSCOMPILING`. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Reuben Cartwright authored
`mqtt_agent_task.h` included `transport_interface_api.h` unnecessarily for unit testing. This has been extracted into the test file `test_mqtt_agent_task.cpp` instead. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Reuben Cartwright authored
FreeRTOSConfig.h has been corrected to #include "fff.h". Additionally defines configASSERT within FreeRTOS.h. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Reuben Cartwright authored
This commit adds 7 new unit tests for the file freertos_command_pool.c. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Reuben Cartwright authored
In `createIoTThings.py` there is a command that takes a .json config and deletes all AWS entities described in there. This commit extends that command to search the credentials directory, and identify AWS Thing certificates before deleting these Things and their possibly related entities (which are generated using the .json config as well). This behaviour only occurs if the `extended` flag is set on the cleanup command. This commit also documents this command in `aws_tool.md`. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Reuben Cartwright authored
This commit extends support for the .json config introduced by `create-update-simplified` and `cleanup-simplified`. This commit also documents this change in `aws_tool.md` and updates the example .json config with 4 new fields. The user-inputted variables are now stored in a dictionary, as this makes it possible to extract the logic for getting these variables (either from the JSON or command line) into a single function to avoid code duplication. This commit also modifies internal storage of application types to use '-' rather than '_' between words. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
- Sep 19, 2024
-
-
These words are added to fix unknown words identified by the spell-checker tool in `iot_default_root_certificates.h` file available in `aws_configs` for all applications except blinky. Signed-off-by:
Ahmed Ismail <Ahmed.Ismail@arm.com>
-
*.cc, and *.cpp files were not checked by uncrustify code formatter tool, these files are now added to be checked and styled according to uncrustify suggestions. Signed-off-by:
Ahmed Ismail <Ahmed.Ismail@arm.com>
-
- Sep 15, 2024
-
-
Reuben Cartwright authored
This commit makes the script correctly ask before overwriting credentials. Previously, the script checked for 'dummy_thingname' and the default endpoint in 'aws_clientcredential.h' and only asked if these defaults were not present. These strings occur in more than one place in the header file so so this check is not sufficient to say the credentials #define'd have not been modified by the user. This commit makes the script check the entirety of the #define line. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Reuben Cartwright authored
Introduces a new command to `tools/scripts/createIoTThings.py` that 1. Creates a Thing and Policy. 2. Re-builds the target application (if required). 3. Creates a Bucket, Role, and Update. This command is documented in `aws_tool.md`. During application building, the script prints '.' on the same line and flushes. The command only takes 2 command line arguments, with the rest specified in a .json file, an example of which is also included in This commit as well as the `aws_tool.md` documentation. Only 3 fields in `aws_tool.md` need to be filled in. The command also re-uses AWS entities where possible. E.g. if the Role specified already exists, it checks it can access the Bucket name provided before re-using the role. Using Roles not created by your current account is not supported, as the script may be unable to assume them to check access to the Bucket. The motivation for this commit is to make creating OTA updates easier. This commit also introduces a new command for cleaning up all AWS entities specified by the .json config file. This command is called `cleanup-simplified`. It will force-delete everything (including bucket contents). This is not configurable. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
- Sep 10, 2024
-
-
The only public function declared in `mqtt_agent_task.c` is `vStartMqttAgentTask` as other functions were extracted to separate files in previous work. The prototypes for these other functions were left behind in `mqtt_agent_task.h`. This commit removes them. Also change `ota_agent_task.c` to include `events.h`, which is where these function prototypes were placed in previous work. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Provides additional details on how the directory structure is laid out for unit testing. Namely, the three types of `mocks` subdirectories and what each contains. Also fixes broken links due to mock subdirectory renaming. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
fix: prvGetRandomNumber does not use tick count if library function succeeds. fix: prvSocketDisconnect checks return value of Transport_Disconnect. fix: prvSocketDisconnect only sets mqtt as closed in system flags if closed successfully. fix: prvDisconnectFromMqttBroker errors on failure to disconnect socket. fix: when printing warning in prvIncomingPublishCallback, use buffer instead of writing to potentially read-only string. fix: transport_interface_api.h is only included in mqtt_agent_task.h if unit testing. The file is not findable from mqtt_agent_task.h outside of unit testing mode, but is needed to declare some of the functions tested. fix-style: include ordering in mqtt_agent_task.h. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Adds 44 unit tests. The CMakeLists.txt includes the mocks of header files of files belonging to this component so they can be mocked. This needs to be done before including ../inc. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
This commit makes the static functions in mqtt_agent_task.c visible if the UNIT_TESTING macro is defined. This is done by: 1. Define the `STATIC` macro in the header. ``` \#ifdef UNIT_TESTING #define STATIC /* as nothing */ \#else #define STATIC static \#endif /* UNIT_TESTING */ ``` 2. Add prototypes to the header. ``` STATIC int foo(void); ``` 3. Remove all other function prototypes in the .c file. This is justified because: - These functions need to be tested. - Functions other than `vStartMqttAgentTask` cannot be refactored to be non-static, as only `vStartMqttAgentTask` should be called in another file. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
This commit expands mock coverage across the repo in order to test core_mqtt_agent.c and freertos-command-pool.c. Mock support is in the form of modifying CMakeLists.txt in connectivity, aws_iot, and security components. All .h and .c files needed by core-mqtt are also added. This commit renames the mock directories. Now mocks for libraries are contained in `library_mocks` subdirectories, and mocks for integration code in `integration_mocks` subdirectories. Only these folder names have changed, they are still in the same parent directories. This decision was made to improve clarity of what each folder contains. This commit also fixes missing `BUILD_TESTING` usages in `CMakeLists.txt`. This commit moves mocks for `applications/helpers` from the test subdirectories into `applications/helpers//mocks`. Updates mocks: freertos_kernel. Adds (from scratch) mock support for: security/mbedtls, security/trusted_firmware-m, connectivity/iot_vsocket, connectivity/freertos_plus_tcp, connectivity/backoff_algorithms, coremqtt_agent aws_iot module. Additionally, mocks application-specific config files for testing core_mqtt_agent. Store application-specific config files in `tests/mocks` directory to avoid cluttering the `tests/` directory with non-test files. Also adds a CMakeLists.txt file for this directory. Also adds build_unit_test directory to .gitignore. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Some files were used in mqtt_agent_task.c but were not directly included. Additionally makes includes explicit in freertos_command_pool.c and freertos_agent_message.c. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
- Sep 09, 2024
-
-
Reuben Cartwright authored
The pipeline was failing due to a change in nvm, which was set to use the latest version. This commit fixes the version used at 'v22.7.0'. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
Devaraj Ranganna authored
`ccache` is a compiler cache used to reduce the compilation time where possible. The working of ccache is described in the manual https://ccache.dev/manual/4.10.2.html . Signed-off-by:
Devaraj Ranganna <devaraj.ranganna@arm.com>
-
Devaraj Ranganna authored
The VSI audio option for Corstone-315 should use `mps4_board.v_path` instead of `mps3_board.v_path`. Signed-off-by:
Devaraj Ranganna <devaraj.ranganna@arm.com>
-
Devaraj Ranganna authored
Get the ubuntu base image from public aws ecr instead of docker registry. In addition: * Upgrade to ubuntu 22.04 from 20.04 because the eol for ubuntu 20.04 is 04/2025. * Python3.9 package is removed as it is not needed anymore. The python3.9 workaround required for VSI is handled as part of `tools/scripts/setup_python_vsi.sh` * Python 3.10 built from source is removed as it comes pre-installed with ubuntu 22.04 * Build and install uncrustify 0.69.0 as the version packaged with ubuntu 22.04 is higher than intended * Added vim configuration (~/.vimrc) to enable spell check in vim Signed-off-by:
Devaraj Ranganna <devaraj.ranganna@arm.com>
-
Filip Jagodzinski authored
Signed-off-by:
Filip Jagodzinski <filip.jagodzinski@arm.com> Signed-off-by:
Ahmed Ismail <Ahmed.Ismail@arm.com>
-
- Aug 27, 2024
-
-
Chuyue Luo authored
Currently, the default build toolchain is ARMClang. However, with VS Code devcontainers, only Arm GNU Toolchain is provided. Therefore, the default toolchain is changed to GNU. The associated documentation is also updated. In order to use the Arm Compiler for Embedded (ArmClang), the toolchain needs to be installed in the devcontainer and an additional argument `-TARMCLANG` must be passed while building the example. Signed-off-by:
Chuyue Luo <Chuyue.Luo@arm.com>
-
- Aug 22, 2024
-
-
The script contains tools used to create, destroy, and manage AWS IoT Things, Policies, Buckets, Roles, and Jobs. It is intended to automate the process of creating an OTA update. The script was previously in a deprecated project. Documentation for the script was also ported to `/docs/components/aws_iot/aws_tool.md``. Modified the aws_tool.md file with the following: 1. Fix paths from total-solutions. 2. Remove deprecated references (e.g. ats.sh) 3. Clarifications added (e.g. where to get AWS API keys). 4. Remove duplicate sections that have been ported already. This commit links to this documentation in the top-level `README.md`, under a section called 'Tools'. Modified createIoTThings.py with the following: 1. comment all functions with Python Docstrings. 2. debug and refactor createIoTThings.py as detailed below. 3. Fix filenames and directories from deprecated total-solutions. Total-solutions saved all credentials to the same .h file, but build.sh in this project takes credentials from separate files. This commit stores generated credentials for new objects in the `credentials` directory by default, with unique file names per Thing. The user can optionally specify the credentials directory. This commit makes it possible to do any operation except for an OTA image update if update-signature.txt is not in the correct directory. A warning is generated if update-signature.txt is not present. This commit improves --help messages for the script. This commit places additional user input checks e.g. permissions_boundary must be of a certain format. Previous error messages were confusing. fix: does not forget to pass role name during role creation. fix: _does_role_exist handles None and "" cases. fix: cleanup after command failure. Do not delete a role if it already existed before the script ran. fix: create-update-only now gets role ARNs correctly. fix: create-policy-only now passes thing name and policy name correctly. fix: create-policy-only does not allow empty policy name or thing name. fix: correct help messages e.g. for create-update-only. Some other minor fixes also exist. This script updates `/applications/<target_application>/configs/aws_config/ aws_clientcredentials.h` once a Thing is created, where `<target_application>` is specified on the CLI. If the file has been previously modified, the script asks before overwriting. This saves the user modifying the file. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
- Aug 09, 2024
-
-
Replaced all occurrences of deprecated http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/API/vApplicationIPNetworkEventHook.shtml with the updated documentation at https://www.freertos.org/Documentation/03-Libraries/02-FreeRTOS-plus/02-FreeRTOS-plus-TCP/09-API-reference/57-vApplicationIPNetworkEventHook in 4 application config files. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-
This commit fixes failing pipelines by changing the towncrier configuration to ignore '.gitkeep' files. Towncrier is automatically updated to the latest version in the Docker image. Previous versions of towncrier automatically ignored `.gitkeep` in the `release_changes` subdirectory. This is not true anymore. Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
-