Commit Graph

1044 Commits (2ac978fd530af1db0adda130a05e3d7bd9f0914a)

Author SHA1 Message Date
Jimmy Brisson 2ac978fd53 Add license to configuration header 2017-04-21 15:42:23 +01:00
Jimmy Brisson 38505300a5 Move config to own dir
I also broke the config header template into it's own file. Further, I
fixed a bug in the config header generation where if no macros, builds
would crash.
2017-04-21 15:42:23 +01:00
Brian Daniels 8521f71386 Removing old filesystem test 2017-04-21 15:42:22 +01:00
0xc0170 1cbcf7d77e tools: add new examples
Bootloader, bootloader blinky and fat filesystem examples added.
2017-04-21 15:42:21 +01:00
Jimmy Brisson 1d68057a7a Fix Traceback in CMSIS export.
The traceback was caused when a file without a parent directory (which
is implicitly ".") is added to the resources object. The code assumed
that all files within the resources object would have a parent
directory.

This commit changes the check to account for files that are in the root
directory of a project and have no preceding `./`
2017-04-21 15:42:20 +01:00
Jimmy Brisson 18134bf8b3 Fix include paths for Windows builds 2017-04-21 15:42:20 +01:00
Jimmy Brisson d732f31a12 Generate GNU ARM Eclipse's .mbedignore with Jinja2 2017-04-21 15:42:20 +01:00
Jimmy Brisson b7b55db77a Allow configuration of artifact name in app config 2017-04-21 15:42:17 +01:00
Jimmy Brisson e6c44d633c Update gnuarmeclipse to preprocess linker scripts 2017-04-21 15:42:17 +01:00
Jimmy Brisson 5b2a5103fb Fix a scoping typo in toolchains 2017-04-21 15:42:16 +01:00
Jimmy Brisson 890472c3ce Raise error when mbed_app.json is bad 2017-04-07 14:03:05 +01:00
Głąbek, Andrzej 2658bdb113 IAR exporter: extended debugger settings template with modifiable options needed for Nordic targets. 2017-04-07 14:02:27 +01:00
Willie Walker a1391f563d Fix mbed-cli issue #468. Add LPCTargetCode.lpc_patch to POST_BINARY_WHITELIST. 2017-04-07 14:02:08 +01:00
Seppe Stas 23499843b1 Removed superfluous space
The extra space between "--no_wrap_diagnostics" and "-e" is inconsistent with the development and release targets.

It bugs people (like me) that have little OCD tics 😉.
2017-04-07 14:02:02 +01:00
Jimmy Brisson 1ce69d1b26 Elide adding regions to profile when empty 2017-04-07 14:01:56 +01:00
Tony Wu 95ccafa7f6 tools - turn off page alignment of sections
By default, ld sets page alignment of sections to 0x8000, which bloats
up elf file size. This behavior is unnecessary for MCU.

Example:

1. page alignment on

mbed.elf file size 144936

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x008000 0x00000000 0x00000000 0x00400 0x00400 R   0x8000
  LOAD           0x008400 0x00000400 0x00000400 0x00010 0x00010 R   0x8000
  LOAD           0x008410 0x00000410 0x00000410 0x0ab3c 0x0ab3c RWE 0x8000
  LOAD           0x018000 0x20000000 0x0000af4c 0x008d0 0x008d0 RW  0x8000
  LOAD           0x01b81c 0x0000b81c 0x0000b81c 0x00000 0x00004 RW  0x8000
  LOAD           0x020000 0x1fff0000 0x1fff0000 0x00000 0x00400 RW  0x8000
  LOAD           0x0188d0 0x200008d0 0x200008d0 0x00000 0x08860 RW  0x8000

2. page alignment off

mbed.elf file size 91792

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000114 0x00000000 0x00000000 0x00400 0x00400 R   0x4
  LOAD           0x000514 0x00000400 0x00000400 0x00010 0x00010 R   0x1
  LOAD           0x000528 0x00000410 0x00000410 0x0ab3c 0x0ab3c RWE 0x8
  LOAD           0x00b068 0x20000000 0x0000af4c 0x008d0 0x008d0 RW  0x8
  LOAD           0x00b938 0x0000b81c 0x0000b81c 0x00000 0x00004 RW  0x1
  LOAD           0x00b938 0x1fff0000 0x1fff0000 0x00000 0x00400 RW  0x1
  LOAD           0x00b938 0x200008d0 0x200008d0 0x00000 0x08860 RW  0x8

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-04-07 14:01:22 +01:00
Jimmy Brisson 80756e9d7a Add some type checking of configs
Before, the types were not checked and just expected. The old behavior
would cause lots of tracebacks, or, much worse, convert things like:
```
{
     "target_overrides": {
        "*": {
		"target.macros_add": "CONFIG_GPIO_AS_PINRESET"
        }
     }
}
```
into a definition of each of the letters as macros that expand to
nothing, causing massive compilation problems.

