Below are the options read from the toolchains/arm
armclang --target=arm-arm-none-eabi -mcpu=list
The following arguments to option 'mcpu' can be selected:
-mcpu=cortex-m0
-mcpu=cortex-m0plus
-mcpu=cortex-m1
-mcpu=cortex-m3
-mcpu=cortex-m4
-mcpu=cortex-m7
-mcpu=cortex-m23
-mcpu=cortex-m33
...
armlink --cpu=list
The following arguments to option 'cpu' can be selected:
--cpu=Cortex-M0
--cpu=Cortex-M0plus
--cpu=Cortex-M1
--cpu=Cortex-M1.os_extension
--cpu=Cortex-M1.no_os_extension
--cpu=Cortex-M4
--cpu=Cortex-M4.no_fp
--cpu=Cortex-M7
--cpu=Cortex-M7.fp.sp
--cpu=Cortex-M7.no_fp
--cpu=Cortex-M23
--cpu=Cortex-M33
--cpu=Cortex-M33.no_fp
--cpu=Cortex-M33.no_dsp
--cpu=Cortex-M33.no_dsp.no_fp
...
armclang --target=arm-arm-none-eabi -mfpu=list
The following arguments to option 'mfpu' can be selected:
-mfpu=fpv4-sp-d16
-mfpu=fpv5-sp-d16
-mfpu=fpv5-d16
...
Rename the existing PSoC-specific m0_core_img key in targets.json
as a more generic hex_filename key. Update makefile exporter to select
the subset of resources.hex_files matching the hex_filename value.
Without this fix, multiple prebuilt CM0+ hex files are found in the
target resources and erroneously passed to the srec_cat tool.
The fix is generic so other targets that need post-build hex merging
can use this key to pass the correct image to srecord tool.
The fix also removes sub_target key: instead, rely hex_filename json
key to detect if the hex image merging needs to be done.
The sub_target is not used in mbed-os codebase for anything else.
It is possible to override the hex file name in mbed_app.json:
{
"target_overrides": {
"*": {
"target.hex_filename": "my_custom_m0_image.hex"
}
}
Replace hard-coded numeric offsets of PSoC 6 hex file sections
with sensible constants.
Do not attempt to update the checksum and metadata contents
if the sections are not found in the original HEX file.
PSoC 6 hex files contain 4-byte chip ID at virtual offset 0x90500002
added by PSoC Creator or cymcuelftool from .cymeta ELF section.
merge_images compares chip ID in CM0+ and CM4 hex files and raises
an exception in case of mismatch. Chip ID is different for each MPN
(for example, 0xE2072100 for CY8C6347BZI-BLD53 and 0xE2062100 for
CY8C6247BZI-D54). CM0+ prebuilt images target CY8C6347BZI-BLD53
but should be compatible with other PSoC6 MPNs.
Remove the check to enable merging CM0+ images with CM4 applications
built for different MPNs, with empty or absent cymetadata.
printf was called from ISR when sleep tracing was enabled. Issue was
captured only in debug profile.
Printf is not allowed from ISR context and issues like this should be
trapped in case of debug profiles as well.
Main thread in Mbed OS is statically allocated and was not available in call
stack of Keil MDK. The RTX5 kernel requires statically allocated thread
information objects that are placed into a specific section to enable RTOS
thread awareness in Keil MDK. This fix is to keep main thread in specific
section of memory.
This is for OS2 testing. Previously, targets that were configured with
the option "default_toolchain": "uARM" would still build to a
TOOLCHAIN_ARM_STD directory. This fixes these targets to build into
TOOLCHAIN_ARM_MICRO.
The DEVICE_FOO macros are always defined (either 0 or 1).
This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
For binary compatibility with ARMC5, use the hard ABI variant whenever
we have FP hardware - this is ARMC5's default behaviour, which we do not
override.
Cortex-M4F was already using hard; this brings M7F and M33F into line.
### Description
PR #8607 will cause problems for the NRF52832 and the NRF52840
in the online compiler starting with 5.10.2. This PR prevents this problem
by using a toggle in `targets.json` to enable these new defines for every
target except for the NRF52832 and NRF52840.
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
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.
Reference the correct commits to pull in and remove commits related to
uVisor since these are no longer needed. Also add the missing file
cmsis_os1.c to cmsis_importer.json.
Below is detailed information on each commit added to cmsis_importer.json
CMSIS/RTX: Patch RTX4 to preserve osThreadDef compatibility
4360b7bbf8
CMSIS/RTX: Patch RTX so irq_cm4f.s files work with no FPU targets
cc2e0517e1
CMSIS/RTX: Allow overwriting mutex ops for ARMC
b88254809e
CMSIS/RTX: Pre-processor defines used for assembly
287121ffdc
CMSIS/RTX: Fix using FALSE/TRUE with preprocesor
1752803626
CMSIS/RTX: Reintroduce arm_math.h
6a6e3ac0eb
fixup
Created one configuration .json file for boards with internal
wifi (HeapBlockDeviceAndWifiInterface.json). Removed dedicated
Odin, Wiced and Realtek wifi configuration files. Removed Odin
ethernet configuration file and replaced that with general
ethernet configuration.
-mcpu option if set for v8M CPU;s it will add DSP feature as default
which is optional. Hence setting just the architecture for Cortex-M23
and Cortex-M33
### Description
This is to fix linker not finding symbols declared in object files inside static library files.
For this case throwing:-
> rm-none-eabi-g++: error: unrecognized command line option '--wrap=main'; did you mean '--warn-main'?
For this case to include libmbed.a which contains
mbed_alloc_wrappers.o:
U __real__calloc_r
U __real__free_r
U __real__malloc_r
U __real__memalign_r
U __real__realloc_r
00000000 T __wrap__calloc_r
00000000 T __wrap__free_r
00000000 T __wrap__malloc_r
00000000 T __wrap__memalign_r
00000000 T __wrap__realloc_r
00000000 T free_wrapper
00000000 T malloc_wrapper
00000000 T mbed_stats_heap_get
U memset
This patch also changed the library order to system and then user.
-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -lmbed
Resolves: #7155
### Pull request type
[ x ] Fix
[ ] Refactor
[ ] Target update
[ ] Feature
[ ] Breaking change