Commit Graph

479 Commits (1c0318ccfe0dd18cba452577522eb5b6f526ea97)

Author SHA1 Message Date
Janne Kiiskila e20f2d30a2 target_test - assert if sectors keyword missing
Assert it properly and thus give out the target name where the
issue is, rather than just error out with KeyError and leave the
poor sod wondering where exactly the issue is.

Before:
```

=================================== FAILURES ===================================
_____________________________ test_bl_has_sectors ______________________________
    def test_bl_has_sectors():
        """Assert a bootloader supporting pack has sector information"""
        cache = Cache(True, True)
        named_targets = (
            target for target in TARGETS if
            (hasattr(target, "device_name") and getattr(target, "bootloader_supported", False))
        )
        for target in named_targets:
            assert target.device_name in cache.index,\
                ("Target %s contains invalid device_name %s" %
                 (target.name, target.device_name))
>           assert cache.index[target.device_name]["sectors"],\
                ("Device name %s is misssing sector information" %
                 (target.device_name))
E           KeyError: 'sectors'
```

After

```
___________________________________________________ test_bl_has_sectors ___________________________________________________

    def test_bl_has_sectors():
        """Assert a bootloader supporting pack has sector information"""
        # ToDo: validity checks for the information IN the sectors!
        cache = Cache(True, True)
        named_targets = (
            target for target in TARGETS if
            (hasattr(target, "device_name") and getattr(target, "bootloader_supported", False))
        )
        for target in named_targets:
            assert target.device_name in cache.index,\
                ("Target %s contains invalid device_name %s" %
                 (target.name, target.device_name))
>           assert "sectors" in cache.index[target.device_name],\
                ("Target %s does not have sectors" %
                 (target.name))
E           AssertionError: Target NUCLEO_L073RZ does not have sectors
E           assert 'sectors' in {'algorithms': [{'default': True, 'file_name': 'CMSIS/Flash/STM32L0xx_192.FLM', 'ram_size': None, 'ram_start': None, ....on_secure_callable': False, 'peripheral': False, ...}, 'default': True, 'size': 196608, 'start': 134217728, ...}}, ...}

```

This helps you finding the offending target a bit faster.

Kudos to Jammu Kekkonen (jammu.kekkonen@arm.com) to figuring out how to actually
run this test & the assertion.

Ref: Mbed OS issue #12219
2020-01-09 16:50:45 +02:00
Martin Kojtal b943b5f4db
Merge pull request #12179 from jamesbeyond/update_ble
TESTS: Update testing of examples in mbed-os
2020-01-07 11:25:19 +01:00
Rajkumar Kanagaraj e5c6254372 Greentea test :Added the print in the exception handler 2020-01-03 09:36:26 -08:00
Qinghao Shi e957b4f0e0 remove BLE from feature key 2020-01-02 18:48:48 +00:00
Qinghao Shi 8a4d5d0a75 bootloader not support K66F, change back to K64F 2020-01-02 17:17:05 +00:00
Qinghao Shi 4bce603b7d replace K66F with DISCO_L475VG_IOT01A in some example to balancing the test workload 2020-01-01 00:32:52 +00:00
Qinghao Shi 5008753a64 add DISCO_L475VG_IOT01A and remove K66F for ble examples 2020-01-01 00:11:41 +00:00
Qinghao Shi 0e8b7cdf83 add extra ble example to complie test 2020-01-01 00:08:11 +00:00
Rajkumar Kanagaraj 6d081eeb70 Fixed the build tools test case failure,incorporated review comments 2019-12-23 03:54:18 -08:00
Rajkumar Kanagaraj 957dca2082 Enabling small C library option and deprecating uARM toolchain
- By default, Mbed OS build tools use standard C library for all supported toolchains.
   It is possible to use smaller C libraries by overriding the "target.default_lib" option
   with "small". This option is only currently supported for the GCC_ARM toolchain.
   This override config option is now extended in the build tool for ARM toolchain.
 - Add configuration option to specify libraries supported for each toolchain per targets.
 - Move __aeabi_assert function from rtos to retarget code so it’s available for bare metal.
 - Use 2 memory region model for ARM toolchain scatter file for the following targets:
   NUCLEO_F207ZG, STM32F411xE, STM32F429xI, NUCLEO_L073RZ, STM32F303xE
 - Add a warning message in the build tools to deprecate uARM toolchain.
 - NewLib-Nano C library is not supporting floating-point and printf with %hhd,%hhu,%hhX,%lld,%llu,%llX
   format specifier so skipping those green tea test cases.
