Commit Graph

68 Commits (e3a34a57e1ae60a19699196291d4d1a656fdb156)

Author SHA1 Message Date
Martin Kojtal 5f7ecea00b
Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
Kevin Bracey 1f94428a56 Update HAL CRC API
* Change "is supported" check to be a macro, so it can be done at
  compile-time.
* Eliminate weird shift on 7-bit CRCs.
* Add support for 32-bit CRCs and reversals to TMPM3HQ.
2019-11-13 14:31:49 +02:00
Kevin Bracey fb6aa3ef4f Clean up ARM toolchain heap+stack setup in targets
ARM Compiler 6.13 testing revealed linker errors pointing out
conflicting use of `__user_setup_stackheap` and
`__user_initial_stackheap` in some targets. Remove the unwanted
`__user_initial_stackheap` from the targets - the setup is
centralised in the common platform code.

Looking into this, a number of other issues were highlighted

* Almost all targets had `__initial_sp` hardcoded in assembler,
  rather than getting it from the scatter file. This was behind
  issue #11313. Fix this generally.
* A few targets' `__initial_sp` values did not match the scatter
  file layout, in some cases meaning they were overlapping heap
  space. They now all use the area reserved in the scatter file.
  If any problems are seen, then there is an error in the
  scatter file.
* A number of targets were reserving unneeded space for heap and
  stack in their startup assembler, on top of the space reserved in
  the scatter file, so wasting a few K. A couple were using that
  space for the stack, rather than the space in the scatter file.

To clarify expected behaviour:

* Each scatter file contains empty regions `ARM_LIB_HEAP` and
  `ARM_LIB_STACK` to reserve space. `ARM_LIB_STACK` is sized
  by the macro `MBED_BOOT_STACK_SIZE`, which is set by the tools.
  `ARM_LIB_HEAP` is generally the space left over after static
  RAM and stack.
* The address of the end of `ARM_LIB_STACK` is written into the
  vector table and on reset the CPU sets MSP to that address.
* The common platform code in Mbed OS provides `__user_setup_stackheap`
  for the ARM library. The ARM library calls this during startup, and
  it calls `__mbed_user_setup_stackheap`.
* The default weak definition of `__mbed_user_setup_stackheap` does not
  modify SP, so we remain on the boot stack, and the heap is set to
  the region described by `ARM_LIB_HEAP`. If `ARM_LIB_HEAP` doesn't
  exist, then the heap is the space from the end of the used data in
  `RW_IRAM1` to the start of `ARM_LIB_STACK`.
* Targets can override `__mbed_user_setup_stackheap` if they want.
  Currently only Renesas (ARMv7-A class) devices do.
* If microlib is in use, then it doesn't call `__user_setup_stackheap`.
  Instead it just finds and uses `ARM_LIB_STACK` and `ARM_LIB_HEAP`
  itself.
