Commit Graph

2315 Commits (1e625e2a54ba6f62f9ab50e3037354e32b51ce40)

Author SHA1 Message Date
adbridge 8f948f640c Fix up subprocess calls
subprocess.call() does not by default return a status value.

Update the commands to add shell=True which forces a return value.
Also convert the commands to a single string rather than a list as
this plays more nicely with both linux and windows.

Also fix a spurious :
2018-11-16 14:49:17 +00:00
adbridge 9d31de07cb Make examples commands return a failure
Currently the following commands in examples.py,
do_import()
do_deploy()
do_versionning()
do_clone()

all return a success status (ie 0) irrespective of any errors
originating from their sub-functions.

This PR fixes this. Now these commands will return one of:
0 - success
1 - general failure
x - failure returned by a subprocess.call function
2018-11-16 14:49:17 +00:00
Leszek Rusinowicz b7c0fbddf2 Disabled makefile exporters for PSoC 6 based targets. 2018-11-02 19:50:03 -05:00
Leszek Rusinowicz 4a07001873 Simplified M0/M4 binary merging functionality. Now, M0 binary image to be used has to be explicitely named in a json file (can be ovverriden in mbed_app.json). Exporter hooks removed completely. Cleanup and improvements to the comments, including removal of the redundant doxygen comments. Code run through astyle. Additionally: - changes to drivers/Timer.cpp reverted - ipcpipe_transport.* files removed as they are not used for now, - fixed condition in stdio_init.cpp to perform serial initialization only when STDIO is enabled, - added missing resurce manager call in PWM initialization, - us_ticker initialization changed to use pre-reserved clock divider (to avoid resource manager call). Changed reporting level from info to debug in PSOC6.py. Added missing includes for function declarations in startup files. Fixed (removed) garbadge text in psoc6_utils.c Precompiled binaries updated for recent changes in psoc6_utils.c and moved to a separate folder; README and LICENSE files added. 2018-11-02 19:50:02 -05:00
Leszek Rusinowicz 9c93f3a850 Added required changes outside of TARGET_Cypress tree:
1. In drivers/Timer.cpp make sure that hardware timer is initialized outside of critical section.
   This is because on PSoC 6 hardware resources are shared between both cores
   and we have to make sure that the other core is not already using a particular resource.
   This mechanism is based on interprocessor communication taht cannot be handled iside of
   critical section.
2. Added support for post-binary hook function for PSoC 6 targets, so the hex image for M0+ CPU core
   can be merged with M4 core image for the final image.
3. Added possibility to use hook function from exportes, so the M0+ hex image could be included
   in the generated project.
4. Included hex images in the build dependency list, so the update of image is catched by the
   build process.
2018-11-02 19:50:02 -05:00
Jimmy Brisson 3fbdada065 Remove unused imports 2018-11-02 19:50:00 -05:00
Jimmy Brisson be45ef2ff7 Reformat make.py 2018-11-02 19:50:00 -05:00
Jimmy Brisson 392df4096d Rework make.py Ct pLI to avoid treating apps as tests
Prior to this changeset, applications were all compiled as test #0. This
can lead to unexpected behavoir. In particluar, it's weirdly impossible
to use a `.mbedignore` file to ignore
`mbed-os/features/unsupported/tests/mbed/env/test_env.cpp`.

This PR stops treating applications like tests.

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
2018-11-02 19:50:00 -05:00
Lasse Bang Mikkelsen 808ceab546 Fix Makefile export with Python 3
In Python 3, the map() function returns a map object, not a list object as in
Python 2. Ensure a list object is returned from format_flags() by wrapping
map() in list(). This is compatible with both Python 2 and 3.
2018-11-02 19:50:00 -05:00
Przemyslaw Stekiel fdee8998ec Fix Ice Tea test execution order to be sorted by names. 2018-11-02 19:50:00 -05:00
Naveen Kaje 4a6c90dc54 build_api: remove unused import
Remove unused tempfile import.
2018-11-02 19:49:58 -05:00
Jimmy Brisson f3127a43ba Merge duplicate keys in JSON.
### Description