2019-12-19 10:05:11 -08:00
Martin Kojtal 412a9317de
Merge pull request #12017 from VeijoPesonen/remove_nvstore
NVStore: already deprecated implementation removed
2019-12-05 09:10:30 +01:00
Martin Kojtal 2cf56b8f6d
Merge pull request #11891 from hugueskamba/hk-enable-minimal-printf-in-tools
minimal-printf: Enable using a target configuration parameter
2019-12-04 10:14:54 +01:00
Veijo Pesonen 060a1c6df7 NVStore: deprecated implementation removed 2019-12-03 15:36:31 +02:00
Hugues Kamba d5aef28145 minimal-printf: Enable using a target configuration parameter 2019-12-03 12:31:51 +00:00
Martin Kojtal 57f9a1eea8
Merge pull request #11921 from madchutney/tools/py3-fixes
Updates to tools for Python 3 compatibility
2019-11-27 16:29:50 +01:00
Kevin Bracey 5342f0fa00 Tools: check for GCC 9, rather than 6
Planning to update to supporting GCC 9 as found in GNU Tools for Arm
Embedded Processors 9-2019q4-major.

Newer GCC in particular supports ARMv8-M security extensions, and
link-time optimisation - two areas of interest.

Should be no code changes required, but need to change the warning in
the toolchain script.
2019-11-26 11:52:47 +02:00
Graham Hammond e723571474 Updates to `/tools` for Python 3 compatibility 2019-11-21 15:02:37 +00:00
Anna Bridge 71c6b9aca5
Merge pull request #11872 from jussisip/update_examples
Change mbed-os-example-wifi to build only DISCO_L475VG_IOT01A
2019-11-19 17:03:37 +00:00
Jussi Siponen 1c4a5b9d87 Change wifi example to build only DISCO_L475VG_IOT01A
Currently mbed-os-example-blinky and mbed-os-example-wifi are built for each and every target in Mbed OS. This will change that only DISCO_L475VG_IOT01A is built for mbed-os-example-wifi. DISCO_L475VG_IOT01A was chosen as its one of the wi-fi supported boards and having integrated wi-fi.
2019-11-18 13:46:50 +02:00
Martin Kojtal eab1c2e594
Merge pull request #11796 from hugueskamba/hk-add-minimal-console-to-retarget
mbed_retarget: Add a minimal console implementation to provide basic functionalities
2019-11-13 17:11:27 +01:00
Hugues Kamba 051991fafb mbed_retarget: Add a minimal console implementation to provide basic functionalities
The retarget code allocates an array of FileHandle* for console and file
handling (filehandles). A tiny target only needs a console (putc/getc).
There is no need for file handling.

The POSIX layer and the array of FileHandle* is not required for small
targets that only need a console ; this code is optionally compiled
out if the configuration parameter platform.stdio-minimal-console-only is
set to `"true"`.
2019-11-11 15:14:00 +00:00
Qinghao Shi 667a416a47 TESTS: turn off blinky log compare test due to example changed 2019-11-06 11:21:21 +00:00
Qinghao Shi 6d47ec37fb TEST: turn on sub examples build test 2019-11-01 00:06:21 +00:00
Qinghao Shi e4188b6ad7 TEST: update example.json file 2019-11-01 00:01:36 +00:00
Qinghao Shi 38776fbd99 TEST: add atecc608a example to compilation test 2019-10-31 23:57:14 +00:00
Martin Kojtal 83c4a80082
Merge pull request #11710 from jamesbeyond/exp_github
Update examples testing scripts
2019-10-28 09:50:36 +01:00
Qinghao Shi a211cf16a9 EXAMPLES: temporarily turn off build for NFC examples 2019-10-25 17:33:27 +01:00
Martin Kojtal 5eeeaca670
Merge pull request #11429 from hugueskamba/hk-no-float-validation
Move script to check for floats and make it Python 2 compatible
2019-10-22 09:34:56 +02:00
Hugues Kamba c712d2f6ee Move script to check for floats and make it Python 2 compatible.
All scripts pertaining to example projects tests should be in the same
directory. The test framework uses Python2 therefore this script also needs
to be Python2 compatible.
2019-10-21 14:05:22 +01:00
Qinghao Shi 5100bddc99 EXAMPLES: fix a typo in the path 2019-10-21 12:33:08 +01:00
Amanda Butler 924787fb0f
Edit README.md
Edit file, mostly for formatting and grammar.
2019-10-18 17:04:32 -05:00
Qinghao Shi 61c170f5f9 EXAMPLES: remove default build profiles 2019-10-18 12:41:49 +01:00
Qinghao Shi 59a4ad680d EXAMPLES: add README file 2019-10-17 23:06:11 +01:00
Qinghao Shi 52b4c39496 EXAMPLES: temporarily turn off the complie test for sub example 2019-10-17 01:10:24 +01:00
Qinghao Shi 88d5079504 EXAMPLES: update comments and fix bugs 2019-10-17 00:57:15 +01:00
Qinghao Shi cf02be63ff EXAMPLES: update console output format 2019-10-16 23:46:18 +01:00
Qinghao Shi 6876362689 EXAMPLES: update build_repo function 2019-10-16 18:09:36 +01:00
Qinghao Shi 3f0add7e44 EXAMPLES: update export_repos function 2019-10-16 18:06:24 +01:00
Qinghao Shi 4c5f94075f EXAMPLES: update examples_lib.py
- add logging function
 - update clone function
 - update deploy function
 - update source function
 - add symlink function
