Commit Graph

27 Commits (240758db42aaa42b2abd50daea5033c3cc7e80dc)

Author SHA1 Message Date
Martin Kojtal 2203549b37
Merge pull request #10924 from ghseb/free-serial-resources-2
Free serial resources if not needed anymore
2019-10-30 09:45:22 +01:00
Sebastian Stockhammer 37b54ca44b Add serial_free stub 2019-10-24 10:24:35 +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
Maciej Bocianski fcde82ba4f HAL I2C: adds missing DEVICE_I2C guards 2019-06-19 23:08:55 +02:00
Deepika 8c63dbeb31 Target_Maxim: 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
Ben Cooke 95a050bb6e Add FLASH support to TARGET_MAX32620C MCU and derivative platform targets 2019-01-15 10:59:56 -06:00
Przemyslaw Stekiel 6d1d08b660 [Maxim] Support boot stack size configuration option 2019-01-08 15:32:03 +01:00
Deepika a6997ab970 Maxim: 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
Jiwon Yune 04fc7aa36f Generic pin names added 2018-08-06 14:50:19 +01:00
Jiwon Yune df3afa7b57 SDT32620B added 2018-08-01 18:17:16 +09:00
Keyur Hariya 762cafc2e1 Rename files to fix warning
"aes.c" file name conflict in Maxim platform and mbedtls.
2018-06-18 16:46:18 -05:00
Jesse Marroquin 11d418b749 mbed-os v5.9 RTC implementation 2018-05-25 13:06:56 -05:00
Jesse Marroquin 0ddec48efc mbed-os v5.9 LPTICKER implementation 2018-05-25 12:33:42 -05:00
Jesse Marroquin b88329acb8 mbed-os v5.9 USTICKER implementation 2018-05-25 12:33:42 -05:00
Keyur Hariya fc7c70dbc6 Fix the initialization of a structure 2018-04-24 11:13:19 -05:00
Keyur Hariya 0ca1a61ba0 Remove the redundant input parameter 2018-04-23 16:37:55 -05:00
Keyur Hariya 1f0809a56b Add the missing input parameter 2018-04-23 16:37:55 -05:00
Keyur Hariya 85bc74cc1d Fix the return type to allow returning error 2018-04-23 16:37:55 -05:00
Keyur Hariya 11cf79ecb0 Add type cast 2018-04-23 16:37:55 -05:00
Keyur Hariya 3e7a909265 Remove automatic I2C stop after each read
Automatic stop prevents sending repeated start.
2018-04-19 13:20:14 -05:00
Keyur Hariya 2bb78d433f Fix assembly file extension 2018-04-04 10:32:46 -05:00
Keyur Hariya da96c56d90 [MAX32620C] Add new target 2018-03-28 16:39:09 -05:00