Commit Graph

242 Commits (c621c688c4777b5bef65ea00d4bfb537d547cf12)

Author SHA1 Message Date
Anna Bridge 7b428916f5 Merge pull request #4949 from theotherjimmy/feature-armc5+armc6
NEW TOOLCHAIN: Add the ARMC6 Compiler
2017-09-13 10:39:15 +01:00
Vincent Coubard 682816d86e Sleep: Disallow sleep for targets turning of the systick clock at sleep entry.
When the RTOS is present and the tickless mode is not implemented, it is
expected that the next tick issued by the Systick timer will wake up the MCU.
However nothing prevents an implementation of the ARM architecture to gate the
systick clock signal upon sleep entry.

Therefore on those targets sleep shall be prohibited if the RTOS is present and the
tickless mode is not implemented.

To ease life of porters , a new option has been added in the device add list:
STCLK_OF_DURING_SLEEP. This option expose that the target turn of the systick
clock during sleep.

Targets which exhibit such behavior shall add this define in their device_has list.
2017-09-13 10:28:02 +01:00
Jimmy Brisson 41a6197208 Update mbed 2 discriminator 2017-09-11 13:20:33 -05:00
Jimmy Brisson b22a174c39 Correct semihosting check for ARMC6 2017-09-11 13:20:32 -05:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
Jimmy Brisson 922bf1b619 Update mbed OS to handle ARMC6 requirements 2017-09-11 13:20:32 -05:00
Deepika 9422c351e4 Initial RTX and tools support for Cortex M-23/M-33 devices 2017-09-11 11:43:26 -05:00
Anna Bridge cab660d980 Merge pull request #4938 from deepikabhavnani/IAR_fixes
Update IAR to version 8
2017-09-11 17:28:38 +01:00
0x6d61726b 839cd7ee70 CircularBuffer(): get available transactions
This implementation returns the number of available (stored) transactions in the buffer
2017-09-08 15:33:14 +02:00
Martin Kojtal bc704427e2 platform: add DeepSleepLock
RAII object for disabling, then restoring the deep sleep mode
2017-09-07 15:35:06 +01:00
Martin Kojtal cb4e9b32a2 Sleep HAL: add sleep manager API
Sleep manager provides API to lock/unlock deepsleep. This API allows a user to
control deep sleep.

This API should be done via atomic operations (to be IRQ/thread safe).
2017-09-07 15:34:47 +01:00
Deepika 7d98eebf2a __IAR_SYSTEMS_ICC__ macro had issues when 7.5 and 8.11 both workbench are installed 2017-09-06 09:51:17 -05:00
Deepika bcb8779362 Internal members of std::FILE are not available from IAR8.x 2017-09-06 09:51:15 -05:00
Deepika 38e96ac432 __aeabi_read_tp function required for TLS in Dlib 2017-09-06 09:51:15 -05:00
Christopher Haster 382c0381c9 cb: Fixed uninitialized memory used for equality check
Fixed by zeroing the memory. A more "c++ correct" approach
may be to add an additional op for equality, and use the "=="
operator on the F type in the generate function. But this adds
the requirement that F supports equality.
2017-09-05 11:03:14 -05:00
Martin Kojtal 4ccff693ae Merge pull request #4962 from 0xc0170/dev_critical_section
platform: add CriticalSectionLock
2017-09-04 16:50:59 +01:00
Jimmy Brisson 2d65f49f61 Merge pull request #4954 from c1728p9/fix_isr_clear
Fix ISR powerdown in mbed_application.c
2017-08-29 13:46:25 -05:00
Martin Kojtal be8174f94f platform: add CriticalSectionLock
Critical section class RAII addition
2017-08-29 12:47:04 +01:00
Jimmy Brisson 7252447385 Merge pull request #4920 from scartmell-arm/led-error-sequence
Modify LED error sequence to be more recognisable
2017-08-24 10:14:13 -05:00
Jimmy Brisson dd0a0fc3e7 Merge pull request #4831 from fahhem/less_scanf
Remove excessive use of printf/scanf in mbed_fdopen/_open
2017-08-24 10:12:10 -05:00
Russ Butler 29ad5bb09b Fix ISR powerdown in mbed_application.c
Fix a calculation error in in powerdown_nvic preventing the last
group of 32 interrupts from getting powered down. The ARMv7m reference
manual states "the total number of interrupt lines is up
to (32*(INTLINESNUM+1)).".