I would love to make this an error, but we have had a duplicate key in
`targets.json` for a while now. Instead, we're merging in a semi-smart way.
This will allow you to have things like `"target.features_add"` twice, and
both will take affect.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
2018-11-02 19:49:54 -05:00
Brian Daniels b496781f73 Adding file type for linker script arg in make script 2018-11-02 19:49:53 -05:00
Jimmy Brisson dfc4f83cc0 Stop shouting at users in error messages 2018-11-02 19:49:52 -05:00
Jimmy Brisson 21cc67ebf0 Tools: Don't traceback on missing linker script
### Description

The `mbed compile` would traceback when no linker script is found.
This PR changes that behavior to make that into a NotSupportedException,
which has decent user behavior.

Fixes #7723

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-11-02 19:49:52 -05:00
Cruz Monrreal II 82ac0e9731 Corrected OFFICILLY_SUPPORTED typo 2018-11-02 19:49:52 -05:00
Jimmy Brisson ca60b12584 Track supported information within toolchain clasess 2018-11-02 19:49:52 -05:00
Jimmy Brisson 0b488c68f9 Tools: Restrict toolchains reported by mbed compile -S to official ones
### Description

The `mbed compile -S` command is suposed to indicate what targets
support what toolchains. The command was printing out things that
don't make sense, like `GCC_CR` and things that make sense, but are
not offiially supported yet, like `ARMC6`. This PR fixes all of that.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-11-02 19:49:52 -05:00
Jimmy Brisson 5b90a731d5 Remove what we're checking for membership 2018-11-02 19:49:52 -05:00
Jimmy Brisson 6a5c5c98f2 Remove unused local 2018-11-02 19:49:52 -05:00
Jimmy Brisson 705f8c9f78 Fix minor formatting mistake 2018-11-02 19:49:52 -05:00
Jimmy Brisson b1b2670423 Tools: Use logical paths in ignored_dirs
### Description

Exporting to GNU ARM Eclipse, E2 Studio, and other exclude-based IDEs
currently generats unusable project files online. This is because the
list of directories ignored in the scan is inconsistant about what sort
of paths are used: logical paths, or phisical paths. This patch makes
all paths in ignored_dirs logical. This should fix the excluding tags
in these project files.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-11-02 19:49:51 -05:00
Jimmy Brisson ed2db01197 tools: Raise NotSupported when target definition is incomplete
### Description

Noticed by the online compiler:
When a user has an incomplete target definition, the error is not show
to the user. That's because it's reported as a `KeyError`. This PR adds
an outer `NotSupportedException` so that the outer catch statement knows
that this is not a build system crash, but a user error.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
maclobdell 33d3e0e87f Add support for NXP Rapid IoT prototyping kit
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-10-19 11:46:55 +01:00
kert d8771a57a3 Allow overriding build timestamp from env 2018-10-19 11:46:55 +01:00
Ganesh Ramachandran aff0b2d434 Removed IAR definition for TMPM4G9
TMPM4G9 device was added in IAR 8.30. Based on this, exporters should be disabled for now (not supported in 7.x version).
2018-10-19 11:46:55 +01:00
Ganesh Ramachandran 29e0e65b1f Added Support for TOSHIBA TMPM4G9 2018-10-19 11:46:55 +01:00
Jimmy Brisson abd5f21b73 Tools, memap: Silence warnings that we handled correctly
### Description

Memap will create a bunch of warnings about "Unknown object name" when
parsing a map file created for the RZ_A1H and the GR_Peach. Theses
warnings are sperious; the information in these sections does not belong
to an object file. This PR silences these warnings.

Fixes #6258

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
Jimmy Brisson 8fb705d803 mbed dm: Check for missing payload and give a better error message
### Description

The error message when you invoke `mbed dm update prepare` without a payload
is particularly obtuse, and provides a user with no indication that the
payload is missing. This change makes that error message not stink.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
Brian Daniels 652147d65b Remove references to GCC_CR from the rest of the tools 2018-10-19 11:46:55 +01:00
Brian Daniels 648f6d8bca Removing GCC_CR mention from settings.py 2018-10-19 11:46:55 +01:00
Jimmy Brisson 32031fc008 Export, nb: Use same path for cpp as the rest of the tools
### Description

The netbeans exporter was being inconsistant with it's invocation of
the C pre-processor on the linker script: the C pre-processor was always
invoked from `$PATH` where as the rest of the tools were invoked as
configured by the tools. This changes the invocation of CPP to match the
rest of the tools: heed the conifguration.

