Commit Graph

6235 Commits (ac1a63f1a142c573f225f5cc01776a33fdf0406e)

Author SHA1 Message Date
Russ Butler 8c2e352dd8 Fix GCC malloc lock
The malloc lock functions were not declared as extern "C" so they
are not getting linked to the standard library.  Add extern "C" to
fix this.

This bug was introduced in the commit:
d0b7b3b497 -
Fix duplicate symbols for malloc lock and unlock
2016-06-13 15:00:42 +01:00
Vincenzo Frascino ce1c2c780a [BEETLE] Add LED Emulation
The current version of MBED test environment requires LEDs to be present
in the platform.

Beetle HW does not provide any user programmable LEDs. This patch provides an
emulation of the feature by using dummy PINs.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
2016-06-13 14:26:49 +01:00
Vincenzo Frascino 4f61cfd7f6 [BEETLE] Add support for GCC ARM exporter
This patch adds support for GCC ARM exporter to the Beetle Target.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
2016-06-13 14:26:47 +01:00
Vincenzo Frascino c1442139a0 [BEETLE] Add support for uVision 5 exporter
This patch adds support for uVision 5 exporter to the Beetle Target.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
2016-06-13 14:26:45 +01:00
Vincenzo Frascino 09b5551d41 [BEETLE] Add initial Beetle HAL files
This patch adds support for BEETLE SoC Target into the HAL layer.
It contains:
* Beetle Platform Configuration
* I2C API
* SPI API
* Serial API
* Port API
* us Ticker API

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
2016-06-13 14:26:30 +01:00
Vincenzo Frascino 44be0626a6 [BEETLE] Add initial Beetle CMSIS files
This patch adds support for BEETLE SoC Target into the CMSIS layer.
It contains:
* Beetle System Core
* APB DualTimer Driver
* APB Timer Driver
* eFlash Driver
* Flash Cache Driver
* ARM Toolchain Support
* GCC ARM Toolchain Support

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
2016-06-13 11:56:14 +01:00
Vincenzo Frascino 0d3268b61c [BEETLE] Add initial support
This patch adds support for the BEETLE Target. The compilers supported by
this target are:
* ARMCC
* GCC ARM

The exporters and the CMSIS/HAL components will follow in future patches.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
2016-06-13 11:55:33 +01:00
Maciej Bojczuk bb65961089 [NUCLEO_F030R8] Set NVIC Timer priorities
This fix is a solution for issue #816 when having two separate IRQ handlers
in Timers (UPDATE Irq and OutputCompare Irq). The update priority needs to
be higher to avoid undefined behaviours.

Change-Id: Ic143ed0f3e4e42ad5f7b95337d8c005b7ec61274
2016-06-13 11:27:37 +02:00
Maciej Bojczuk 899cd44619 [NUCLEO_F070RB] Set NVIC Timer priorities
This fix is a solution for issue #816 when having two separate IRQ handlers
in Timers (UPDATE Irq and OutputCompare Irq). The update priority needs to
be higher to avoid undefined behaviours.

Change-Id: I5ef2c27926167ed22108901cd63586692a5f8f90
2016-06-13 11:27:37 +02:00
Bartosz Szczepanski 91422cb7e1 Revert "[NUCLEO_F030R8] 16-bit timer register update"
This reverts commit 01ff0b9ab7.
2016-06-13 11:27:37 +02:00
Bartosz Szczepanski ff1c172696 Revert "[NUCLEO_F070RB] 16-bit timer register update"
This reverts commit 82d82d0b2a.
2016-06-13 11:27:37 +02:00
Bartosz Szczepanski 3222d07d35 Partial revert of "[STM32Fxxx] Fix issue #816"
This is a partial revert of 07b841b and currently we are only reverting the
STM32F0xx family because new fix will be presented that's why we want to keep,
still the original solution only F1xx family (it will be fixed in future).

