Commit Graph

12 Commits (1c32e3ca5a63a626e4425691dd51b33605eda56a)

Author SHA1 Message Date
Yossi Levy dd27a3400b mbed-os to support bootlader for Cypress CY8CKIT_062_WIFI_BT_PSA and CY8CKIT_062_BLE 2019-03-14 14:26:23 +02:00
Oren Cohen f7b6af0c1d Update PSOC6 postbuild prints 2019-02-28 18:23:03 +02:00
Volodymyr Medvid 534becb175 PSOC6: correctly align hex files with split text sections
When the original PSOC6 CM4 hex file contains unalinged text sections
that span through multiple intelhex segments, aligned segments (filled
with zeroes) overlap with the original data segments, resulting in
error thrown by ihex.merge(alignments, overlap='error').
Such hex file can be produced when the ELF is built with ARM MDK Compiler
with --split_sections option:
http://www.keil.com/support/man/docs/armcc/armcc_chr1359124944914.htm

Change the merge strategy to overlap='ignore', so that the overlapping
zero-filled segments are skipped.
2019-02-20 22:34:10 +02:00
Cruz Monrreal e965aa6640
Merge pull request #9509 from vmedcy/psoc6-daplink-hex
PSOC6.py: generate hex files with 16 bytes per row
2019-01-28 10:38:15 -06:00
Volodymyr Medvid 5c384f10e7 PSOC6.py: generate hex files with 16 bytes per row
DAPLink implementation on Cypress kits cannot handle hex files
with 64 bytes per row: refer to https://github.com/ARMmbed/DAPLink,
source/daplink/drag-n-drop/intelhex.c, hex_line_t struct, data field.
2019-01-25 10:07:00 -08:00
Volodymyr Medvid a48ee113ea PSOC6: refactor M0 image merging, enable export to makefile
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"
    }
}
2019-01-22 15:40:22 -08:00
Volodymyr Medvid 5b0daadd18 PSOC6.py: do not require metadata during HEX merging
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.
2019-01-22 15:40:22 -08:00
Volodymyr Medvid 226edc1abd PSOC6.py: remove silicon ID check
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.
2019-01-22 15:40:22 -08:00
Oren Cohen 2e19868ff9 Prepare postbuild for prebuilt images 2018-12-06 09:35:50 +02:00
Oren Cohen f1d3eb9340 Add FUTURE_SEQUANA_PSA target
* 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
2018-12-04 18:38:50 +02:00
Leszek Rusinowicz 7d322dcd41 Simplified M0/M4 binary merging functionality. Now, M0 binary image to be used has to be explicitely named in a json file (can be ovverriden in mbed_app.json).
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.
2018-11-01 22:14:06 +01:00
Leszek Rusinowicz 9b1db83eaa Added required changes outside of TARGET_Cypress tree:
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.
2018-11-01 20:19:21 +01:00