Commit Graph

228 Commits (76af152fe1851c37bb80c374918e822598350c4a)

Author SHA1 Message Date
Cruz Monrreal II 5d74b772ab Merge branch 'remove_gcc_cr' of ssh://github.com/bridadan/mbed into bridadan-remove_gcc_cr 2018-10-11 13:18:49 -05:00
Martin Kojtal 4a0e2bdb31
Merge pull request #8330 from theotherjimmy/force-int-time
Tools: Fix Python3 + firmware header traeback
2018-10-09 10:31:26 -05:00
Cruz Monrreal 43cf16d0f1
Merge pull request #8167 from JammuKekkonen/change_update_format_to_binary
Change update file format to binary for all targets
2018-10-08 10:10:01 -05:00
Jimmy Brisson 8d63ef6060 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-04 11:56:18 -05:00
Brian Daniels c12042a4ab Remove references to GCC_CR from the rest of the tools 2018-10-02 10:51:54 -05:00
Jimmy Brisson f8f5bc40f6 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-09-25 12:52:25 -05:00
Olli-Pekka Puolitaival 55336b034d Py3 support back. Reverted accidentially in icetea changes rebase 2018-09-19 13:59:28 +03:00
Jammu Kekkonen 49572d570a 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-09-18 12:13:29 +03:00
Jammu Kekkonen c069cefbc8 Review fixes 2 for bootloader region generation 2018-09-17 15:56:34 +03:00
Jammu Kekkonen 4952e31b8b Fix bootloader build region generation and add support for bootloaders with multiple segments, as required by NRF52 bootloader. 2018-09-12 09:30:48 +03:00
Cruz Monrreal 48c149b227
Merge pull request #7720 from jeromecoutant/PR_PRETTYTABLE
python scripts : table print with github policy
2018-09-06 22:29:30 -05:00
Olli-Pekka Puolitaival e27a26eb9d Icetea support 2018-08-31 11:51:57 +03:00
Cruz Monrreal 02c03204a6
Merge pull request #7714 from brianesquilona/feature_bootloader
Add BOOTLOADER feature
2018-08-24 19:30:21 -05:00
Jimmy Brisson a7ddea78d7 Remove firmware header from update image 2018-08-22 09:08:12 -05:00
Olli-Pekka Puolitaival 6107769239 Fix build_data functionality with python 3 2018-08-13 12:15:21 +03:00
jeromecoutant a42c73df1b python scripts : table print with github policy 2018-08-07 15:14:27 +02:00
Cruz Monrreal 8755e56fd6
Merge pull request #7567 from theotherjimmy/managed-update-image
Tools: Generate update images with managed bl mode
2018-07-26 10:51:40 -05:00
Jimmy Brisson 76078f6a50 Include `-t ARM` support for v8m, armc6 targets 2018-07-25 11:48:14 -05:00
Jimmy Brisson ac14e37a77 Correct result usage in reporting infra 2018-07-25 10:04:18 -05:00
Jimmy Brisson 69203d30f1 Create update images with managed bl mode 2018-07-20 10:53:00 -05:00
Jimmy Brisson ae033da12f Use mapping of core->arch ver. for tc picking 2018-07-19 10:55:35 -05:00
Jimmy Brisson c030c6a52b Use `-t ARM` for v8m targets
And pick the correct compiler
2018-07-19 10:48:35 -05:00
Cruz Monrreal II a070e350ec Removed extra ARMc6 instance in unique mapping 2018-07-18 14:10:42 -05:00
Cruz Monrreal e9e1ff997d
Merge pull request #7302 from OpenNuvoton/nuvoton_m2351_v1.1
Support Nuvoton's NUMAKER_PFM_M2351 target
2018-07-18 08:49:55 -05:00
Jimmy Brisson 750a2ace64 Use paths explicitly in copy from mbed libs 2018-07-16 14:12:00 -05:00
Jimmy Brisson 91e77f16cd Import FireRef before using it 2018-07-16 14:12:00 -05:00
Jimmy Brisson 545553b6bc Rewrite test detection to avoid relying on "inc_dirs" 2018-07-16 14:11:08 -05:00
Jimmy Brisson 8166889885 Compute inc_dirs from headers 2018-07-16 14:11:08 -05:00
Jimmy Brisson 001c2d3b3b Revisit Mbed 2 building
It's much cleaner now
2018-07-16 14:11:08 -05:00
Jimmy Brisson 7a26cd8da8 Use paths in linking 2018-07-16 14:11:08 -05:00
Jimmy Brisson de913e1ea2 Improve resources API to include more use cases 2018-07-16 14:11:08 -05:00
Jimmy Brisson 06f3fca6cf Correct the _only_ detect_duplicates call 2018-07-16 14:11:08 -05:00
Jimmy Brisson 9326386daf Switch to Resources in build_api and tests 2018-07-16 14:11:08 -05:00
Jimmy Brisson 361fc65f08 Allow missing toolchain parameter to get_config 2018-07-16 14:11:08 -05:00
Jimmy Brisson 4c7cf21feb Require notifier in resources 2018-07-16 14:10:21 -05:00
Jimmy Brisson 7c42302854 Update test builder to use new resources 2018-07-16 14:10:21 -05:00
Jimmy Brisson 87146cd66a Cleanup and reduced scanning 2018-07-16 14:10:21 -05:00
Jimmy Brisson 519e338667 Rework export resource scanning 2018-07-16 14:10:21 -05:00
Jimmy Brisson 2d8cf737e4 Move resource scanning into it's own module 2018-07-16 14:10:21 -05:00
Jimmy Brisson 9968b547d9 Allow ARMC6 only mbed 5 releases 2018-07-16 08:42:55 -05:00
Jimmy Brisson 51276a66b0 Update compiler check to allow only v6 for OS 5 2018-07-12 18:01:40 +08:00
Jimmy Brisson 6d42bd31c6 Tools: Correct release version "parsing" for py3 2018-07-11 09:46:03 -05:00
Cruz Monrreal fab08498f8
Merge pull request #7277 from theotherjimmy/error-on-unknown-config
Tools: Persist config errors until validation occurs
2018-07-05 10:36:35 -05:00
jeromecoutant e17b1df13d build_api.py : add comment about separate_names 2018-06-29 09:30:07 +02:00
Jimmy Brisson 2a9923f86e Skip invalid undefined errors 2018-06-28 10:26:00 -05:00
Cruz Monrreal 8baa8c5997
Merge pull request #7353 from jeromecoutant/PR_BUILDOS2
build_api script : separate PeripheralPins.o
2018-06-28 10:08:42 -05:00
jeromecoutant eba9fb1f8f build_api script : separate PeripheralPins.o 2018-06-27 17:15:37 +02:00
Jimmy Brisson 6f54a8fdd7 Check version of Mbed CLI compile 2018-06-18 14:03:09 -05:00
Cruz Monrreal 80dde0b953
Merge pull request #7092 from cmonr/py3-in-windows
Additional fixes for running Python 3 in Windows
2018-06-04 21:45:55 -05:00
Cruz Monrreal II f689ace3e3 Removed extraneous file open 2018-06-04 12:02:49 -05:00
Cruz Monrreal 78d9c4f330
Merge pull request #6582 from theotherjimmy/memap-flamegraph
Implement zoomable html-flamegraph memap output
2018-06-04 10:48:08 -05:00
Cruz Monrreal II cdbae994d1 Modified IntelHex tofile parameter to use path.
Py3 open(...) returns a BufferedReader instead of a file.
2018-06-04 09:21:43 -05:00
Cruz Monrreal 0fd5447ff7
Merge pull request #6885 from theotherjimmy/fix-startaddr-conflict
BL mode: Prevent jump address conflicts
2018-05-14 16:16:34 -05:00
Jimmy Brisson 4ad8ce073a Prevent jump address conflicts in bootloader modes 2018-05-11 11:23:01 -05:00
Andrew Leech 3b79b3f65e add `--ignore` argument to `mbed compile` & `mbed export` commands 2018-05-11 14:00:01 +10:00
Andrew Leech badd753466 mbed test: add argument `--ignore` to allow passing in extra mbedignore args
In particular this allows ignoring a project main.cpp file when running unit tests
2018-05-09 10:02:02 +10:00
Cruz Monrreal 53d3c4344f
Merge pull request #6781 from theotherjimmy/refactor-notify
tools: Refactor notification API
2018-05-07 10:48:48 -05:00
Jimmy Brisson c186c3ce86 Use mocked notifier for individual tests
That way we separate the collection of notifications from everything else
2018-05-03 10:06:47 -05:00
Jimmy Brisson 0f7e900417 Pass app config to get config
This corrects a bug which would manifest as --app-config not having
much of an affect on test builds (not the first libary bulid)
2018-05-02 09:38:44 -05:00
Jimmy Brisson fcf7dbf4c6 Use notification API in BL modes 2018-04-26 09:54:01 -05:00
Jimmy Brisson 85e33b4143 Eliminate silent option from build_project
It's now all handled by the notifier
2018-04-26 09:40:30 -05:00
Jimmy Brisson 72beee7e90 Refactor notification logic into it's own class 2018-04-26 09:04:26 -05:00
Jimmy Brisson bfceb1050d Implement zoomable html-flamegraph memap output 2018-04-09 16:33:32 -05:00
Jimmy Brisson 6cf2efa794 Prevent compiling with unsupported compilers 2018-04-04 14:02:13 -05:00
Jimmy Brisson 24c7b1a61a Move Mbed 5 support check so that it affects the exporters 2018-03-29 14:05:23 -05:00
Laurence de Bruxelles ce6bd9defc Allow build profiles to omit language entries 2018-03-05 15:21:08 +00:00
Anna Bridge 8f5b857747
Merge pull request #5950 from theotherjimmy/header-config
Reserve and Render header in managed BL mode
2018-03-01 16:25:18 +00:00
Christopher Haster 011e018f52 Revert "Added pretty bar printing for compile output"
This reverts commit 471d99c68f.
2018-02-22 22:07:22 -06:00
Jimmy Brisson 9f99330be6 Allow overriding offsets with "app_offset" and "header_offset" 2018-02-20 11:45:32 -06:00
Jimmy Brisson deca33ff81 Calculate digests with header up to their start address 2018-02-20 11:45:32 -06:00
Jimmy Brisson 5b2d7a27d2 Require endianness specification for ints > 8 bits 2018-02-20 11:45:32 -06:00
Jimmy Brisson 4c47f21cac Fill header in application 2018-02-20 11:45:32 -06:00
Tero Jääskö faabde13a1 tools: build: fix handing of "--stats-depth"
The introduction of pretty-bar had broken the handling of
"mbed compile"'s "--stats-depth" argument. No matter what one gave
as parameter to it, the result output is just using the default 2.
Fix the logic in build_api.
2018-02-13 15:35:01 +02:00
Cruz Monrreal c679dee286
Merge pull request #5848 from theotherjimmy/compile-py3
Python2+3: mbed compile, mbed test --compile,  python unit tests
2018-02-07 15:48:18 -06:00
Jimmy Brisson c93a2bfa4c Python2+3: Use absolute import where possible 2018-02-05 11:07:37 -06:00
Jimmy Brisson 68737f2762 Python2+3: Things import 2018-02-05 11:03:44 -06:00
Jimmy Brisson c09142e82c Don't bother padding hex files for managed bl 2018-02-02 15:44:32 -06:00
Jimmy Brisson 4f13e21aa0 Use OUTPUT_EXT in managed boot loader 2018-02-02 15:40:44 -06:00
Jimmy Brisson a92d0df4ae Move region adding to mbedToolchain 2018-01-31 10:04:34 -06:00
Jimmy Brisson c180324530 Configure boot loader after scanning 2018-01-31 10:04:34 -06:00
Christopher Haster 471d99c68f Added pretty bar printing for compile output
Looks like this:

    Building project mbed-os-prettyoutput (ARCH_PRO, GCC_ARM)
    Scan: .
    Scan: env
    Scan: mbed
    Scan: FEATURE_LWIP
    Text 70.5KB Data 2.72KB BSS 7.43KB                 ROM 73.2KB RAM 10.1KB
    ROM [|||||||                                             ]  73.2KB/512KB
    RAM [||||||||||||||||                                    ]   10.1KB/32KB
    Image: BUILD/ARCH_PRO/GCC_ARM/mbed-os-prettyoutput.bin