Change-Id: I147065299310c9fea499bf3ced8808a44699a1a1
2016-06-13 11:26:45 +02:00
svastm dd829053f9 [NUCLEO_L011K4] Move device.h defines to target.json 2016-06-13 10:30:18 +02:00
svastm dcfec47cfc [NUCLEO_L011K4] Add some tests 2016-06-13 10:24:19 +02:00
svastm c9bf3ca2fd [NUCLEO_L011K4] Add to the build and export scripts 2016-06-13 10:24:19 +02:00
svastm 062962a215 [NUCLEO_L011K4] Update HAL API 2016-06-13 10:24:19 +02:00
svastm f38c5e47f9 [NUCLEO_L011K4] Add HAL target 2016-06-13 10:24:19 +02:00
svastm c951f59993 [NUCLEO_L011K4] Add CMSIS target 2016-06-13 10:24:19 +02:00
Sam Grove 5acdad9fd7 Merge pull request #1907 from c1728p9/only_allow_one_thread_for_unsafe_stdlib
Only allow one thread for unsafe stdlib
2016-06-12 22:03:07 +01:00
Sam Grove f3c125fca2 Merge pull request #1910 from c1728p9/add_virtual_destructors
Add virtual destructor to classes
2016-06-12 21:37:30 +01:00
Russ Butler 58d15f3007 Add virtual destructor to classes
Add a virtual destructor to classes which have a virtual lock and
unlock.  Remove the virtual qualifier from functions in
InterruptManager since this class cannot be extended.
2016-06-12 21:33:31 +01:00
Martin Kojtal 7bb4378f2d Merge pull request #1901 from theotherjimmy/uvision4-alias
Add alias for uvision4 exporter
2016-06-12 22:00:16 +02:00
Mihail Stoyanov 5002c5b408 Updated requirements.txt file 2016-06-12 19:08:32 +01:00
Mihail Stoyanov 0034ffb716 Add tests to the config system. Add GCC flags to support uVisor 2016-06-12 19:04:41 +01:00
Russ Butler d0b7b3b497 Fix duplicate symbols for malloc lock and unlock
When the malloc lock and unlock functions are inside a library they
conflict with the standard libraries weak version of these functions.
This is because of the way weak references are handled by the linker.
This patch renames the lock and unlock functions defined inside RTX
so they do not conflict.  A thunk inside retarget.cpp then calls the
RTX functions.  This problem does not occur with retarget.cpp since
it is always build into an object file rather than a library file.
2016-06-12 18:18:41 +01:00
Russ Butler 3db2c030d2 Only allow one thread on unsafe standard libs
When using a standard library which does not support multi-threading
allow only one thread to be used.  This allows the code to remain
safe.
2016-06-12 18:18:40 +01:00
Russ Butler ba4834dcd0 Fix OS_TCB_SIZE
The define OS_TCB_SIZE does not match the real stack size.  This
leaves the system with less than OS_TASKCNT TCBs and prevents
a single thread configuration.  This updates OS_TCB_SIZE to the
correct value to fix the problem.
2016-06-12 18:18:38 +01:00
Russ Butler 2518eaeaf5 Move main stack to fix stack overflow detection
The main stack ends at the start of the heap.  In some configurations
this causes the guard word to be overwritten when memory is allocated.
This causes an OS error in RTX since it appears that the main stack
overflowed.

This patch moves the main stack to the upper 1/4th of the heap which
prevents the guard word from getting overwritten.
2016-06-12 18:18:32 +01:00
Sam Grove 95c83935ac Merge pull request #1908 from mbedmicro/tools-update
Aligned make.py and build.py options
2016-06-12 17:58:50 +01:00
Sam Grove 4dba251c33 Merge pull request #1896 from geky/align-stack-iar
Added warning about stack alignment limitations on IAR
2016-06-12 17:45:34 +01:00
geky 6c24601550 Merge pull request #1905 from geky/rtx-iar-svc-clobbered
[rtos] Fixed registers clobbered SVC_Handler in IAR
2016-06-12 17:27:03 +01:00
Mihail Stoyanov 8f4cb59002 Added script for detecting connected mbed targets/boards 2016-06-12 10:59:51 +01:00
Christopher Haster 70ebb6f16b [rtos] Fixed registers clobbered SVC_Handler in IAR
The rtx SVC_Handler for IAR clobbers r0-r3 despite the number of
arguments. However, in the SVC calls, the __swi function is declared
with fewer arguments. IAR doesn't understand that the other registers are
clobbered and stores variables in r0-r3 when multiple SVCs are
dispatched in a single function.

This bug was noticed in osThreadExit, which hard-faults on IAR,
preventing any threads from exiting.
2016-06-11 19:34:20 -05:00
Mihail Stoyanov 9dbf80722d Aligned make.py and build.py options 2016-06-12 01:06:15 +01:00
Mihail Stoyanov 36ac663fa2 Merge pull request #1906 from geky/config-features
[build tools] Added support for cumulative attributes in configs directly
2016-06-12 00:13:17 +01:00
Christopher Haster 2d38065e1f [build tools] Added support for completely overriding cumulative attributes 2016-06-11 15:45:11 -05:00
Christopher Haster 36904fad1f [build tools] Moved cumulative attributes into target overrides
Attributes now get the filtering provided by target_overrides:
{
    "name": "cmsis-nodejs-SQL-x86",
    "target_overrides": {
        "*": {
            "device_has": ["SILLY_STRING", "FIRE"]
        },
        "SHOE": {
            "features_add": ["SMELLS_FUNNY"],
            "features_remove": ["SMELLS_NICE"],
        }
    }
}

per @screamerbg
2016-06-11 15:30:26 -05:00
Christopher Haster e3bde44b87 [build tools] Added support for cumulative attributes in configs directly
in mbed_lib.json:
{
    "name": "cmsis-nodejs-SQL-x86",
    "features_add": ["SMELLS_FUNNY"],
    "features_remove": ["SMELLS_NICE"],
    "device_has": ["SILLY_STRING", "FIRE"]
}
2016-06-11 14:44:59 -05:00
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
Yoshihiro TSUBOI 3c2229a2b1 [HRM1017] Update exporting template
changed merging softdevice from s110 to s130
2016-06-11 08:06:06 +09:00
Jimmy Brisson e333f9008f Add alias for uvision4 exporter
it is now called both uvision (old name) and uvision4 (new alias)
2016-06-10 14:22:30 -05: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