2019-10-23 14:53:49 +03:00
Ganesh Ramachandran edf36fb2ae Added new features to TMPM46B 2019-08-16 10:43:52 +05:30
Martin Kojtal 97d50ed936
Merge pull request #10873 from ganesh-ramachandran/m3hq_newfeatures
Add new features to Toshiba's TMPM3HQ
2019-07-05 13:06:46 +01:00
Martin Kojtal e08b7137a6
Merge pull request #10874 from ganesh-ramachandran/m3h6_newfeatures
Add new features to Toshiba's TMPM3H6
2019-07-05 13:06:03 +01:00
Ganesh Ramachandran 61ad427a35 Changes for RTC peripheral status 2019-07-03 17:58:47 +05:30
Ganesh Ramachandran b4c0ce3a7e Changes for RTC peripheral status 2019-07-03 17:57:49 +05:30
Ganesh Ramachandran 3d48b7c1cc Changes for RTC peripheral status 2019-07-03 17:50:26 +05:30
Ganesh Ramachandran 6841f4a73a Added new features to TMPM3HQ 2019-07-03 17:18:10 +05:30
Ganesh Ramachandran bcaeddcb35 Removed dead code in TMPM4G9 - rtc_api.c 2019-07-03 17:10:30 +05:30
Ganesh Ramachandran 4bbc29f32c Added SPDX identifier 2019-07-03 17:10:29 +05:30
Ganesh Ramachandran 2384b69b16 Added new features to TMPM4G9 2019-07-03 17:10:29 +05:30
Ganesh Ramachandran 2fee8d7390 Added new features to TMPM3H6 2019-07-03 17:01:41 +05:30
Martin Kojtal ccb63d771e
Merge pull request #10857 from ARMmbed/feature-watchdog
Add Watchdog and ResetReason
2019-07-03 11:43:52 +01:00
Maciej Bocianski fcde82ba4f HAL I2C: adds missing DEVICE_I2C guards 2019-06-19 23:08:55 +02:00
Steve Cartmell ad295e64ba fix(hal-watchdog): Guard TMPM 'ResetReason' code behind feature flag 2019-05-24 12:23:43 +02:00
Ganesh Ramachandran a0c2b59475 Added reset_reason feature for TMPM3HQ 2019-05-24 12:23:39 +02:00
Ganesh Ramachandran 5fc77d3c4a Added reset_reason feature for TMPM3H6 & TMPM4G9 2019-05-24 12:23:33 +02:00
Ganesh Ramachandran f6fcabb9b8 Added reset_reason feature for TMPM066 & TMPM46B 2019-05-24 12:23:29 +02:00
Ganesh Ramachandran 0b84c30d7c Fixed support for DigitalOut(NC) instantiation 2019-04-04 15:16:29 +05:30
Ganesh Ramachandran c5ad72b781 Error check for reallocation memory fail 2019-03-12 15:04:57 +05:30
Deepika 72ae546228 TARGET_TOSHIBA :Setup heap limit and size 2019-02-19 15:49:49 -06:00
Russ Butler 8669417e7b Add HAL API for spi pinmap
Add the functions to get spi pinmaps to all targets.
2019-02-08 09:10:37 -06:00
Russ Butler 34c176654d Add HAL API for serial pinmap
Add the functions serial_tx_pinmap, serial_rx_pinmap, serial_cts_pinmap
and serial_rts_pinmap to all targets.
2019-02-08 09:10:28 -06:00
Russ Butler be492fe07a Add HAL API for pwmout pinmap
Add the function pwm_pinmap to all targets.
2019-02-08 09:10:19 -06:00
Russ Butler 22a89773fa Add HAL API for i2c pinmap
Add the functions i2c_master_sda_pinmap, i2c_master_scl_pinmap,
i2c_slave_sda_pinmap and i2c_slave_scl_pinmap to all targets.
2019-02-08 09:10:12 -06:00
Russ Butler 3bd3aca6db Add HAL API for analog out pinmap
Add the function analogout_pinmap to all targets.
2019-02-08 09:10:05 -06:00
Russ Butler 4818f88d73 Add HAL API for analog in pinmap
Add the function analogin_pinmap to all targets.
2019-02-08 09:09:51 -06:00
Ganesh Ramachandran a9a79dfecf Added MBED_APP_START to linker script 2019-02-06 17:38:19 +05:30
Przemyslaw Stekiel 9fe7e360b3 [TOSHIBA] Support boot stack size configuration option 2019-01-08 15:32:07 +01:00
Martin Kojtal 662b744c89
Merge pull request #8324 from ganesh-ramachandran/m3hq_new_target
Add Support for TOSHIBA TMPM3HQ
2018-11-09 09:45:52 +01:00
David Saada 542744d03c Support erase value in Flash HAL drivers, FlashIAP and block devices 2018-11-07 14:23:07 +02:00
Ganesh Ramachandran ac7bb55105 Updated license header 2018-11-05 19:54:17 +05:30
Ganesh Ramachandran 4cbdfb380f Added MBED_APP_START and SPI pin definitions 2018-11-05 19:54:17 +05:30
Ganesh Ramachandran 7d93fb4c15 Added Support for TOSHIBA TMPM3HQ 2018-11-05 19:54:16 +05:30
Cruz Monrreal af19a395e0
Merge pull request #7923 from ganesh-ramachandran/master
Add Support for Toshiba TMPM4G9
2018-10-16 12:52:19 -05:00
Ganesh Ramachandran 0231c80828 Implemented us_ticker free() & modified IAR stack 2018-10-15 10:20:22 +05:30
Ganesh Ramachandran 936ace08e2 Added Support for TOSHIBA TMPM4G9 2018-10-15 10:20:21 +05:30
Cruz Monrreal II ae1dd2ae4c Merge branch 'm46b_usticker-new_feature' of ssh://github.com/ganesh-ramachandran/mbed-os into ganesh-ramachandran-m46b_usticker-new_feature 2018-10-12 21:46:30 -05:00
Anna Bridge 24857d0f91
Merge pull request #5285 from c1728p9/minimum_requirements_test
Update devices to have minimum 2K RAM and heap, also added test
2018-10-12 11:04:57 +01:00
Deepika 8c17ff6168 Toshiba: Fix alignment of execute region to 8-byte boundary
--legacyalign, --no_legacyalign are deprecated from ARMC6 compiler, in order to
remove deprecated flags all linker files (GCC and IAR as well to have uniformity)
should strictly align to 8-byte boundary
2018-10-09 10:15:07 -05:00
Deepika f24ac501a8 Set main thread stack size as 3K for constrained targets 2018-10-08 13:27:35 -05:00
Cruz Monrreal 9472814583
Merge pull request #8325 from ganesh-ramachandran/m3h6_pinmap_usticker-free
Fix for pinmap & usticker free() in TMPM3H6
2018-10-08 10:25:07 -05:00
Cruz Monrreal 8aa65faf6a
Merge pull request #8239 from ganesh-ramachandran/m46b_pwmout_serial-fuart
Fix for pwmout & serial fuart in TMPM46B
2018-10-08 10:16:07 -05:00
Deepika f549f14a0a Set ISR stack and heap sizes for low end devices
Set the ISR stack to be 1KB. https://github.com/ARMmbed/mbed-os/pull/7238
Set the heap size to 3KB(2KB + overhead + spare) so that atleast 2KB free ram is
available for testing.
With dynamic heap size, explicit size is not required. IAR 7.8 supports
static heap, hence the change is needed in IAR linker files.
2018-10-05 12:09:46 -05:00
Ganesh Ramachandran 7dba836719 Fix for pinmap & usticker free() to TMPM3H6
Implemented usticker free()
Fix pinmap data overwriting to same port pins
2018-10-04 16:44:55 +05:30
Ganesh Ramachandran 9215b9d264 Fixed pwmout & serial fuart
pwmout:
Used SystemCoreClock

Serial fuart:
SERIAL_5 & SERIAL_3 have same CTS pin (PA7), only function register is different (4 & 2).
pinmap_peripheral() will always return first match from the map.
Hence changed as, if SERIAL_5 is used, then pinmap_peripheral() should return SERIAL_5 (function register 2 to be set).
2018-09-25 13:29:12 +05:30
Ganesh Ramachandran 9474603791 Added usticker feature 2018-09-25 12:51:08 +05:30
Ganesh Ramachandran cd618e640b Implemented us_ticker free() 2018-09-19 10:41:07 +05:30