Also rename isr_count to isr_groups_32 for clarity, since this is
actually the number of 32 interrupt groups.
2017-08-22 10:54:18 -05:00
Jimmy Brisson a457fe3bdd Merge pull request #4908 from geky/fs-reformat
fs: Add FileSystem::reformat
2017-08-21 10:38:00 -05:00
Jimmy Brisson 2dc4bef010 Merge pull request #4902 from deepikabhavnani/macro_fix
Using CMSIS/RTX Exclusive access macro
2017-08-17 10:11:03 -05:00
Steve Cartmell 9c87f5936c Unified the LED error pattern for all boards
- Removed the patterned LED sequence, all boards now use the 4 fast pulse, 4 slow pulses LED sequence.
  - Changed the LED used from LED_RED to LED1. Only 58/174 targets seem to define LED_RED but they all define LED1.
  - Removed all ERROR_RED and ERROR_PATTERN definitions from targets/targets.json
2017-08-16 11:55:24 +01:00
Christopher Haster cb2306c085 retarget: Added ENODEV to error codes 2017-08-14 17:32:08 -05:00
Jimmy Brisson 99a8467b70 Merge pull request #4817 from c1728p9/move_rtx_handlers
Move RTX error handlers into RTX handler file
2017-08-14 11:44:19 -05:00
Deepika 74ba5f3f51 Using CMSIS/RTX Exclusive access macro 2017-08-14 10:06:17 -05:00
Fahrzin Hemmati 88f90788bf Remove null byte at the end of fdopen's faux filename 2017-08-10 21:14:12 -07:00
Steve Cartmell 942f71a9c4 Modify LED error sequence to be more recognisable
The current error sequence for microcontrollers with less than 4 LEDs is
to toggle an LED at a fixed rate. Change the sequence to 4 short pulses
followed by 4 long pulses.
2017-08-09 16:15:31 +01:00
ccli8 98a79c872b [M487] Support NuMaker-PFM-M487 board 2017-08-01 10:14:24 +08:00
Fahrzin Hemmati af37520e42 Use MBED_STATIC_ASSERT instead of static_assert 2017-07-31 09:29:34 -07:00
Fahrzin Hemmati 199d108063 Update comments for code review 2017-07-31 09:29:34 -07:00
Fahrzin Hemmati e5ef69a925 Remove excessive use of printf/scanf in mbed_fdopen/_open 2017-07-31 09:29:34 -07:00
Russ Butler 46f6f52299 Move RTX error handlers into RTX handler file
Move the RTX error handlers out of mbed_retarget.cpp and into an the
dedicated RTX handler file.
2017-07-27 10:08:39 -05:00
Jimmy Brisson ea12d69564 Merge pull request #4790 from bulislaw/mem_stats
Improve documentation for memory stat ops
2017-07-27 09:46:21 -05:00
Jimmy Brisson 3ed697a36a Merge pull request #4775 from c1728p9/fix_defines
Fix non-portable defines
2017-07-24 10:58:05 -05:00
Jimmy Brisson 60550c1ef0 Merge pull request #4726 from sarahmarshy/patch-11
Update ATCmdParser example code
2017-07-24 10:54:09 -05:00
Bartek Szatkowski e9f78502dd Improve documentation for memory stat ops 2017-07-20 15:56:48 +01:00
Russ Butler c18b0e5c05 Fix non-portable defines
A define which expands to more defines is not portable across all
compilers and GCC warns about this. Restructure this so the behavior
is defined. This fixes the GCC warning:
"this use of "defined" may not be portable"
2017-07-18 12:04:13 -05:00
Jimmy Brisson 9cb9b9b5b5 Merge pull request #4718 from ARMmbed/g-weak-note
Toolchain: Add a note about weak functions and header files
2017-07-17 11:08:22 -05:00
Martin Kojtal 5a5d159a3c Merge pull request #4666 from chrissnow/tests-mbed_hal-flash-Timing_fix
Fix timing issues found in "Flash - clock and cache test"
2017-07-13 16:48:32 +02:00
sarahmarshy d8a7fe1467 Update ATCmdParser example code.
The previous example code was not very helpful, as it doesn't show the use of UARTSerial.
2017-07-07 16:45:01 -05:00
Christopher Haster eb4c223dd7 Toolchain: Added a note about weak functions and header files
The subtlety of where to mark functions as weak created an issue for
at least one user, so added a warning in the documentation.
2017-07-07 14:33:26 -05:00
Anna Bridge 4890261c98 Merge pull request #4548 from deepikabhavnani/os_warn
Resolve Warnings for mbed-os-examples
2017-07-07 12:43:27 +01:00
Chris 3df42bcfb4 Toolchain independent noinline 2017-06-30 20:32:17 +01:00
Martin Kojtal 8a9f49653b retarget: fix microlib for mbed 2
This is as it used to be, reverting the removal. uARM does not have any hook
that we could use for mbed sdk init and copy nvic, therefore _open is used that
should be sufficient, but not ideal.