If you build a target without a cmsis-pack it looks like this:

    Building project mbed-os-prettyoutput (ARM_BEETLE_SOC, GCC_ARM)
    Scan: .
    Scan: env
    Scan: mbed
    Scan: FEATURE_BLE
    Text 99KB Data 2.84KB BSS 13KB ROM 102KB RAM 15.8KB
    Image: BUILD/ARM_BEETLE_SOC/GCC_ARM/mbed-os-prettyoutput.bin

And the old behaviour of displaying the memap table can be brought back
by passing the --stats-depth parameter
2018-01-25 11:46:23 -06:00
Martin Kojtal e07b3c7ac6 tools: cmsis and hal are build together
Build api used to build cmsis separately (how mbed 2 is being build). This is
currently not how cmsis is being defined. As there target dependencies in some
cases, we should include paths from targets when building cmsis
2018-01-02 11:48:56 +00:00
TomoYamanaka 8f42cf7ef5 Revert "Remove Cortex-A mbed OS 5 support"
I changed the python and json files to re-registering GR-PEACH to Mbed OS 5.
2017-12-21 14:09:24 +09:00
Jimmy Brisson e0ba3e857c Update Cortex-A build errors 2017-12-07 14:43:40 -06:00
Russ Butler abe431f48b Prevent traceback when memap fails to parse
If map file parsing fails then memap_instance is set to None. To
prevent a traceback when parsing fails check if this is None before
trying to access any of its fields.
2017-11-20 12:41:26 -06:00
Jimmy Brisson 6cecd09d07 Merge pull request #4961 from theotherjimmy/check-rtos-export
Check for mbed 5 support on export
2017-09-27 09:02:38 -05:00
Jimmy Brisson 8a9d79bcbd Add ARMC6 to supported matrix 2017-09-11 13:20:33 -05:00
Jimmy Brisson dc6398a385 Check for mbed 5 support on export 2017-08-23 08:31:07 -05:00
Marcelo Salazar 5469be4de0 Fix to generate memory_usage key in report 2017-08-06 14:03:09 +01:00
Marcelo Salazar 7053ef9412 memap enhancements with depth level configurable
Removed heap/stack from report
Add --stats-depth option to mbed compile
Fix minor issues identified in review
Fix bug when parsing armcc libs
Fix code style
Fix minor issues on existing tests
Fix memap for automated TESTS
Fix stats-depth parameter for tests
2017-08-06 10:30:04 +01:00
Jimmy Brisson c8e6cf5bdd Collect ignores from scan resources and use in exporetrs 2017-07-26 14:31:22 -05:00
lordguilly 5f22577da1 added the missing verbose=verbose to printout the command line correctly 2017-07-06 00:38:42 +01:00
Martin Kojtal 278634a1f6 tools: mbed sdk boot should be separate object file
This was probably deleted during the rebase, as mbed sdk boot needs to be
own object file due to using weak functions.
2017-06-08 17:19:58 -05:00
Jimmy Brisson 9277c6e564 Move profile processing into build_api 2017-06-02 12:05:01 +01:00
Jimmy Brisson cee0cbd900 Remove Cortex-A mbed OS 5 support 2017-06-01 13:16:09 -05:00
Jimmy Brisson d8caee9077 Disallow building of mbed OS 2 + rtos 2017-06-01 13:16:03 -05:00
Jimmy Brisson 07a6c07408 Revert "Disable Cortex-A in tooling to provide better error messages"
This reverts commit f5859b308b.
2017-05-31 13:06:30 -05:00
Jimmy Brisson f5859b308b Disable Cortex-A in tooling to provide better error messages
Disable Cortex-A in compile supported matrix
Disable Cortex-A in export supported matrix
2017-05-30 14:32:06 -05:00
Martin Kojtal 4b9b7188b8 tools: fix objects names that we need because of weak linkage
Fixing retarget and board object files, plus adding new one mbed_main.
2017-05-12 14:51:51 -05:00
Bartek Szatkowski 2ddf4b33cb CMSIS5: Remove ARM7 support and targets 2017-05-12 13:48:43 -05:00