I resolved this by adding some type checking to the config data. Now
there is a type check for most of the fields within a library and
application configurations.
2017-04-07 14:00:50 +01:00
Anna Bridge f413884e5e Add an ignore list so that sets of test, target can be excluded from the compilation set. 2017-03-24 20:46:22 +00:00
Anna Bridge 3ef17da544 Added running total for target being compiled. 2017-03-24 20:46:09 +00:00
Anna Bridge 2f80fda4f3 Review comments: Add a child logger, close json file after reading, minor formatting updates. 2017-03-24 20:45:57 +00:00
Anna Bridge 9c043f0fd6 Fixed/improved error parsing from API messages. Fixed results output summary. General tidy up of long lines. Added a new field to json file, target_list, to allow the user to override the set of targets used for the compilation. 2017-03-24 20:45:45 +00:00
Phyo Kyaw 7b2b4dcacc This change is for RZ_A1H and VK_RZ_A1H target. 2017-03-24 20:44:15 +00:00
Jimmy Brisson 006503df2c Don't set the build_dir to anything on export
When constructing a toolchain for export, we currently set the
`build_dir` to the `export_dir`. When exporting offline, the
`export_dir` is always set to the root of the project. The toolchains
ignore their `build_dir` when scanning for sorces, so when the exporters
use the toolchains to scan for their resources, they get nothing.

In this patch we set the `build_dir` of the toolchain that the exports
use to nothing. A path of nothing should not match anything, and will
therefore not ignore everything when scanning for resources.
2017-03-24 20:44:03 +00:00
Russ Butler 4924f85abe tools: fix usage of aliases.json
Load aliases.json from mbed-os rather than from a temporary
directory.
2017-03-24 20:40:53 +00:00
Russ Butler 7e77e28580 tools: Rebuild index.json and aliases.json
Rebuild the json files used by arm-pack-manager now that a bug in
version selection has been fixed.
2017-03-24 20:40:40 +00:00
Russ Butler ff9f9ecb3a tools: fix package version in arm pack manager
Use python's LooseVersion to get the correct version.
2017-03-24 20:40:27 +00:00
Russ Butler 13b2d0f37e tools: Allow all flash algos to be retrieved
Add an 'all' parameter to get_flash_algorthim_binary. When set
an enumerator of all flash algorithms is returned. rather than just
the first flash algorithm.
2017-03-24 20:40:15 +00:00
Jimmy Brisson e949b857a0 Add unit test for gcc path specifications 2017-03-24 20:39:50 +00:00
Jimmy Brisson c3d0ca30c3 Use PATH env variable when gcc found in PATH
Resolves the github issue #3790: Blinky fails to build (on Mac) after
addition of linker script preprocessing feature. Paraphrasing, this
issue is that Homebrew on mac does not install `arm-none-eabi-gcc` in
the same location as `arm-none-eabi-cpp`, the C Pre-Processor. The tools
prior to this commit, and after turning on the pre-processing of the
linker-script will fail on any Mac homebrew installed toolchains.

This commit resolves the above issue by allowing the toolchain's path to
the executable to remain empty after a call to `check_executable`. When
this path is empty, the tools will search the PATH environment variable
for the executable.
2017-03-24 20:39:37 +00:00
Jimmy Brisson f6388de8f4 Fix toolchain path names in Mbed 2 builds
I accidentally broke only uARM mbed 2 builds. Here is the story: When
scanning for resources, toolchains look for any `TOOLCHAIN_<classname>`
folders to include. These `<classname>`s mostly match the name passed in
on the command line with one exception: `uARM` on the command line maps
to `ARM_MICRO` the class. This would not be a problem except for the bug
that I introduced in a prior commit. The bug is that the mbed2 library
builds will use the name passed in on the command line to construct
`TOOLCHAIN_<cli-name>`. This will not match when scanning.