For more information, visit https://github.com/ARMmbed/mbed-os/pull/2160/files#r76563844.
2017-06-29 14:35:00 +01:00
Vincent Coubard 7a1e2cfc9a platform: Replace private copy constructor and copy assignement operator by a NonCopyable tag.
The class concerned by this change are: ATCmdParser, CallChain, FileBase and Stream.
2017-06-20 16:23:43 +01:00
Vincent Coubard dcbcf64830 platform: Tag classes DirHandle, FileHandle, FileLike, FileSystemHandle, FileSystemLike, LocalFileHandle, LocalFileSystem and PlatformMutex as non copyable.
This avoid unwanted copy of these type which is a programming error.
2017-06-20 16:23:43 +01:00
Vincent Coubard 4f7943860a platform: Add NonCopyable class.
The NonCopyable template class avoid autogeneration of copy assignement
and copy construction function for classes inheriting from it.
2017-06-20 15:49:16 +01:00
Christopher Haster 6b02ceab5d rtos: Unbreak semaphore, trade assert for saturation with original limit
Before rtx 5, the max count on semaphores was UINT16_MAX, aftewards it
was decreased to 1024 with an assert on overflow.

This is especially problematic for semaphores used for signaling, since
there is no replacement currently available in C++.
2017-06-16 17:18:40 -05:00
Deepika 9b5f5a5472 Typecasting to resolve warning: integer conversion resulted in a change of sign 2017-06-15 13:37:19 -05:00
Jimmy Brisson 761151359e Merge pull request #4506 from c1728p9/disable_2_error_trapping
Disable error trapping for mbed 2 builds
2017-06-09 14:22:30 -05:00
Jimmy Brisson f55a8c3088 Merge pull request #4503 from 0xc0170/fix_issue_sdk_vectors
mbed sdk boot: copy vectors addition
2017-06-09 14:22:12 -05:00
Martin Kojtal a59a319483 Merge pull request #4466 from geky/cleanup
Clean up dead classes in retarget layer
2017-06-09 15:06:18 +01:00
Sam Grove 52fde55b6f Merge pull request #4450 from deepikabhavnani/doxygen-template
Doxygen template
2017-06-08 22:42:06 -05:00
Martin Kojtal 7d3b2af9c7 mbed sdk boot: default nvic implementation
Latest cmsis files provide virtual nvic implementation, therefore all nvic
set/get vectors were removed. As the result, we did not reallocate vectors
for mbed SDK. This should fix it for most of the platforms (cortex m0 and
cortex a9 need to provide own if they need it).
2017-06-08 17:19:35 -05:00
Russ Butler 018955c7b2 Disable error trapping for mbed 2 builds
To maintain backwards compatibility keep error trapping turned off
for mbed 2 builds.
2017-06-08 16:54:23 -05:00
Sam Grove 6d34b86f5d Merge pull request #4489 from 0xc0170/fix_issue#4486
mbed sdk boot: fix gcc sw init hook attribute
2017-06-08 15:55:14 -05:00
Sam Grove 9122ed60cd Merge pull request #4480 from pan-/fix_time_return
rtc_time: Fix incorrect return value when the calendar is not available.
2017-06-08 15:52:46 -05:00
Deepika 6ee4c7e219 Fix doxygen warnings in 'features/filesystem' 2017-06-08 15:48:21 -05:00
Deepika Bhavnani f05e498c73 Resolving doxygen warnings 2017-06-08 15:48:20 -05:00
Vincent Coubard 6b020a3510 mbed_localtime: Add support of year day.
This field is needed by the LPC43XX targets.
2017-06-08 10:32:57 +01:00
Vincent Coubard 01f1e08358 mbed_localtime: Add support of wday.
This field is necessary, it is used by several vendor RTC: Atmel, ST, NUVOTON,
NXP.
2017-06-08 10:11:01 +01:00
Vincent Coubard 946ed353bc mbed_mktime: Improve documentation for doxygen. 2017-06-08 10:01:43 +01:00
Vincent Coubard f880e44145 remove usage of mktime/localtime in favor of dedicated functions.
The use of mktime was causing a fault when called in interrupt handler because on GCC it lock the mutex protecting the environment, To overcome this issue, this patch add dedicated routine to convert a time_t into a tm and vice versa.
In the process mktime has been optimized and is now an order of magnitude faster than the routines present in the C library.
2017-06-07 22:06:22 -05:00
Martin Kojtal b1c7943dc3 mbed sdk boot: fix gcc sw init hook attribute
Remove naked attribute that should not be defined for sw init hook, as it
should return.
2017-06-07 10:02:52 +01:00
Vincent Coubard c335a0090c rtc_time: Fix incorrect return value when the calendar is not available.
According to the C99 specification "The value (time_t)(-1) is returned if the
calendar time is not available". Before this patch, in such case the function
was returning 0 instead of -1.
2017-06-06 23:03:28 +01:00
Sam Grove bb2eb8b7b7 Fix doxygen warnings. 2017-06-06 15:32:42 -05:00
Christopher Haster 5bd070af86 Cleaned up extra code left over after several different rebases 2017-06-06 15:21:25 -05:00
Sam Grove 052d02e620 Fix doxygen warnings. 2017-06-05 17:32:45 -05:00
Sam Grove 0bf2c5f55c Fix doxygen warnings. 2017-06-05 17:32:45 -05:00
Sam Grove 2d8bf18317 Fix doxygen warnings. 2017-06-05 17:32:45 -05:00
Niklas Hauser 8fb74f42d2 uVisor: Wrap _memalign_r and _calloc_r 2017-06-04 14:41:59 +01:00
Christopher Haster 0fc5ce2b5e LocalFileSystem: Moved away from deprecated open functions
The old open/opendir functions did not provide a route for errors and
relied on implementations manually setting errno. Updated to return
errors directly.
2017-06-03 13:18:02 -05:00
Christopher Haster 5d6fc713fb FileSystem: Reintegrated FileSystemLike interface
Required for other representations of FileSystems, ie LocalFileSystem

