Commit Graph

6088 Commits (df0c855df97688074545693f66bcca5cf9f42111)

Author SHA1 Message Date
Sam Grove df0c855df9 Merge pull request #1904 from sg-/iar-lpc-eth-patch
rename section used for eth and usb
2016-06-11 18:25:01 +01:00
Sam Grove 1947c48502 Merge pull request #1863 from c1728p9/thread_safe_cpp_api
Make core mbed API thread safe
2016-06-11 18:07:44 +01:00
Russ Butler 3d8d441263 Make FAT filesystem thread safe
Add lock and unlock calls to the FAT filesystem so it is thread safe.
2016-06-11 17:33:13 +01:00
Russ Butler b174d6a314 Add virtual lock for thread safe classes
Add a virtual lock for the classes which are thread safe.  This
allows the use of a mutex to be overridden.
2016-06-11 17:33:12 +01:00
Russ Butler e4f6e1b327 Update assert and error to be interrupt safe
Add printf functions intended for errors which are safe to call from
interrupts.  Update assert and error to use this function.
2016-06-11 17:33:10 +01:00
Russ Butler a6f611b706 Add sync level documentation to classes
Document public classes to indicate level of protection provided.
2016-06-11 17:33:09 +01:00
Russ Butler feb60784e9 Make core mbed API thread safe
Make the mbed C++ API thread safe by adding a combination of
mutexes and critical sections.  Stub out all mutexes when the
RTOS is not present.
2016-06-11 17:33:02 +01:00
Sam Grove 50c106f718 rename section used for eth and usb 2016-06-11 07:11:09 -07:00
Sam Grove 52e93aebd0 Merge pull request #1893 from screamerbg/tools-improvements
mbed Tools features and improvements
2016-06-10 18:34:23 +01:00
Sam Grove 0b3556db2f Merge pull request #1898 from pan-/fix_nrf51_stack
Adjust the main stack of nrf51 targets to the call stack of thesoftdevice.
2016-06-10 18:00:45 +01:00
Sam Grove dc1c716618 Merge pull request #1897 from pan-/fix_nrf51_rtos_ticker
Fix function RTOS ticker of nrf51 port
2016-06-10 17:59:50 +01:00
Sam Grove 123d55d803 Merge pull request #1753 from meriac/master
Add initial uVisor port
2016-06-10 17:35:40 +01:00
Milosch Meriac 08ba670c7b Add initial uvisor release library 2016-06-10 17:01:29 +01:00
Alessandro Angelino 47025b81d2 uVisor: Define UVISOR_PRESENT based on target labels
Now there is no need any more to specify the UVISOR_PRESENT symbol from
the mbed command line tools. By using a target that has UVISOR_SUPPORTED
has a label, the uVisor-internal UVISOR_PRESENT symbol will be set
automatically.
2016-06-10 16:56:17 +01:00
Jaeden Amero 829ca3333b RTX: Actively switch to the idle thread
Prevent a switch to a NULL target thread by setting the new task to run
to be the idle task. Otherwise, we get nasty usage fault because we
would be returning from the rt_sys_init SVC with a PSP of 0x20.
2016-06-10 16:56:17 +01:00
Jaeden Amero 58336594ac RTX: Run unprivileged if uVisor is present
As priviliged threading is incompatible with uVisor
2016-06-10 16:56:17 +01:00
Alessandro Angelino a076f9a415 K64F: Add call to uvisor_init() in the startup code
This is backwards-compatible with unsupported targets.

If an application is compiled using the K64F target without uVisor
(UVISOR_PRESENT not set or set to 0) then uvisor_init() will just be an
empty function that immediately returns.
2016-06-10 16:56:17 +01:00
Alessandro Angelino 6aeafab6b3 K64F: Add page allocator sections to linker script
These changes are backwards compatible.

Targets that do not use the page allocator heap will have the same stack
and heap sizes available.
2016-06-10 16:56:17 +01:00
Alessandro Angelino eb9d124230 K64F: Add uVisor sections to the linker script
This commit includes all sections that are just added to the linker
script. These changes are backwards-compatible, meaning that they will
not affect the existing code.

Targets that do not support uVisor will leave those sections empty.
2016-06-10 16:56:17 +01:00
Niklas Hauser f81cf5d686 Add default implementation of malloc wrapping
For GCC malloc is always wrapped, but only used for FEATURE_UVISOR.
Otherwise we have to simply forward the wrappers.
2016-06-10 16:56:17 +01:00
Jaeden Amero 5d48984914 Initialize uvisor-lib
uvisor-lib has an init function that must be called before the RTOS kernel
is initialized. Call uvisor_lib_init from software_init_hook to accomplish
this.
2016-06-10 16:56:17 +01:00
Jaeden Amero 43e595aec3 Wrap software_init_hook
Wrap software_init_hook so that it can be used or extended from outside the
RTOS. This is desirable so that code can be added to the software_init_hook
without making the RTOS depend on new features or libraries.
2016-06-10 16:56:17 +01:00
Niklas Hauser 61166870ed RTX: Add context to osThreadCreate/Terminate 2016-06-10 16:56:16 +01:00
Niklas Hauser 259bd28c45 RTX: Add pointer to context to task structure 2016-06-10 16:56:16 +01:00
Jaeden Amero 4cdc4a7b45 Add OsEventObserver
Add the OsEventObserver mechanism. A client interested in receiving
notifications on certain OS events can register to receive notifications
with osRegisterForOsEvents. This is useful for clients like the secure
memory allocator, which observes thread switching events in order to swap
in and out different memory allocator objects.
2016-06-10 16:56:16 +01:00
Jaeden Amero 55f464da27 Copy memory management code over from uVisor
Add the memory management code from uVisor to a shared location that is
suitable for both supported and unsupported use. To do this, we copy all
the RTX-specific files from the RTX folders in uVisor.

