In case of a non-overwriting change to an exported config file
the previous logic appended a new block of text to the previous file
every time the to-be-written block of text was not exactly matched.
This parses the old config file and the to-be-written changes into
sets, which can then be compared. If all of the incoming lines are
found in the old config file set, no changes are made. If some
incoming lines are not found in the old config file, only these are
appended.
mbed_config.h is a file that is placed in your project root when you
export. This allows the configuration to be used by your IDE. When this
file already exists (due to a previous export), it changed the compiler
include option on Windows from "-include mbed_config.h" to "-include
.\mbed_config.h". The "\" character was interpreted as an escape
character "\m" and broke the build. This converts all resource paths to
use the Posix path separator "/" before writing project files to avoid
this issue.
The call to encode() was causing the include paths to be placed in the
uvision product file with the prefix "b'" and the postfix "'". This
broke the parsing of this file and broke the build.
Fixes#9974
The error was that the Asymmetric CPUs were assumed to have the same
structure as the Symmetric CPUs. This is clearly false.
This PR changes the FPU detection of Asymmetric CPUs to find the correct
core and use it's cpu settings.
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
Added WiFi_Bt CM4 PSA target in mbedos json
Added SPE-NSPE mailbox initialization for CM4 SystemInit
Made similar to FUTURE_SEQUANA configurations
Copied FUTURE_SEQUANA CM0 SPM part for WiFi_Bt smoke test
Added CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets
Sorted files for new CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets
Copied files for CY8CKIT_062_WIFI_BT_M0_PSA from FUTURE_SEQUANA
Copied and updated cm0p start files
Corrected according to FUTURE_SEQUANA
Changes to M0 startup files to have SPM started
Fixed implicit declaration warning
Commented interrupts enabling according to FUTURE_SEQUANA flow
Updated prebuild spm_smore CM0 hex for CM4 target
Turned on greentea environment
Used special memory region for common CM0/CM4 data
Updated prebuild CM0 SPM hex
Placed shared memory region for flash operations into SPM shared memory region
Updated cyprotection code and configuration
Start address of protected regions is set by a defined number from target.json
Added masters pcMask configuration
Added support for PSA target to WIFI_BT board
Enabled resources protection for SPM
Aligned RAM usage according to Cypress FlashBoot and CyBootloader
alligned protection config
Added CYW943012P6EVB_01_M0 target
Enlarged heap size, remobed nv_seed
Added heap reservation in linker script from mbed-os
Removed heap size definition
turned on nv_seed config
Removed nv_seed macros
Enabled protection for PSoC6 CM0
Added PSoC6 CM0 PSA readme
Enabled mbed_hal-spm test
Enabled nv_seed and removed unneeded ipc config define
Added SPDX string to feature_ble cypress target files
Removed unneeded supported_toolchains lines for Cypress targets
Disabled protection settings
Corrected flash initialization for PSoC6 CM0 PSA
Changed PSoC6 IPC6 protection for flash
Enabled special flash initialization and enabled protection settings
Updated and added new prebuild PSoC6 CM0 PSA hex files
Disabled HW TRNG and CRC for PSoC6 CM4 PSA target
Added missing const to allow types to match
Updated PSoC6 WIFI_BT_PSA prebuilt directory
Moved PSoC6 shared section usage area definition to begin of ld
Added initial ARM_STD linker and startup files for PSoC6 CM0
Added initial IAR linker and startup files for PSoC6 CM0
Added defines to disable some SPM protection settings for PSoC64
Moved Flash function variables into separate memory region
Added defines for new Public area definition
Updated PSoC6 CM0_PSA hex-files
The Makefile is run from the build directory. The source files were
properly prefixed with "../", however the paths provided to the
assmebler were not. This ensures the assembler include paths are
prefixed properly.
Reference template file is used from IAR8.32 installation available at path
"Embedded Workbench 8.2\arm\config\template\ConvertToIAR\template_project.ewp"
Also added trustzone configs in iar_definitions.json
The approach for the hex_files subset selection is identical
to makefile exporter: https://github.com/ARMmbed/mbed-os/pull/9466
Single hex file should be passed to srec_cat when hex_filename
is set in targets.json or mbed_app.json.
The templ file names are both all upper case and lower case letters.
The Target Names map is usually all upper case. The match could fail
if the templ file, as we have case-sensitive comparison. Handle such
cases by perorming a case-insensitve check.
mbed export of a project to MCUXpresso could potentially always fail
irrespective of what is passed in -m option since the target names
map entry and the filename may not match. This commit fixes this issue.
Example of the issue that this commit fixes:
$ mbed export -i mcuxpresso -m lpc11u68 -v
<snip>
project.py: error: LPC11U68 not supported by mcuxpresso
<snip>
Allow to use default intelliSenseEngine in visual studio code.
Add of compilerPath and forcedInclude of mbed_config header in the
created c_cpp_properties.json file.
$(file > $@.in, $(filter %.o, $^)) is not supported in GNU Make 3.81.
Create the linker response file with pipe redirect from echo command.
This is tested with Cygwin make and make 3.8.1 shipped with macOS.
Also, change the linker responce file name to .link_options.txt.
This is an internal file, not a build artifact.
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"
}
}
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.
### 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
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.
### 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
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
1. Add the IVT header to the binary as this is required for boot up
This was earlier added by the DAPLink firmware. As it is no longer
handled in DAPLink, the header needs to be added inside mbed.
2. Update drivers
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>