This covers the case when a macro is set with the same name as a
parameter. Previously, the macro would be repeated on the command line,
which causes certain toolchains to break (ex. IAR assembler). Now the
config system will override the parameter's value with the macro's
value.
IAR 8 linker map puts C++14-style apostrophe digit separators in its
addresses, such as:
.data inited 0x2000'1ff0 0x4 mbed_rtx_idle.o [159]
Extend the regex pattern to allow this.
* Modify linker scripts to be compatible with bootloader and PSA
* Add memory protection
* Modify original post-build step to allow link with PSA binaries
* Config kvstore for ITS on FUTURE_SEQUANA_PSA
* Enable PSA-Crypto on PSoC6 with NVSeed
### Description
This PR moves the old memap file handling required for differential
memap from within memap to the toolchain object. This has the
advantage that we can do the `mv <app>.map <app>.map.old` the moment
before it is overwritten by the linker. This should allow multiple
reruns of memap without modifying your build directory.
### Pull request type
[ ] Fix
[x] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
This PR modifies the name of the bin file generated for SMCC FOTA feature
Description
Modify name of the bin file from '-payload.bin' to '_update.bin' in REALTEK_RTL8195AM.py file to adapt the manifest tool requirment for the SMCC FOTA feature.
Pull request type
[ ] Fix
[ ] Refactor
[x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
The 'archive' method of the toolchain class 'ARM' expects that self.ar
is a string, but the constructor of the class 'ARMC6' initializes it
with a list. This patch fixes the issue.
### Description
Arm compiler 5 builds with "short" enums and "short" wchars. This means
that C/C++ enums will be packed into the smallest power of 2 number of
bytes by the compiler and the `wchar_t` is 2 bytes. Arm compiler 6
defaults to packing enums into 4 bytes and `wchar_t` is 4 bytes.
Further, Arm Compiler 5's `-O0` (no optimizations) bulids will actually
do some amount of optimizing, similar to Arm Compiler 6's `-O1`. I have
switched the debug profile to `-O1` for maximum compatibility with our
prior behavior.
NOTE: "Compatibilize" is a word
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
Moved "bootloader_not_supported" check to where it was and handle that exception at only one place.
Removed ram/rom size info for realtek from targets.json. THe info we have is not correct.
was Not handling config exceptions from regions and ram_regions property
adding rom-ram info for REALTEK_RTL8195AM
1. Adding SRAM in available ram
2. If the target doesn't exist in cmsis but targets.json, handle accordingly and raise apt exceptions where needed.
3. If no sram is provided, raise exception
### Description
The prior fix assume that the dependencies through `.lib` references
would have a "sane" name. My definition of "sane" here is that the
reference will have a path that starts with the path to the `.lib` file
and _removes_ the `.lib` suffix. The online compiler does not remove the
`.lib` suffix. Instead, it keeps it. This makes the string replacement
in the prior PR fail.
Also, this is faster, and simpler.
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
### Description
Ignored directories are collected for the sake of exporters that use
a blacklist-style approach similar to these build tools. This ignore
list will include `/filer/<gibberish>` when exported from the online
Compiler. This patch fixes that behavoir.
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
### Description
The prior fix made the assumption that you wanted to compute all of the
parents for a give header file going all the way up the path. This is
not true: you probably want to stop when the project stops. We already
keep track of a virtual name within the project, so instead, we compute
parents of the name, and generate the actual location of these files in
your FS as the path. This makes the solution robust offline and online
(I tested it with my local copy of os.mbed.com)
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
Update the padding sequence so that the gaps
are padded after all the regions are merged.
This avoids overwriting active regions and
serializes the process.
RAM/ROM memory data of target is required for statistics and linker
files, goal here is to fetch maximum 4 RAM/ROM regions from CMSIS pack
and make them available for C/C++/Linker flags as defines
### Description
The prior logic assumed that "." would not be added to the include
paths, indicating that the project root would not be added to the
include paths correctly in the online environment ("." would be
incorrect there). This change set started by removing the addition
of "*.", and then fixed building from there.
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
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.
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.
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 :
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
### Description
The DS-5 exporter does not work. It exports projects which I'm 100% sure
don't build. I have been looking over supporting it for about 6 months
now and I have convinced myself that I don't think it's worth the
trouble. Shout now if you need this exporter.
### Pull request type
[ ] Fix
[ ] Refactor
[ ] Target update
[x] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
NRF Softdevice hex file can be in chunks.
Make sure we account for the space where the bootloader resides
by including all the chunks within the end of rom marker. This will
clearly mark out the initial bootloader region.
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.
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
### 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
### 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
### 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
### 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
### 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
### 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
### 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
### 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
### 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
### 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
### 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
### 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
### 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
While feature changes were being added to mbed-os a number of
examples were removed from this list due to incompatibility issues.
This PR adds those examples back in:
Filesystem,
Blockdevice,
Mesh-minimal,
Bootloader.
This PR also adds in the new NFC example.
IAR assembler 7.80 has some problems handling difficult macros, leading
to immediate exit with return value -11.
In particular, a URL string has been causing problems, presumably due to
the "//" resembling a comment.
A previous escaping workaround in 0d97803 seemed to work, but the crash
has still been seen with a particular target.
Previous creation of the extended command line file for the IAR
assembler was stripping quotes from macros. This rendered the resulting
definitions for string-containing macros incorrect, which means that we
can assume no assembler code is currently relying on them.
Therefore, as a precautionary measure to avoid the crash, simply remove
all macros containing strings when creating them for IAR. This
apparently clears the crashes seen during testing of
https://github.com/ARMmbed/mbed-os/pull/8023
TB_SENSE_12 would have been left behind by the changes in #7778. This commit implements the changes in mbed to allow targets to provide a default network interface for Silicon Labs 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
### Description
Now that we are delegating the help text to `device_managment.py`,
it should print out help as if it's invoked with `mbed device-management`.
This PR changes the argument parser and the help text to do just that.
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change
Developer API keys don't have the privileges required to get information about their owners. To correct for this, remove user name reporting and use the API key `owner_id` directly.
Fixes: IOTAUTH-1686
### Description
`mbed dm` will now accept the Pelion Device Management API Key and
Host on the command line with the following switches:
* `-a`, `--api-key` accepts the API Key
* `-S` (note capitol), `--server-address` accepts the Host
This is consistant with manifest tool parameters
Resolves https://github.com/ARMmbed/mbed-cli/issues/745
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change
Add the target config option "boot-stack-size" which is passed to the
linker as the define "MBED_BOOT_STACK_SIZE" so the linker can
adjust the stack accordingly. On mbed 2 the boot stack becomes the
main stack after boot. On mbed 5 the boot stack becomes the
ISR stack after boot. Because of these different uses the stack size
for mbed 2 is set to 4K by default while on mbed 5 it is set to 1k.
Additionally, the NRF5X family requires a larger interrupt stack size
due to the softdevice so the size is increased to 2k on mbed 5 builds.
Quite a few of the scatter files are not (yet) aligned to 8-byte
boundaries and therefore the removal of legacy alignment feature
(which is under deprecation warning, but it actually not YET
deprecated) broke quite a few builds to this error:
Error: L6244E: Exec region RW_IRAM1 address (0x200001ac) not aligned on a 8 byte boundary.
We must bring this option now back to fix the builds.
This option to ld (--legacyalign) can only be removed once all of
the scatter files have been fixed.