Fixes https://github.com/ARMmbed/mbed-cli/issues/663

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
Jimmy Brisson 66edc69d64 Convert to a set in win2unix 2018-10-19 11:46:55 +01:00
adbridge 564eb9f8e0 Remove mbed-os-example-client
This example is now deprecated and as such needs to be removed from
ci test compilation.
2018-10-19 11:46:55 +01:00
Jimmy Brisson 6772e097ac Tools: Ensure vtor reserved bits are all 0
### Description

The VTOR reserves the lowest 7 bits. This PR changes the round up
behavoir of the application offset to make sure that the address used
for the in-flash vector table always ends in 7 0's.

Fixes #7392

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
Cruz Monrreal II cdfefd9d0c Enabled the removal of a trailing slash when sourcing examples from examples.json 2018-10-19 11:46:55 +01:00
Jimmy Brisson fffbab143c Avoid assigning self.libraries 2018-10-19 11:46:55 +01:00
Jimmy Brisson 0a362ef33c Update remaining default_lib usage in arm compiler 2018-10-19 11:46:55 +01:00
Jimmy Brisson 6d7494732b Tools: Fix Microbit releases
### Description

I noticed that there was quite a bit missing from the mbed2 release of
the microbit today. That's because the microbit uses ARM by default and
the GCC_ARM small library. The release script was trying to release for
ARM using scan rules for uARM. Turns out we're stuck with 2 configuration
parameters for the same thing: `default_lib` for GCC and `default_toolchain`
for ARM. Dang

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
Andrew Leech 0271b33d0f tools/utils: Fix issue with loading json files as ascii on python3 linux 2018-10-19 11:46:55 +01:00
Yossi Levy 8f95eb5d8c Adding back blockdevice example after removing it for PR #7774. Target should be K64F 2018-10-19 11:46:55 +01:00
Jimmy Brisson a191140852 Tools: Fix Python3 + firmware header traeback
### Description

Traceback:
```
Merging Regions
  Filling region bootloader with mbed-cloud-client-example/mbed-os/features/FEATURE_BOOTLOADER/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/TARGET_FRDM/mbed-bootloader-k64f-block_device-sotp-v3_4_0.bin
  Padding region bootloader with 0x9a4 bytes
Traceback (most recent call last):
  File "mbed-cloud-client-example/mbed-os/tools/make.py", line 293, in <module>
    ignore=options.ignore
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 548, in build_project
    merge_region_list(region_list, res, notify)
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 423, in merge_region_list
    _fill_header(region_list, region).tofile(header_filename, format='hex')
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 380, in _fill_header
    header.puts(start, struct.pack(fmt, time()))
struct.error: required argument is not an integer
```

reason: `time()` returns a float. So the fix is to force it to be an `int`.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
Jimmy Brisson b44bf98b77 tools: Make "file" key in notifications consistant
### Description

2 calls to `notify.cc_verbose` used the a FileRef object in place of
the file's name. Other calls to `notify.cc_info` would use just the
file name. This PR changes these 2 calls to be consistant with the rest.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
Jimmy Brisson 00f93471f3 tools, NRF51-post-build: Use paths to hex files
### Description

The NRF51 post build hook finds it's hex files using the Resources
object. This PR fixes the corner case where the hex files within a
project have a name!=path (This really only happens online).

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
bcostm 9adc6635a0 STM32: add missing IAR exporters 2018-10-19 11:46:55 +01:00
Jammu Kekkonen c70943b544 Change update file format to binary to all targets
- Change the default file format to binary for all targets, even though some targets need hex as app format, updater always needs bin for now
- Unify the file name generation from generator side and usage side for the update bin
2018-10-19 11:46:55 +01:00
Andrew Leech 47c14328cd Ensure target bootloader settings can be overridden in mbed_app.json Values like `target.mbed_rom_start` were being replaced by None and then ignored. 2018-10-19 11:46:55 +01:00
Jenny Plunkett 384257d49c Remove reference to "mBed"
Removed another reference to "mBed"

Another "mBed"
2018-10-19 11:46:55 +01:00
Juhani Puurula 95365844db Enabled trace, added KW24D default driver 2018-10-08 15:29:18 +01:00
Juhani Puurula 7e2bc492ee Renamed MAC tester config 2018-10-08 15:29:18 +01:00