Commit Graph

108 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
Martin Kojtal df2cfae85b
Maxim: fix serial free
There is no Shutdown function for this target
2019-10-29 13:33:12 +00:00
Sebastian Stockhammer 2e81dad1f3 Fix build 2019-10-24 14:02:12 +02:00
Sebastian Stockhammer a77a49d6d2 Add serial_free definition 2019-10-24 13:07:37 +02: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
ale87jan 2d492e1166
Update MAX3263x.sct 2019-05-28 12:02:51 +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
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
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
Alastair D'Silva aa80b7c70a Don't use define checks on DEVICE_FOO macros (partner code)
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>
2018-12-20 20:02:29 +11: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
Cruz Monrreal 8e25d2d905
Merge pull request #7669 from SigmaDeltaTechnologiesInc/master
SDT64, 8195, 32620, 32625, 51822, 52832B added to targets
2018-08-17 11:10:12 -05:00
Cruz Monrreal 54f40a0f4f
Merge pull request #7523 from maximmbed/max32625pico-bl-updates
Add bootloader configuration parameters for MAX32625PICO
2018-08-09 19:06:30 -05:00
Jiwon Yune 04fc7aa36f Generic pin names added 2018-08-06 14:50:19 +01:00
Jiwon Yune 0634be8b5f SDT32625B added 2018-08-01 18:18:31 +09:00
Jiwon Yune df3afa7b57 SDT32620B added 2018-08-01 18:17:16 +09:00
Przemyslaw Stekiel c0ee843d63 Add lp/us ticker_free() functions stub.
This patch adds only empty stubs of `us_ticker_free()` and `lp_ticker_free()` for all boards where these functions are not implemented.
2018-07-25 08:58:38 +02:00
Keyur Hariya ed94e6aa35 Add bootloader configuration parameters for MAX32625PICO and rework targets.json 2018-07-16 18:26:51 -05: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
Martin Kojtal e1fc81dc41 max32600: fix lp ticker functions - do not inline
Wrong linkage specified, causing build to fail.
2018-05-25 13:04:23 -05:00
Martin Kojtal 6781ee88cd maxim: fix rtc if lp ticker not defined
lp ticker handler defined only if lp ticker is defined. In case not,
use only overflow, rtc0 not used.
2018-05-25 13:04:23 -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 fcd1bc9e37 Add default defines for MAX32625PICO 2018-05-07 16:30:57 -05:00
Keyur Hariya 04ae15a154 Declare and call low_level_init funtion 2018-05-03 10:57:38 -05:00
Keyur Hariya 3969d85feb [MAX32625PICO] Add new platform
This platform is available with or without Bootloader.
2018-05-03 10:57:38 -05:00
Keyur Hariya ca4937d40d Add support for open drain leds 2018-04-30 15:27:07 -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
Cruz Monrreal df5119677a
Merge pull request #6607 from maximmbed/max32630-fix-spi
Improve SPI block write
2018-04-17 10:55:00 -05:00
Cruz Monrreal 63412bbe1d
Merge pull request #6605 from maximmbed/max32625-rework-ticker
Rework us_ticker and rtc_api/lp_ticker | Fix compiler warning for spi_api
2018-04-16 10:39:11 -05:00
Cruz Monrreal b630691fdf
Merge pull request #6606 from maximmbed/max32630-fix-i2c
Fix I2C master
2018-04-16 10:38:10 -05:00
Keyur Hariya b08c752fcd Fix indentation 2018-04-13 15:20:00 -05:00
Keyur Hariya 16d38895d3 Improve SPI block write
Replace looping construct with actual block writes.
Transaction in spi_master_block_write funtion is protected by critical
section to ensure it is completed without interruption. A hardware
limitation may cause data corruption if the TX fifo is allowed to run
empty.
2018-04-13 15:14:10 -05:00
Keyur Hariya b594ec20b8 Fix compiler warning for spi_api
Add mbed_critical include file to disable compiler warning messages.
2018-04-12 12:52:55 -05:00
Keyur Hariya 098c2cf756 Rework us_ticker and rtc_api/lp_ticker
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
2018-04-12 12:52:05 -05:00
Keyur Hariya 278707518c Revert "Rework us_ticker and rtc_api/lp_ticker | Fix compiler warnings for spi_api"
This reverts commit 840246a4d5.
2018-04-12 12:51:05 -05:00