Commit Graph

161 Commits (0f8dffb7a47c53c0dd22cd3aa488cf4fefa8d95a)

Author SHA1 Message Date
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
ccli8 98a79c872b [M487] Support NuMaker-PFM-M487 board 2017-08-01 10:14:24 +08: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