I fixed it by translating the `<cli-name>` into the `<classname>`.
2017-03-13 11:14:54 +00:00
Jimmy Brisson 8a14c4a9c3 Update test_api call to prepare_toolchain
An earlier patch in this series changed the API for
`build_api.prepare_toolchain`. This commit updates the `find_test`
function to call `prepare_toolchain` correctly.
2017-03-13 11:14:27 +00:00
Jimmy Brisson ed60ef142b Remove static analysis scan
An earlier patch in this series relies on the assumption that all
toolchain construction goes through `prepare_toolchain`. This is still
not the case. The only remaining user of the `mbedToolchain` object that
does not go through `prepare_toolchain` is the static analysis scanner.
It's basically dead-code at this point. I say we remove it. So this
patch removes it.
2017-03-13 11:14:23 +00:00
Jimmy Brisson 0b15a05a54 Re-factor mbed2 lib builds to use prepare_toolchain
The prior patch in this series makes the assumption that any building
will go through `build_api.prepare_toolchain`. This was not a valid
assumption for the mbed2 build process. So, instead of maintaining 2
ways of using the toolchain classes, I elected to unify on
`prepare_toolchain`.
2017-03-13 11:14:20 +00:00
Jimmy Brisson a48647f4f1 Ignore build directory from scan resources
This is a bug fix for the following bug (Github issue #437):

If two builds were run specifying a non-default build folder, the second
build would fail to link with duplicate symbols and may not fit on the
device. The root of this problem is that these non-default build folders
are not ignored by scan-resources, and therefore included in the build.

We fix this bug by ignoring the build directory passed into the tools.
2017-03-13 11:14:15 +00:00
Jimmy Brisson acf7012a20 Ignore FuzzyWuzzy warnings
Nobody actually cares.
2017-03-13 11:13:25 +00:00
Jimmy Brisson feb7569da7 Add post-build hook white-list to exporters
We have scripts (written in python) that are run after a binary image is
created in the tools. These scripts are not really exportable, as they
are part of the tools and may include and use any bits of python code
they please. So we don't export them. This patch disables export
combinations that would not work because the post-binary hook is not
exported. A white-list is used for forward compatibility.
2017-03-13 11:13:18 +00:00
Martin Kojtal ee3e503c77 Export: fix issue #3865 - cmsis-dap swd
From JTAG to SWD by default. This was causing flashing error.
2017-03-03 17:52:29 +00:00
Jimmy Brisson 41aff2422c Add the FPU field to the <Cpu> tag it Keil
Recently the Keil IDE has released version 5.23. This version requires
the FPU to be set as part of the <Cpu> tag in the .uvprojx (XML project
file). This patch adds the appropriate FPU settings based on the
trailing F (FPU enabled) or FD (Double precesion FPU enabled) string of
the core.
2017-03-03 17:52:21 +00:00
Sam Grove 9844a390d9 Merge pull request #3762 from simonqhughes/ms_20170213_fs_integration
STORAGE: Merging feature-storage branch commits to master
2017-02-24 11:37:42 -06:00
Sam Grove 2e5f2e96fb Merge pull request #3818 from adbridge/master
Add new script to automate compilation of all mbed-os 2 targets in online IDE
2017-02-23 15:44:41 -06:00
Anna Bridge 415486e780 Removed unecessary exception and replaced with a logging error. 2017-02-23 19:02:55 +00:00
Anna Bridge e95092c91a Address review comments
Replace use of print and write with logging (with different levels).
Add the ability to choose the logging level on the command line.
Fix the exclusion of uARM from compilation.
Remove print_on_fail from run_cmd() functions, now use logging.
2017-02-23 17:51:23 +00:00
Simon Hughes 7b7db588ff STORAGE: remove RTOS_9 test from tests.py. 2017-02-23 16:39:53 +00:00
Simon Hughes 5a977eff30 STORAGE: PR 3762 fix to remove FAT_FS, SD_FS, FS_LIBRARY from tools scripts. 2017-02-23 16:39:46 +00:00
Simon Hughes e43f667174 STORAGE: PR 3762 fix to remove FAT_FS, SD_FS, FS_LIBRARY from tools/libraries.py and tools/tests.py 2017-02-23 16:39:44 +00:00
Simon Hughes 840c77793b STORAGE: Pull request 3762 review feedback changes.
- Fixing code formatting errors with astyle tool.
- Replaced use of TOOLCHAIN_xxx macros with compiler emitted macros.
- Added const to BlockDevice::get_xxx_size() member functions.
- Added documentation for FAT filesystem thread support.
- Added documentation for fat_filesystem_set_errno().
- Added documentation clarifying the reasons for errno/stat symbol definitions in retarget.h.
- Removed FAT filesystem from mbed 2 testing.
- Fixed FATMisc.h Copyright (c) 2016 year to 2017 as its a new file.
- Removed #ifndef NDEBUG from HeapBlockDevice.cpp.
- Removed unnecessary todo comment in retarget.cpp.
2017-02-23 16:39:42 +00:00
Simon Hughes a79062f876 Remove build_travis.py NUCLEO_F412ZG usb tests which requires other commits. 2017-02-23 16:39:34 +00:00
Christopher Haster 90429f60c8 Fixed mbed 2 build_travis with block device
Conflicts:
	tools/build_travis.py
2017-02-23 16:37:15 +00:00
Simon Hughes 5c7fdc13c7 FILESYSTEM: renamed features/TESTS/fs-fat features/TESTS/filesystem. 2017-02-23 16:30:23 +00:00
Simon Hughes 4acf33f436 FILESYSTEM: moved FAT filesystem implemenation to features/filesystem subdir, and fs-fat tests to features/TESTS. 2017-02-23 16:30:21 +00:00