Simon D Hughes
aefb03ccd6
ARMCC temporary fixes for undefined errno symbols.
2017-02-23 16:36:16 +00:00
Simon Hughes
0c87537f10
Added errno codes to retarget, mkdir() and ftell() tests.
2017-02-23 16:36:03 +00:00
Simon Hughes
c8fecb6c88
STORAGE: tests added for errno, ferror() and clearerr().
2017-02-23 16:30:55 +00:00
Christopher Haster
b1a685125b
Filesystem: Removed dependency on unistd.h
...
Previously used to determine stdin/stdout/stderr filenos, however
these are set by us
2017-02-23 16:30:47 +00:00
Christopher Haster
9299a88e8f
Filesystem: Add support for stat
...
Provided through FileSystemLike::stat
2017-02-23 16:30:42 +00:00
Christopher Haster
aff49d8d1e
Renamed files in platform to match source names
...
critical.h -> mbed_critical.h
sleep.h -> mbed_sleep.h
toolchain.h -> mbed_toolchain.h
rtc_time.h -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00
Martin Kojtal
4470d048a6
Merge pull request #3748 from c1728p9/application_transfer_support
...
Add a function to transfer control to another app
2017-02-21 17:11:42 +00:00
Sam Grove
cfd517a3a0
Merge pull request #3783 from geky/cb-deprecate-attach
...
Callback: Deprecate attach member function in favor of simple assignment
2017-02-21 10:55:44 -06:00
Russ Butler
36cbae6420
Add a function to transfer control to another app
...
Add the function mbed_start_application() which allows a bootloader to
transfer control to an application.
2017-02-18 19:48:14 -06:00
Christopher Haster
ed6fec2811
Callback: Deprecated attach member function in favor of simple assignment
...
The attach function is used several other places to indicate
registration for interrupts. This differs significantly to its use in
the Callback class. Additionally, the attach function is unnecessary
given that simple assignment works just as well.
2017-02-15 15:07:58 -06:00
YarivCol
2c6eba35c2
fix in mbed_error_vfprintf
...
MBED_CONF_PLATFORM_STDIO_CONVERT_NEWLINES was not used in mbed_error_vfprintf causing wrong behavior when the option was selected (no new line is some terminals like putty).
2017-02-13 00:54:51 +02:00
Russ Butler
605614a600
Add MBED_SECTION attribute
...
Allow the section that code is placed in to be explicitly specified
with the attribute MBED_SECTION.
2017-02-01 09:20:29 -06:00
Bartek Szatkowski
8a4a3caf65
sleep: make sleep/deepsleep static
2017-01-19 11:53:53 +00:00
Bartek Szatkowski
1e73a66c33
sleep: remove warnings for default build
2017-01-19 11:53:24 +00:00
Bartek Szatkowski
6a045a49a9
Platform: Add sleep/deepsleep user facing functions
...
Add sleep/deepsleep functions to platform layer which are replacing HAL
functions with the same name, rename existing symbols in HAL layer
to hal_sleep/hal_deepsleep. This way sleep functions
are always available, even if target doesn't implement them, which makes
the code using sleep clearer. It also enables us to make decision on in
which builds (debug/release) the sleep will be enabled.
2017-01-19 09:39:29 +00:00
Martin Kojtal
ab2e869a24
Merge pull request #3157 from SiliconLabs/SiliconLabs-EFR32
...
[Silicon Labs] Adding support for EFR32MG1 wireless SoC
2016-12-02 15:46:35 +01:00
micromint
22c0e3560b
Support building mbed_critical.c with C++ compiler
2016-11-21 12:59:45 -04:00
Martin Kojtal
8eaeb86780
Merge pull request #3244 from geky/callback-type-relaxation
...
callback - Relax type-deduction in callback class
2016-11-16 17:42:58 +00:00
Martin Kojtal
b36944fafc
Merge pull request #3141 from geky/stats-stack
...
stats - Add cleaner stats API for stack usage
2016-11-16 17:41:37 +00:00
micromint
809b20738e
Change MBED_DEPRECATED def order to support Keil 4
2016-11-10 09:59:28 -06:00
Christopher Haster
3544228b47
callback - Adopted relaxed type-deduction for bound functions
...
Adopting relaxed type-deduction in bound functions better aligns with
the same overloads for member functions, and provides an alternative
solution for the void pointer cast issue, which removes a large amount
of cruft.
2016-11-09 13:45:25 -06:00
Christopher Haster
3ba3bb50f9
callback - Fixed type-deduction when inheritance is involved
...
The type deduction for the callback constructors was to strict and
prevented implicit casts for the context pointer stored internally.
As noted by @pan-, relaxing the contraints on the templated
parameters allows C++ to correctly infer implicit casts such as
conversions between child and parent classes when inheritance is
involved.
As an additional benefit, this may help the user experience by
defering invalid type errors to when the types are expanded,
limiting the number of error messages presented to users.
2016-11-09 12:42:42 -06:00
Christopher Haster
e90fff3a60
stats - Added doxygen documentation to stats functions
2016-11-07 19:15:44 -06:00
Christopher Haster
9b630b3e0d
stats - Added stack stats api for individual threads
...
Added the following
- size_t mbed_stats_stack_get_each(mbed_stats_stack_t *, size_t)
2016-11-07 19:15:44 -06:00
Christopher Haster
14aa57f81c
stats - Added stats for reserved heap space for consistency
2016-11-07 19:15:44 -06:00
Christopher Haster
b6e8f44c0d
stats - Added stack stats api
...
Matched heap stats api
- void mbed_stats_heap_get(mbed_stats_heap_t *)
- void mbed_stats_stack_get(mbed_stats_stack_t *)
2016-11-07 19:15:38 -06:00
Sam Grove
30e63a27b7
Merge pull request #3202 from geky/fix-rtos-wait-math
...
Fix arithmetic error in rtos-based wait
2016-11-07 10:30:33 -06:00
Steven Cooreman
f344c0d204
[EFR32] Set default USB serial baudrate
...
Silicon Labs targets use a default, unchangeable baud rate of 115200 on the stdio serial-USB bridge.
2016-11-07 11:54:45 +01:00
Christopher Haster
4d6afcddfa
Fixed arithmetic error in rtos-based wait
...
The value of `start` is taken from before that wait call, so the value
of `us` shouldn't be changed
2016-11-04 11:42:53 -05:00
Christopher Haster
c11ce2153a
Added mbed_preprocessor.h to collect common cpp definitions
2016-11-03 10:26:31 -05:00
Christopher Haster
98db3ab1cb
Adopted MBED_STATIC_ASSERT where possible
2016-11-01 21:39:48 -05:00
Christopher Haster
182c6a29f2
Added static assert macro
...
Added MBED_STATIC_ASSERT for compile-time assertions, results in
compile-time error if condition is false
The assertion acts as a declaration that can be placed at file scope, in
a code block (except after a label), or as a member of
a C++ class/struct/union.
Unfortunately, there does not exist a backup construct for use in
C class/struct/union contexts. An alternative macro,
MBED_STRUCT_STATIC_ASSERT provides this ability to avoid disabling
static assertions for the majority of mbed-supported C compilers.
2016-11-01 21:39:41 -05:00
ccli8
dfc32409a9
[NUC472/M453] Refine comment for two-region model
2016-10-11 10:55:08 +08:00
ccli8
b95478015b
Support NUMAKER_PFM_M453
2016-10-11 10:55:08 +08:00
Sam Grove
3a16ca9855
Merge pull request #2911 from theotherjimmy/docs-generation
...
[Tools] Add documentation generation script
2016-10-06 15:57:08 -05:00
Sam Grove
670b0984eb
Merge pull request #2917 from c1728p9/fix_InitTCs
...
Initialization steps in toolchains
2016-10-05 00:54:45 -05:00
Sam Grove
970c6551a1
Merge pull request #2873 from tung7970/fix-mbedos
...
callchain - fix add_front assignment
2016-10-04 22:45:30 -05:00
Jimmy Brisson
f1a78027d3
Add tags to our code
2016-10-04 15:02:44 -05:00
Laurent MEUNIER
bcbe0b17de
INIT:GCC with rtos: Align pre-main initialization steps between TCs
...
In this commit we're moving the mbed_sdk_init call before the RTOS
initialisation so that the sequence is similar to other toolchains.
2016-10-04 14:55:31 -05:00
Laurent MEUNIER
e8d67ac530
INIT: uARM no rtos: Align pre-main initialization steps between TCs
...
In uARM, the library's hook _platform_post_stackheap_init does not seem to
exist and I couldnot find a documentation describing the initialisation
flow. All we know is that _open is called after RAM init and before the
C++ init, so this is a working placeholder.
This is maybe not acceptable so a uARM lib expert may propose a better
hook to fullfil the requirement.
At least this is a workign setup.
This series should solve issue reported here:
STM32 (At least F401) breaks if Tickers are activated in a global object #2115
2016-10-04 14:55:27 -05:00
Laurent MEUNIER
f50e23aea6
INIT:ARM no rtos: Align pre-main initialization steps between TCs
...
Various toolchains supported in MBED don't followthe same initialization
steps. This can have impacts on platform behavior.
For STM32, it is needed to call the HAL_Init() _after_ the RAM has been
initialized (sdata from flash / zero initialized data) and _before_ the C++
objects are being created, especially if those objects require support
of tickers for instance.
In GCC and IAR, this was done in previous commit to avoid HAL_Init()
to be called twice.
In ARM this there is no hook defined in MBED yet to place the call.
The proposal is to take benefit of the library's
_platform_post_stackheap_init function that is going to be called before
__rt_lib_init where the C++ object init is done (__cpp_initialize__aeabi_)
This series should solve issue reported here:
STM32 (At least F401) breaks if Tickers are activated in a global object #2115
2016-10-04 14:55:23 -05:00
Sam Grove
15f21b0587
Merge pull request #2898 from geky/callback-fix-iar-typeinfo
...
callback - Add workaround for IAR issue with type information
2016-10-04 14:06:45 -05:00
Christopher Haster
abba0c2173
callback - Added workaround for IAR issue with type information
...
In the IAR ide, implicitly generated structures based on function
templates end up with missing type information. This has no effect
on using the IAR compiler standalone, but when used through the ide
the missing type information causes the ide to error.
As a workaround, moved the function attributes generated for the
Callback and Event classes into the class scope. This avoids the
syntax that confuses IAR.
2016-10-03 18:33:25 -05:00
Bogdan Marinescu
8eb36e1164
Added a baud argument for (Raw)Serial objects
...
This commit adds a `baud` argument for Serial and RawSerial objects:
- there is a new `Serial` constructor with a mandatory baud rate
argument. The old constructor also got a `baud` argument with a
default value (to keep backward compatibility).
- the `RawSerial` constructor also got a `baud` argument with a default
value.
There's also a new configuration parameter (`default-serial-baud-rate`)
that can be used to specify the default value of the above `baud`
arguments.
2016-10-03 20:12:24 +03:00
Tony Wu
761d03f069
callchain - fix add_front assignment
...
_chain should point to the new element.
Signed-off-by: Tony Wu <tung7970@gmail.com>
2016-10-03 19:23:04 +08:00
Sam Grove
301b77c4b2
For drivers, events, hal, platform, rtos and mbed.h add one level of path to make sure specific and unique includes files are found.
2016-10-01 02:11:36 -05:00
Sam Grove
3a714c117e
Move Transaction.h into platform/ given there is no hardware required.
2016-10-01 01:33:10 -05:00
Sam Grove
7a44db8376
Move CircularBuffer.h into platform/ given there is no hardware required.
2016-10-01 01:31:22 -05:00
Christopher Haster
c2d9fc29ff
restructure - Fixed include paths damaged by the restructure
2016-09-30 19:18:09 -05:00
Christopher Haster
8ad83273db
restructure - Moved stdio-config into platform
2016-09-30 19:18:09 -05:00
Christopher Haster
15904b7544
restructure - Split hal into drivers+platform+hal
...
hal/common/AnalogIn.cpp -> drivers/AnalogIn.cpp
hal/api/AnalogIn.h -> drivers/AnalogIn.h
hal/api/AnalogOut.h -> drivers/AnalogOut.h
hal/common/BusIn.cpp -> drivers/BusIn.cpp
hal/api/BusIn.h -> drivers/BusIn.h
hal/common/BusInOut.cpp -> drivers/BusInOut.cpp
hal/api/BusInOut.h -> drivers/BusInOut.h
hal/common/BusOut.cpp -> drivers/BusOut.cpp
hal/api/BusOut.h -> drivers/BusOut.h
hal/common/CAN.cpp -> drivers/CAN.cpp
hal/api/CAN.h -> drivers/CAN.h
hal/api/CircularBuffer.h -> drivers/CircularBuffer.h
hal/api/DigitalIn.h -> drivers/DigitalIn.h
hal/api/DigitalInOut.h -> drivers/DigitalInOut.h
hal/api/DigitalOut.h -> drivers/DigitalOut.h
hal/api/DirHandle.h -> drivers/DirHandle.h
hal/common/Ethernet.cpp -> drivers/Ethernet.cpp
hal/api/Ethernet.h -> drivers/Ethernet.h
hal/common/FileBase.cpp -> drivers/FileBase.cpp
hal/api/FileBase.h -> drivers/FileBase.h
hal/api/FileHandle.h -> drivers/FileHandle.h
hal/common/FileLike.cpp -> drivers/FileLike.cpp
hal/api/FileLike.h -> drivers/FileLike.h
hal/common/FilePath.cpp -> drivers/FilePath.cpp
hal/api/FilePath.h -> drivers/FilePath.h
hal/common/FileSystemLike.cpp -> drivers/FileSystemLike.cpp
hal/api/FileSystemLike.h -> drivers/FileSystemLike.h
hal/common/I2C.cpp -> drivers/I2C.cpp
hal/api/I2C.h -> drivers/I2C.h
hal/common/I2CSlave.cpp -> drivers/I2CSlave.cpp
hal/api/I2CSlave.h -> drivers/I2CSlave.h
hal/common/InterruptIn.cpp -> drivers/InterruptIn.cpp
hal/api/InterruptIn.h -> drivers/InterruptIn.h
hal/common/InterruptManager.cpp -> drivers/InterruptManager.cpp
hal/api/InterruptManager.h -> drivers/InterruptManager.h
hal/common/LocalFileSystem.cpp -> drivers/LocalFileSystem.cpp
hal/api/LocalFileSystem.h -> drivers/LocalFileSystem.h
hal/api/LowPowerTicker.h -> drivers/LowPowerTicker.h
hal/api/LowPowerTimeout.h -> drivers/LowPowerTimeout.h
hal/api/LowPowerTimer.h -> drivers/LowPowerTimer.h
hal/api/PortIn.h -> drivers/PortIn.h
hal/api/PortInOut.h -> drivers/PortInOut.h
hal/api/PortOut.h -> drivers/PortOut.h
hal/api/PwmOut.h -> drivers/PwmOut.h
hal/common/RawSerial.cpp -> drivers/RawSerial.cpp
hal/api/RawSerial.h -> drivers/RawSerial.h
hal/common/SPI.cpp -> drivers/SPI.cpp
hal/api/SPI.h -> drivers/SPI.h
hal/common/SPISlave.cpp -> drivers/SPISlave.cpp
hal/api/SPISlave.h -> drivers/SPISlave.h
hal/common/Serial.cpp -> drivers/Serial.cpp
hal/api/Serial.h -> drivers/Serial.h
hal/common/SerialBase.cpp -> drivers/SerialBase.cpp
hal/api/SerialBase.h -> drivers/SerialBase.h
hal/common/Stream.cpp -> drivers/Stream.cpp
hal/api/Stream.h -> drivers/Stream.h
hal/common/Ticker.cpp -> drivers/Ticker.cpp
hal/api/Ticker.h -> drivers/Ticker.h
hal/common/Timeout.cpp -> drivers/Timeout.cpp
hal/api/Timeout.h -> drivers/Timeout.h
hal/common/Timer.cpp -> drivers/Timer.cpp
hal/api/Timer.h -> drivers/Timer.h
hal/common/TimerEvent.cpp -> drivers/TimerEvent.cpp
hal/api/TimerEvent.h -> drivers/TimerEvent.h
hal/api/Transaction.h -> drivers/Transaction.h
hal/api/can_helper.h -> drivers/can_helper.h
hal/.yotta_ignore
hal/CMakeLists.txt
hal/hal/analogin_api.h -> hal/analogin_api.h
hal/hal/analogout_api.h -> hal/analogout_api.h
hal/hal/buffer.h -> hal/buffer.h
hal/hal/can_api.h -> hal/can_api.h
hal/hal/dma_api.h -> hal/dma_api.h
hal/hal/ethernet_api.h -> hal/ethernet_api.h
hal/hal/gpio_api.h -> hal/gpio_api.h
hal/hal/gpio_irq_api.h -> hal/gpio_irq_api.h
hal/hal/i2c_api.h -> hal/i2c_api.h
hal/hal/lp_ticker_api.h -> hal/lp_ticker_api.h
hal/common/mbed_gpio.c -> hal/mbed_gpio.c
hal/common/mbed_lp_ticker_api.c -> hal/mbed_lp_ticker_api.c
hal/common/mbed_pinmap_common.c -> hal/mbed_pinmap_common.c
hal/common/mbed_ticker_api.c -> hal/mbed_ticker_api.c
hal/common/mbed_us_ticker_api.c -> hal/mbed_us_ticker_api.c
hal/module.json
hal/hal/pinmap.h -> hal/pinmap.h
hal/hal/port_api.h -> hal/port_api.h
hal/hal/pwmout_api.h -> hal/pwmout_api.h
hal/hal/rtc_api.h -> hal/rtc_api.h
hal/hal/serial_api.h -> hal/serial_api.h
hal/hal/sleep_api.h -> hal/sleep_api.h
hal/hal/spi_api.h -> hal/spi_api.h
hal/hal/storage_abstraction/Driver_Common.h -> hal/storage_abstraction/Driver_Common.h
hal/hal/storage_abstraction/Driver_Storage.h -> hal/storage_abstraction/Driver_Storage.h
hal/hal/ticker_api.h -> hal/ticker_api.h
hal/hal/trng_api.h -> hal/trng_api.h
hal/hal/us_ticker_api.h -> hal/us_ticker_api.h
hal/api/mbed.h -> mbed.h
hal/api/CThunk.h -> platform/CThunk.h
hal/common/CallChain.cpp -> platform/CallChain.cpp
hal/api/CallChain.h -> platform/CallChain.h
hal/api/Callback.h -> platform/Callback.h
hal/api/FunctionPointer.h -> platform/FunctionPointer.h
hal/api/PlatformMutex.h -> platform/PlatformMutex.h
hal/api/SingletonPtr.h -> platform/SingletonPtr.h
hal/api/critical.h -> platform/critical.h
hal/common/mbed_alloc_wrappers.cpp -> platform/mbed_alloc_wrappers.cpp
hal/common/mbed_assert.c -> platform/mbed_assert.c
hal/api/mbed_assert.h -> platform/mbed_assert.h
hal/common/mbed_board.c -> platform/mbed_board.c
hal/common/mbed_critical.c -> platform/mbed_critical.c
hal/api/mbed_debug.h -> platform/mbed_debug.h
hal/common/mbed_error.c -> platform/mbed_error.c
hal/api/mbed_error.h -> platform/mbed_error.h
hal/common/mbed_interface.c -> platform/mbed_interface.c
hal/api/mbed_interface.h -> platform/mbed_interface.h
hal/common/mbed_mem_trace.c -> platform/mbed_mem_trace.c
hal/api/mbed_mem_trace.h -> platform/mbed_mem_trace.h
hal/common/mbed_rtc_time.cpp -> platform/mbed_rtc_time.cpp
hal/common/mbed_semihost_api.c -> platform/mbed_semihost_api.c
hal/api/mbed_stats.h -> platform/mbed_stats.h
hal/common/mbed_wait_api_no_rtos.c -> platform/mbed_wait_api_no_rtos.c
hal/common/mbed_wait_api_rtos.cpp -> platform/mbed_wait_api_rtos.cpp
hal/api/platform.h -> platform/platform.h
hal/common/retarget.cpp -> platform/retarget.cpp
hal/api/rtc_time.h -> platform/rtc_time.h
hal/api/semihost_api.h -> platform/semihost_api.h
hal/api/toolchain.h -> platform/toolchain.h
hal/api/wait_api.h -> platform/wait_api.h
2016-09-30 19:18:09 -05:00