Note that the page allocator code is so identical between uVisor supported
and unsupported mode that we can copy the file as-is from uVisor for use on
unsupported targets. This commit performs that copying, to a file called
page_allocator.c_inc, which is included from unsupported_page_allocator.c
only for targets where uVisor is not present.
2016-06-10 16:56:16 +01:00
Milosch Meriac 10d9c2fa97 Add updated uVisor importer script 2016-06-10 16:56:16 +01:00
Mihail Stoyanov f6acb1ffb4 Forward ported changes to tools 2016-06-10 15:19:02 +01:00
Vincent Coubard 06e2139e6a Adjust the main stack of nrf51 targets to the call stack of the
softdevice.

The call stack of the soft device can be 0x600 (1536) bytes long, by
adjusting the stack to a value of 2048 bytes, their is enough room for
the softdevice and RTX kernel to live together in the main stack.

Random issues due to stack overflow were visible with the previous value.
2016-06-10 14:57:51 +01:00
Vincent Coubard 6315f8e486 Fix function is_in_wrapped_range, the function where returning false when
instead of true when begin <= val < end. The documentation was correct but
not the code.
2016-06-10 14:46:11 +01:00
Mihail Stoyanov 51c10165ca Fixed toolchain flags so exporters can use them 2016-06-10 13:12:21 +01:00
Mihail Stoyanov 75a18ff1a3 Add config system macros to exporters
Support various exporter features
2016-06-10 11:27:23 +01:00
Mihail Stoyanov 9f62d70fbf Update project generator script to allow working with any source
Update test exporters script
Update travis build script
Added config system CLI script
Fixed building of legacy libraries and layouts
2016-06-10 02:24:27 +01:00
Mihail Stoyanov c2e3001739 Add config system, memap, updates to build_api and toolchains 2016-06-09 23:50:03 +01:00
Mihail Stoyanov 773dab514e Add --source option to both build.py and make.py. Also add test.py script for compiling and listing tests 2016-06-09 23:11:23 +01:00
Mihail Stoyanov 87a978c4e8 Move private_settings.py to root mbed_settings.py. Various updates to reflect the path changes 2016-06-09 22:24:05 +01:00
Mihail Stoyanov 5e6722dbab Ported updates to targets, utils and settings scripts 2016-06-09 22:05:35 +01:00
Mihail Stoyanov 42c62abed1 Further changes to reflect workspace_tools to tools rename 2016-06-09 21:40:54 +01:00
Mihail Stoyanov 3d45b2cdbb Renamed workspace_tools folder to tools 2016-06-09 21:34:53 +01:00
Martin Kojtal 9714a0edf6 Merge pull request #1892 from geky/fix-ksdk2-lwip
Fixed uninitialized port in lwip dragged in by KSDK2
2016-06-09 18:52:38 +01:00
Christopher Haster f046234ce8 Fixed uninitialized port in lwip dragged in by KSDK2 2016-06-09 12:43:00 -05:00
Martin Kojtal 641e3a8748 Merge pull request #1891 from c1728p9/restore_interrupts
KSDK2 - restore interrupts in InstallIRQHandler
2016-06-09 18:31:02 +01:00
Russ Butler 9d7ca3e405 KSDK2 - restore interrupts in InstallIRQHandler
Restore the state of interrupts inside InstallIRQHandler rather than
leaving them enabled.
2016-06-09 18:27:22 +01:00
Martin Kojtal 24e767c10f Merge pull request #1888 from sg-/feature-label
Feature label
2016-06-09 15:40:46 +01:00
Sam Grove d71f015659 Added features to Target description to support the changed names and build extensions 2016-06-09 15:00:36 +01:00
Martin Kojtal 91b96131bc Merge pull request #1887 from rgrover/master
the contents of Driver_Storage.h don't need to be guarded by #if DEVI…
2016-06-09 14:13:08 +01:00
Mihail Stoyanov e7c3c883de Introduce FEATURE_ keyword which behaves like TARGET_ but is generated from targets features (see targets.json) 2016-06-09 14:10:52 +01:00
Rohit Grover 527e305df5 the contents of Driver_Storage.h don't need to be guarded by #if DEVICE_STORAGE 2016-06-09 13:30:54 +01:00
Martin Kojtal 7d583e5541 Merge pull request #1853 from svastm/update_cube_l4
[STM32L4XX] Update HAL_Cube_L4 to 1.5.1
2016-06-09 11:35:35 +01:00
Martin Kojtal bead0173d9 Merge pull request #1881 from mbedmicro/rename_features
Rename "features" to "device_has" in targets.json
2016-06-09 11:32:21 +01:00