Introduces FileSystemHandle for the same behaviour as FileHandle and
DirHandle.

Requires the following to hook into file/dir lookup:
```
int open(FileHandle **file, const char *filename, int flags)
int open(DirHandle **dir, const char *path)
```

This hook is provided by the FileSystem class, so requires no changes
from implementations.
2017-06-03 13:17:37 -05:00
Russ Butler a84142fc4e Prevent recursive call to error()
Only allow error to be called once. This prevents a loop where error()
calls exit() which in turn triggers another call to exit().
2017-06-02 23:50:35 -05:00
Russ Butler 770ad616dd Trap on RTX errors if enabled
If MBED_TRAP_ERRORS_ENABLED is defined to 1 then trap on RTX errors.
This includes using mutexes in ISR context.
2017-06-02 23:50:33 -05:00
Russ Butler b44e6f8a16 Assert that file IO is not used in ISRs
Trigger an assert if a file is read from or written to from an
interrupt handler or critical section. This includes using printf
from an interrupt handler or critical section. This makes failures
due to use in incorrect context deterministic and easier to locate.

This feature is enabled by defining MBED_TRAP_ERRORS_ENABLED to 1 or
by using the debug profile.
2017-06-02 23:50:31 -05:00
Russ Butler 5ab3de0bfa Add function to check for ISR context
Add the function core_util_in_isr() so code can determine if it is
running in the context of an ISR.
2017-06-02 23:50:29 -05:00
Sam Grove 5f138810a9 Merge pull request #4294 from ARMmbed/feature_cmsis5
Update CMSIS-Core and RTX to version 5
2017-06-02 23:44:32 -05:00
Hasnain Virk 24de27c989 Major Refactoring & extensions
For keep supporting external APIs with the same name (supposedly there are a larger
number of users of those APIs), BufferedSerial and ATParser are being renamed.
BufferedSerial becomes UARTSerial, will complement a  future USBSerial etc.
ATParser becomes ATCmdParser.

* UARTSerial moves to /drivers