2019-10-16 18:00:33 +01:00
Qinghao Shi 640ea73a01 EXAMPLES: improve examples.py cli help messages 2019-10-16 17:52:42 +01:00
Qinghao Shi fa86629ec6 EXAMPLES: add list amd Symlink functions 2019-10-16 17:47:36 +01:00
Qinghao Shi 2f6f066f07 EXAMPLES: update examples.json file
- remove "mbed" and "test-repo-source" key
 - add "sub-repo-example" key as an indicator if an example has sub examples
 - add "subs" key to sotre sub examples names
2019-10-16 17:20:05 +01:00
Qinghao Shi f317753a1d EXAMPLES: add test key for remaining examples 2019-10-16 15:56:10 +01:00
Cruz Monrreal II 70ee402340 Fixed Travis CI issue where jobs were/are getting stalled while fetching packages.
Something on Travis CI's side has changed such that invoking the 'wait' command within a script attempts to wait on some other jobs in addition to those spawned within the CI job.

Workaround is to explicitly collect the PIDs for processes spawned within the script and only wait on those.
2019-10-11 16:06:01 -05:00
Olli-Pekka Puolitaival ff2778f5f6 Fix documentation 2019-09-17 15:26:06 +03:00
Olli-Pekka Puolitaival 350c0eff22 Make able to define build jobs amount when building examples 2019-09-16 13:30:24 +03:00
Qinghao Shi 7203154566 TEST: update compare log file name 2019-09-11 19:01:48 +01:00
Martin Kojtal 0f1962e86d
Merge pull request #11437 from hugueskamba/hk-harmonize-doxygen-grouping
Harmonise Doxygen comments in drivers, events, platform and rtos dirs
2019-09-10 10:56:41 +02:00
Hugues Kamba 5933dec3b7 Harmonise Doxygen comments in drivers, events, platform and rtos dirs
When a Doxygen group has been defined (created), all its needed to add
documentation to that group is `\addtogroup`. Since all the information
about the group is preserved, it is not necessary to mention the group
hierarchy again with `\ingroup`. This PR removes unnecessary Doxygen lines
across the `drivers`, `events`, `platform` and `rtos` directories.

