Commit Graph

12360 Commits (5a6aee43eb58c9ba3b1d2de7d178a3d68867a0da)

Author SHA1 Message Date
Jimmy Brisson 91afbce18a Correct Nuvoton compiler detection logic 2017-09-11 13:20:33 -05:00
Jimmy Brisson 75549754bc Compile source code for Maxim targets
They don't link because of differences in the precompiled libraries
2017-09-11 13:20:32 -05:00
Jimmy Brisson fb53eb65d4 Correct Silabs NVIC selection
Again, the culprit was that the discriminant did not include armc6
2017-09-11 13:20:32 -05:00
Jimmy Brisson 0b7a9033b5 Enable many STM devices with ARMC6
Yet another incorrect arm vs gcc discriminant
2017-09-11 13:20:32 -05:00
Jimmy Brisson b22a174c39 Correct semihosting check for ARMC6 2017-09-11 13:20:32 -05:00
Jimmy Brisson 4da4c1f5ce Correct compiler switching in Nordic code 2017-09-11 13:20:32 -05:00
Jimmy Brisson cd4fd86f1f Correct Freescale + NXP compiler detection macros
Also removes duplication of common files
2017-09-11 13:20:32 -05:00
Jimmy Brisson f4b7d8ba77 Avoid forcing preprocessing
We avoid forcing preprocessing by not replacing the first line when it's
not a shebang (#!). Should work pretty darn well.
2017-09-11 13:20:32 -05:00
Jimmy Brisson 06b00683c3 Genericify arm compiler exporter to versions 5 + 6 2017-09-11 13:20:32 -05:00
Jimmy Brisson e9d3166a5e Expose present get_compile_options API in Toolcahins 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
Jimmy Brisson 1fef5553b4 Parse deps the same for GCC_ARM and ARMC6 2017-09-11 13:17:54 -05:00
Jimmy Brisson 98b4768434 Initial toolchain class for ARMC6
While ARMC6 does use the same linker (armlink) as ARM Compiler 5, it
is not compatible.

The reason for this incompatibility are twofold:
 * armlink may invoke the C preprocessor by adding a shebang
   (`#!`) to the top of their input files.
 * ARMC6 and ARMC5 differ in how you invoke the preprocessor:
   * ARMC5: `#! armcc -E`
   * ARMC6: `#! armclang -E`

This forces the tools to rewrite the shebang if it's wrong.

This does not yet handle dependencies properly
2017-09-11 13:17:54 -05:00
Deepika ca1f24cc0e Add -mcmse flag for GCC and improved logic for cpu core 2017-09-11 11:49:28 -05:00
Deepika 9422c351e4 Initial RTX and tools support for Cortex M-23/M-33 devices 2017-09-11 11:43:26 -05:00
Deepika 65150b62b9 Added assert for malloc 2017-09-11 11:41:34 -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
adbridge 6bd28ecb68 Remove string literal values and revert back to using CTX macro .
The previous fix to replace CTX with string literals was the wrong
solution. All that was actually required was to insert a space before
the macro.
2017-09-11 11:13:54 +01:00
Russ Butler cf8d6c49a7 Fix errors on NCS36510 after deep sleep
Add NOPs after deep sleep to prevent unexpected behavior. It appears
that the first one or two instructions after deep sleep do not get
executed properly.

Note - This is a temporary workaround. For a more robust solution
the NCS36510 needs to investigate the root cause of this issue.
2017-09-10 22:25:12 -05:00
Russ Butler f746fc5bac Allow lp_ticker test to coexist with TimerEvents
The lp_ticker test overrides the default ticker handler for the
low power ticker. This stops all other low power TimerEvents in the
system, including the ones for tickless, from getting called. Because
of this devices with tickless enabled malfunction during this test.

This patch fixes this problem by passing all lp ticker events it did
not trigger on to the TimerEvent irq handler.
2017-09-10 17:06:46 -05:00
Deepika 0132d31124 Fix IAR8 : user-defined literal operator not found
Cellular example had build issues with IAR8, combination of define and string
as argument to send function resulted in above error. Typecasting to const char *
didn't help, hence replacing the define explicitly.
2017-09-10 09:58:34 -05:00
Russ Butler acf428200f Turn off tickless for the NCS36510
The NCS36510 is not suitable for tickless, since its LP ticker cannot
be scheduled fast enough. This is because it takes four 32KHz clock
cycles before these writes take effect - ~120us.
2017-09-09 20:43:37 -05:00
Russ Butler 30450d40d6 Decrease error in Timeout test due to ISR latency
Increase the Timeout period from 1ms to 10ms so interrupt latency has
1/10th the effect on the measurement. This prevents failures due to
interrupt latency causing a drift.
2017-09-09 20:43:36 -05:00
Russ Butler d9aff6f0dd Prevent deeps sleep in regular sleep test case
Lock deep sleep before calling sleep to prevent the device from
entering deep sleep mode.
2017-09-09 20:43:35 -05:00
Martin Kojtal 78718910d3 Ticker: invoke _function only if attached 2017-09-09 20:42:57 -05:00
Martin Kojtal deb1febb8b sleep manager test: fix Thread stack size
Decrease the default stack size as it's not needed for purposes of testing.
2017-09-09 20:42:55 -05:00
Jimmy Brisson 3f2e986256 Merge pull request #5012 from LMESTM/issue5004_ticker_16b
STM32_us_ticker_16b: keep code to cope with past event
2017-09-09 12:09:25 -05:00
Jimmy Brisson e0bc631a0a Merge pull request #4991 from c1728p9/tickless
Add tickless to some mbed-os devices
2017-09-08 14:30:39 -05:00
Jimmy Brisson e5638b7272 Merge pull request #5055 from 0xc0170/fix_ssltravis
Travis: fix the latest breakage - use group:
2017-09-08 13:40:33 -05:00
Jimmy Brisson a108adf396 Merge pull request #4916 from JojoS62/add_MCUXpresso_exporter
Add mcuxpresso exporter
2017-09-08 09:44:25 -05:00
Martin Kojtal 42a6dd00d8 Travis: fix the latest breakage - use group:
See https://blog.travis-ci.com/2017-08-29-trusty-image-updates
2017-09-08 13:50:56 +01:00
Russ Butler 48a0489955 Enable tickless for a subset of devices
Enable tickless on nrf5x devices and the NCS36510.
2017-09-07 21:35:07 -05:00
Russ Butler 72f07ec4d9 Make room on stm32f07 for tickless
Decrease the interrupt stack from 2k down to 1k so there is enough
ram to build all the tests with tickless enabled. In general, targets
should not need an interrupt stack greater than 1k with mbed-os.
2017-09-07 21:35:06 -05:00
Russ Butler c3eae587eb Add tickless support for devices without SysTick
Some Cortex-M0 devices, such as the nrf51, don't have the SysTick.
Instead, these targets use a software interrupt to simulate SysTick.
Add the hooks in the tickless code to support these devices. Targets
which do not have SysTick should now define NO_SYSTICK in targets.json
and implement mbed_get_m0_tick_irqn to add os suport.

This patch also removes os tick handling from the existing devices
(nrf51) since this is now handled in common code.
2017-09-07 21:35:04 -05:00
Russ Butler e44d94fa1e Add initial support for tickless RTX
Add support for tickless by replacing RTX's SysTick timer code with
with code which uses an mbed timer along with suspending and
resuming the kernel in the idle loop. Tickless is enabled on a
per-target basis by defining the macro MBED_TICKLESS.
2017-09-07 21:34:57 -05:00
Jimmy Brisson e12f116ec1 Merge pull request #4912 from 0xc0170/dev_sleep_drivers
Add sleep manager API
2017-09-07 18:26:49 -05:00
Martin Kojtal f6c34a2303 SerialBase and CAN: fix Callbacks comparision
As Callback currently does not have fully functional comparision (see #5017),
we workaround by doing null check.
2017-09-07 15:35:08 +01:00
Martin Kojtal 39f31c3195 idle loop: add deepsleep locks
For backward compability, we invoke just sleep mode. Adding critical section to complete
lock/unlock deepsleep section.
2017-09-07 15:35:07 +01:00
Martin Kojtal c5a41d83c2 test: add sleep manager tests
This commits contains two tests:
- race condition
- deep sleep locking/unlocking
2017-09-07 15:35:07 +01: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 5b33d2583d drivers: fix attach sleep locking
attach/detach can be multiple invoked. Therefore lock/unlock deep sleep
only for the very first time it is invoked (when callbacks
are actually changed).
2017-09-07 15:35:06 +01:00
Martin Kojtal e57f0bcd26 Drivers: locking sleep fix for attach/detach
As attach provides API to change a callback, lock/unlock should
only happen if we are doing the first/last callback (start-stop).
2017-09-07 15:35:05 +01:00
Martin Kojtal e6d8a9a8a4 Drivers with interrupts: adding sleep deep locking
Any driver with attach or async API should be considered for deep sleep.

Add locking to those that require in most cases
high-frequency clocks:

- CAN
- I2C
- SPI
- Serial
- Ticker/Timeout/Timer
2017-09-07 15:35:05 +01:00
Martin Kojtal fcdb04351f Sleep: add deepsleep locks for !DEVICE_SLEEP
If a target do not support sleep (no DEVICE_SLEEP defined),
we provide empty deep sleep locking.
2017-09-07 15:35:04 +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
Martin Kojtal 814eaa99fe Merge pull request #5030 from chrissnow/uVision-LDFlags
Export uVision linker flags so that bootloader projects build correctly
2017-09-07 12:46:35 +01:00
Martin Kojtal 8dfb491bb1 Merge pull request #4958 from soramame21/master
Add bootloader support for DISCO_L476VG
2017-09-07 12:46:08 +01:00
Yuguo Zou ba3bb7ea35 Remove unused code
Clean rtl8195a_init.c a little bit
2017-09-07 15:10:08 +08:00
Yuguo Zou 22269ad12c Increase tcpip thread stacksize for REALTEK_RTL8195AM
The default stack size is not enough for debug profile (low compiler
optimization)
2017-09-07 11:07:13 +08:00