* APN_db.h is moved from platform to cellular/util/.

* Original CellularInterface is restored for backward compatability (again, supposedly there
  are users of that).

* A new file, CellularBase is added which will now servce as the base class for all
  upcoming drivers.

* Special restructuring for the driver has been undertaken. This makes a clear cut distinction
  between an on-board or an off-board implementation.
  	- PPPCellularInterface is a generic network interface that works with a generic FileHandle
          and PPP. A derived class is needed to pass that FileHandle.
        - PPPCellularInterface provides some base functionality like network registration, AT setup,
          PPP connection etc. Lower level job is delegated to the derived classes and various modem
          specific APIs are provided which are supposed to be overridden.
        - UARTCellularInterface is derived from PPPCellularInterface. It constructs a FileHandle and
          passes it back to PPPCellularInterface as well as provides modem hangupf functionality.
          In future we could proive a USBInterface that would derive from PPPCellularInterface and could
          pass the FileHandle back.
	- OnboardCellularInterface is derived from UARTCellularInterfae and provides hooks to
          the target provided implementation of onbard_modem_api.h. An off-board modem, i.e, a modem on
          a shield has to override the modem_init(), modem_power_up() etc as it cannot use
          onboard_modem_api.h.
2017-05-31 15:02:11 +03:00
Hasnain Virk c8933e4c71 Removing _poll_change() for now
There is currently no proper wake up mechanism provided
by mbed-os. _poll_change() was supposed to wake upa blocking
poll() in case of a POLL event but the implementation was dependent
upon underlying wake up mechanism. In the absence of conditioanl
variables or some other alternative, _poll_change() wasn't able to
serve its purpose. Removing it for now. Should be implemented at some later stage
2017-05-31 15:02:11 +03:00
Hasnain Virk c65f81bf46 Remove sigio implementation from FileHandle
Make FileHandle more of an interface class, by requiring implementers to
provide the sigio() functionality themselves.

sigio() and poll() remain parallel independent mechanisms, so FileHandle
implementations must trigger both on state changes.
2017-05-31 15:02:11 +03:00
Hasnain Virk 01088647b9 Finalizing the public API for Cellular
* state machine corrections
* adding various standard API methods
* Addition/revision/enhancement of the nsapi_ppp glue layer
* Turning off debug by default
2017-05-31 15:02:11 +03:00
Hasnain Virk 3b44f4758d Adding support for APN lookup
Mainly reutilizing code from ublox C027 support lib.
As we are using external PDP context, i.e., an external IP stack,
we will pass username and password to underlying stack running PPP.
We only support CHAP as the authentication protocol.
2017-05-31 15:02:11 +03:00
Hasnain Virk 93f436ebe0 Using DCD line to invoke poll() HUP
POSIX poll() provides a mechanism to attach a POLL_HUP event
if the modem or device hangs up on you. POLL_HUP and POLL_OUT are
mutually exclusive. We poll in the PPP_input() routine if the modem
hung up. If it did we stop the data consumption, close PPP and go back
to the driver for reserruction of AT parser and subsequent retries or
application specific actions.
This is achieved by attaching an interrupt to the DCD line of the modem.
When DCD line goes high (off), we have lost the carrier. So we record an
POLLHUP event using _poll_change().
2017-05-31 15:02:11 +03:00
Hasnain Virk ea117e5a1a Memory Optimizations and simplifications in ATParser
ATParser had been using std <vector> which had been pulling along a lot
of standard C++ stuff. We have an alternative implementation whcih achieves
a similar effect but without using <vector>. this saves a bunch of valuable
RAM resource.

We have also simplified the overall system by introducing proper CR and LF
rather than \r\n type of delimiters. This newline simplification is borrowed
from retarget.cpp.
2017-05-31 15:02:11 +03:00
Hasnain Virk 4a04c9ce5d Extending ATParser to use FileHandle
Existing ATParser is extended to use FileHandle. This essentially detaches
ATParser from previous tight binding with various implementations of serial
interfaces with buffering.
Now the ATParser uses only abstract FileHandle and doesn't really care about
the underlying implementation. Underneath, it could be a USB device type FileHandle
or a Serial device type FileHandle etc.
Some simplification steps were taken as the code provided opportunities to simplify
and optimize.
2017-05-31 15:02:11 +03:00
Hasnain Virk 2790d44862 Introducing a BufferedSerial
BufferedSerial is a FileHandle and using SerialBase.
It keeps the SerialBase private however lets the user extend FileHandle
by keeping it public.