It also ensures that new groups are created with `\defgroup` once and
referenced with `\addtogroup` whenever documentation needs to be added to
an existing group.
2019-09-09 10:59:51 +01:00
Hugues Kamba 074b379439 Correct doxy-spellchecker error message 2019-09-07 21:00:21 +01:00
Olli-Pekka Puolitaival aebda11adf Use very verbose to see more details in case of problem 2019-08-30 09:14:06 +03:00
Mika Leppänen e3f247793a Added PPP directory to astyle ignore and added some spellchecker ignore words 2019-08-20 13:37:12 +03:00
Olli-Pekka Puolitaival ba26bd9cde Python3 fixes 2019-08-16 13:51:21 +03:00
Olli-Pekka Puolitaival aa1d16e871 Python3 fixes 2019-08-15 10:06:41 +03:00
Hugues Kamba 2a9207bbe4 Address comments on workaround for Mbed OS 2 CI build after Public (#11114)
* Modify compilation API to provide a list of paths to exclude from the build.
* `_exclude_files_from_build` becomes a static method
* Replace ternary expression with simple  `if/else` statement
* Make unit test case for dirs exclusion independent of system files
2019-08-02 12:32:40 +01:00
George Psimenos df5baf6031 USB public APIs cleanup (#11034)
The contents of the usb directory were moved to appropriate locations and the usb directory removed.

* Public USB headers moved under drivers/
* Internal USB headers moved under drivers/internal/
* USB Source code moved under drivers/source/usb/
* Moved usb/device/hal/ under hal/usb/
* Moved usb/device/USBPhy/ under hal/usb/
* Merged usb/device/targets/ into targets/
* Separated public and private USB API documentation under Doxygen groups drivers-public-api and drivers-internal-api.
2019-08-02 12:23:47 +01:00
Hugues Kamba bfa1b4dd84 Drivers/Events/RTOS Public and internal APIs cleanup (#10955)
Separate drivers, events, and rtos internal APIs from public APIs.

* Move source files to source subdirs
* Move internal headers to internal subdirs
* Add Doxygen comments for documenting internal and public APIs
* Remove source code from header files in order to remove include pre-processor directives
that included header files not directly used by said header files
* Explicitly include header files instead of implicit inclusions via third-party header files.

Release Notes

This will break user code that was using an internal API as the internal header files have been moved.
This will only break if the user was including the header file using a namespace (i.e #include "foo/bar.h" instead of #include "bar.h"
2019-08-02 12:23:47 +01:00
Kevin Bracey 0bb4c050b7 SingletonPtr: API extensions, make constexpr
* Adjust definition to make the default constructor `constexpr`.
  This permits use in classes that want lazy initialization and their
  own `constexpr` constructor, such as `mstd::mutex`.

* Add `get_no_init()` method to allow an explicit optimisation for
  paths that know they won be the first call (such as
  `mstd::mutex::unlock`).

* Add `destroy()` method to permit destruction of the contained object.
  (`SingletonPtr`'s destructor does not call its destructor - a cheat
  to omit destructors of static objects). Needed if using in a class
  that needs proper destruction.
2019-07-18 20:02:04 +03:00
Volodymyr Medvid 5cc66282dd PSOC6: remove PSA targets 2019-07-08 14:49:26 +03:00
Martin Kojtal 15539e0710
Merge pull request #10749 from jamesbeyond/example_test
Examples: enable more tests for examples
2019-06-09 18:18:37 +01:00
adbridge 366b18ea1f Re-enable complilation for wifi and nanostack examples 2019-06-07 10:50:24 +01:00
Qinghao Shi 31fc1e56f2 Examples: enable more tests for examples 2019-06-03 18:30:42 +01:00
Martin Kojtal 8fc2a3c92a
Merge pull request #10675 from 0xc0170/update-mbedtls-2.18.0-rc1
Update mbedtls 2.18.0 rc1
2019-05-28 20:24:18 +01:00
Martin Kojtal eebc1b9e40 Revert "Check mbed-crypto-example with fork"
This reverts commit ff18a64e00.
Use the official repository
2019-05-27 08:02:55 +01:00
Martin Kojtal 659c099ff7
Merge pull request #10625 from jamesbeyond/example_test
TESTS: update examples.json to enable testing
2019-05-24 12:19:35 +01:00
Devaraj Ranganna 29dfab93bb Replace FUTURE_SEQUANA_M0_PSA and FUTURE_SEQUANA_PSA targets with
CY8CKIT_062_WIFI_BT_M0_PSA and CY8CKIT_062_WIFI_BT_PSA in config test

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-05-22 10:20:57 +01:00
Devaraj Ranganna 7765d39283 The targets FUTURE_SEQUANA_M0_PSA and FUTURE_SEQUANA_PSA are removed
due to partial implementation. Having FUTURE_SEQUANA_M0 and
FUTURE_SEQUANA PSA targets is misleading.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-05-21 15:00:31 +01:00
Qinghao Shi 09e21a20d2 TESTS: update examples.json to enable testing 2019-05-21 14:27:10 +01:00
Martin Kojtal 7d0cc69fb1
Merge pull request #10521 from jamesbeyond/example_test
TEST: update python script to enable examples smoke test
2019-05-21 10:07:28 +01:00
Qinghao Shi 35eeef55a1 fix a bug where base_path was wrong 2019-05-19 00:32:39 +01:00
Qinghao Shi 3bb0a8aded fix a bug when STDOUT has less than 5 lines 2019-05-18 23:57:23 +01:00
Qinghao Shi 48e1a56e0e add a comment based on review 2019-05-15 23:31:58 +01:00
Qinghao Shi 71d7970fc5 fix issues base on the review 2019-05-10 17:48:15 +01:00
Qinghao Shi b2611fb801 TEST: update python script to enable example smoke test
* it will check examples.json if contains 'test', 'compare_log', 'baud_rate' keys
 * it will dump test_spec.json test in examples compiled successfully
2019-05-02 15:26:15 +01:00
Alexander Zilberkant 8c5ba9154d Update PSA code generator
Unify TF-M and Mbed-SPM code generators:
 - Unify SPM initialization logic:
   - All partitions are registered at once
   - Test partitions are guarded by #ifndef
   - Introduce single template list
 - Beatify template files and add "Autogen-do not modify" notice
Prepare for integration with mbed-os build system:
 - Generate all the files in a single place
Simplify tools/psa/release.py script
2019-04-30 14:10:23 +03:00
Cruz Monrreal f1c4a029c2
Merge pull request #9844 from cmonr/travisCI-refactor
Travis CI: Stages, OS update, apt-get relief!
2019-04-12 09:17:55 -05:00
Cruz Monrreal 2641fb38ce
Merge pull request #10364 from kfnta/psa_codegen_refactor
Refactor PSA code generators
2019-04-11 20:34:11 -05:00
Cruz Monrreal II 2a2ec16a44 Fixed status reporting.
'tr' command wasn't doing any replacement
2019-04-11 10:50:21 -05:00
Oren Cohen ae4341e8db Refactor PSA code generators
* Unify PSA generators
* Replace scanning for mbed_spm templates with json
* Make generate_source_files and parse_manifests common
* Make assert_int an internal function
* Use parse_manifests in pytests
* Update docs
2019-04-10 14:15:28 +03:00
Brian Daniels a5d89bb088 Update merge_region_list test case 2019-04-09 14:08:13 -05:00
Cruz Monrreal 803f5fd44e
Merge pull request #9966 from naveenkaje/sct_fix
tools: fix the path generated to the sct file
2019-04-09 14:03:09 -05:00
Cruz Monrreal fba8156bda
Merge pull request #9967 from bridadan/fix_vscode_makefile_zip
Fix for projects exported as a zip file (affects online compiler)
2019-04-09 11:05:33 -05:00
Brian Daniels e239549585 Fixing path comparisons on Windows 2019-04-08 13:07:11 -05:00
Cruz Monrreal II 3f76f6ed79 Fixed shellcheck issues found in functions.sh
Added comments to functions
2019-04-08 10:45:07 -05:00
Cruz Monrreal II 397ee3074a Removed nearly all usage of 'apt-get'.
Primary cause of false Travis CI failures was running 'apt-get update'.
Refactored all instances where this was needed with manually fetching and installing dependencies in S3 instace.

This also includes GCC installation.
2019-04-08 10:45:07 -05:00
Cruz Monrreal II 5f40538c59 Re-enabled PR status reporting.
Added external bash file to source functions from
2019-04-08 10:45:07 -05:00
Aleksi Klasila 8137974232
rm ["python", "-m"] from build_command 2019-04-04 10:34:23 +03:00
Brian Daniels fd7467c9ba Test to ensure only the last linker file is used in a project 2019-04-02 09:48:55 -05:00
alekla01 3665209df8 examples test compile optional verbose 2019-04-02 09:01:55 +03:00
Brian Daniels 51c1bd35a0 Fixing path comparisons on Windows 2019-03-27 14:08:42 -05:00
Cruz Monrreal c2e5a8bb75
Merge pull request #10131 from kegilbert/baremetal-blinky-examples-test
Add baremetal example to testing
2019-03-27 00:22:07 -05:00
Martin Kojtal aca0f2f48e
Merge pull request #10114 from bridadan/armc6_mbed_ide
Allow the use of Mbed Studio's version of ARMC6
2019-03-23 16:30:01 +01:00
kegilbert ac2a52a429 Remove gnuarmeclipse from baremetal export testing
baremetal does not currently work with gnuarmeclipse
2019-03-22 09:17:24 -05:00
Kevin Gilbert 8084fd91af Add baremetal example to testing 2019-03-20 18:04:33 -05:00
Jimmy Brisson d331539853 Test that excluded libraries are correctly collected 2019-03-20 09:01:27 -05:00
Brian Daniels c4a9fb3851 Test detection of Mbed Studio version of ARMC6 2019-03-19 17:36:28 -05:00
Brian Daniels b13570907e Remove stray prints and whitespace 2019-03-19 17:36:02 -05:00
Jimmy Brisson 10c6a277d3 Test that secure/non-secure memories are passed
To managed bootloader mode
2019-03-14 14:33:29 -05:00
adbridge 34ae13dd48 Fix cut/paste error in the new example github link 2019-03-11 12:09:48 +00:00
adbridge 9432d45746 Looks like only the LPC55S69_NS flavour of target is required. 2019-03-11 11:57:56 +00:00