It is using CircularBuffer class for having circular buffers.

There are some minor amendments in CircularBuffer too.

Adding an entry for tx/rx buffer sizes in platform/mbed_lib.json.
Default size is 256 bytes.

For RTOS read(), write() calls yield for other threads to carry on with their stuff.
For non-RTOS blovking read or write would mean a loop where 100 percent resources are
consumed by this loop. Need to get a better implementation in. Currently no mechanism to
wake the mcu up after WFE.
2017-05-31 15:02:11 +03:00
Hasnain Virk 09ae609d56 Stream class should use mbed::fdopen() to attach a stream
mbed::fdopen() is provided in mbed_retarget.cpp which will attach a stream to the
given FileHandle. Removing mbed_set_unbuffered_stream() from stream class as it
is defined in mbed_retarget.cpp. Stream class should not decide whether it wants
to detach buffers from c library or not. mbed::fdopen() will do that based upon
isatty() call. So if a FileHandle is not a tty, i.e., is not a device type, c library
buffering will not be turned off. For device type FileHandles, c library buffering
is turned off.
2017-05-31 15:02:11 +03:00
Hasnain Virk b2408d8a16 Extending FileHandle & introducing mbed_poll
This has been an attempt to extend existing FileHandle to behave like POSIX
file descriptor for input/output resources/devices too.
This will now provide an abstract indicator/handle any arbitrary file or device
type resource. May be in future, sockets too.

In order to correctly detect availability of read/write a FileHandle, we needed
a select or poll mechanisms. We opted for poll as POSIX defines in
http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html Currently,
mbed::poll() just spins and scans filehandles looking for any events we are
interested in. In future, his spinning behaviour will be replaced with
condition variables.

In retarget.cpp we have introduced an mbed::fdopen() function which is
equivalent to C fdopen(). It attaches a std stream to our FileHandle stream.
newlib-nano somehow does not seem to call isatty() so retarget doesn't work for
device type file handles. We handle this by checking ourselves in
mbed::fdopen() if we wish to attach our stream to std stream.  We also turn off
buffering by C library as our stuff will be buffered already.

sigio() is also provided, matching the API of the Socket class, with a view to
future unification. As well as unblocking poll(), _poll_change calls the user
sigio callback if an event happens, i.e., when FileHandle becomes
readable/writable.
2017-05-31 15:02:11 +03:00
Kevin Bracey fb7cbdf356 Tighten mbed_retarget.cpp error handling
* Don't set errno when calls are successful (will slightly alleviate the problem
  of errno not being thread-safe yet).
* Transfer errors returned from size() and seek() into errno.
* Fix isatty() - could never return 1 from a FileHandle.
* Use more appropriate errors than EBADF in some places (eg ENOENT for non-existant path).
2017-05-31 15:02:11 +03:00
Kevin Bracey 533910cb87 Correct return type of FileHandle::size()
File size should be off_t, not size_t.
2017-05-31 15:02:11 +03:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01:00
Bartek Szatkowski 2ddf4b33cb CMSIS5: Remove ARM7 support and targets 2017-05-12 13:48:43 -05:00
Anna Bridge 8543279901 Merge pull request #4259 from LMESTM/fix_Stream_issue687
Add error check in Stream constructor
2017-05-04 15:56:44 +01:00
Anna Bridge aa80b55628 Merge pull request #4233 from sg-/fix-the-docs2
[platform] Update doxygen comments
2017-05-04 15:12:54 +01:00
Jimmy Brisson 7ace0cbb14 Merge pull request #3881 from geky/log-no-io
Remove debug links to printf/exit in NDEBUG builds
2017-05-02 11:37:10 -05:00
Laurent MEUNIER 4ad4b2a2ef On small targets there might be memory issues that lead to
failing on file allocation / opening during Stream creation.

The consequence was application continues running, but any printf
to the Serial object whose Stream was not properly created
would not show any error (and characters would not show either)

Let's add a check to properly inform user of the error.
2017-05-02 17:53:58 +02:00
Christopher Haster 8705305cab callback: Moved out sfinae logic into a macro
This is required to allow doxygen to properly parse the function
declarations, otherwise it gets confused around the nested templates.
2017-04-28 16:02:36 -05:00