Commit Graph

10922 Commits (eed1cec5d8df5aa1d11af458563c2e83260651cf)

Author SHA1 Message Date
Christopher Haster eed1cec5d8 FileSystem: Provided default implementations for all non-file operations 2017-06-03 13:18:01 -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
Sam Grove ebeb776de9 Merge pull request #3972 from geky/fat-big-blocks
FAT: Add support for block sizes of 512-4096 bytes
2017-06-03 10:16:43 -05:00
Sam Grove 027843a64b Merge pull request #4389 from c1728p9/assert_mutex_not_in_isr
Assert that mutexes and prints are not use in interrupt or critical context
2017-06-03 10:16:20 -05:00
Martin Kojtal 533e6f0feb Merge pull request #4431 from kjbracey-arm/mbed_lwip_api_compat
Restore mbed OS 5.4 mbed_lwip_ function prototypes
2017-06-03 08:28:52 +02:00
Christopher Haster c0aa841ffd FAT: Added support for block sizes of 512-4096 bytes
This is necessary for support of block devices with >512 byte
blocks, such as most SPI flash parts.

- Enabled support of up to 4096 byte blocks
- Added support for heap-backed buffers using _FS_HEAPBUF
  - Necessary to avoid stack overflows
  - Avoids over-aggresive allocations of _MAX_SS
- Enabled _FS_TINY to further reduce memory footprint
  - Haven't found a downside for this yet except for possible
    thread contention
2017-06-03 07:10:48 +01:00
Russ Butler 737c5a9cea Trap on errors when building with debug profile
Define MBED_TRAP_ERRORS_ENABLED to 1 for the debug profile so errors
are obvious when building as debug.
2017-06-02 23:50:40 -05:00
Russ Butler ee2be3f90c Ignore deprecated storage test
Add a .mbedignore to the storage_abstraction test since this is
deprecated.
2017-06-02 23:50:39 -05:00
Russ Butler cabc1e0911 Fix Thread class synchronization
Prevent osTheadTerminate from being called on an already terminated
thread. Also make sure the thread termination process is properly
synchronized.
2017-06-02 23:50:38 -05:00
Russ Butler 96bd943ea2 RTX5: Enable priority inheritance and robust mode
Add the attribute flash to enable priority inheritance and robust mode.
The robust flag allows mutexes held by terminated threads to be
properly released.
2017-06-02 23:50:36 -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 e48e599a9d Fix RTOS function prototypes by adding extern "C"
Wrap the file mbed_rtos_storage.h in extern "C". This allows the
functions inside rtx_lib.h to have correct definitions when included
in a C++ file.

This is required for the RTX5 error trapping.
2017-06-02 23:50:32 -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
Jimmy Brisson 2886f0b407 Merge pull request #4387 from theotherjimmy/override-target-attrs
Allow target attribute overrides in app config and pick toolchain with default_toolchain
2017-06-02 10:05:57 -05:00
Kevin Bracey 284843fdb3 Restore mbed OS 5.4 mbed_lwip_ function prototypes
External EMAC drivers are currently directly attaching to lwip_stack.c
via mbed_lwip_bringup et al. Restore the original prototypes to avoid
compatibility breakage.
2017-06-02 14:30:25 +03:00
Kevin Bracey 42cd1e1fac Make lwip_stack.c include its header
Fix some type mismatches that this revealed.
2017-06-02 14:29:34 +03:00
Jimmy Brisson 9277c6e564 Move profile processing into build_api 2017-06-02 12:05:01 +01:00
Jimmy Brisson caa50cb8a8 Allow overriding of non-cumulative target attributes 2017-06-02 12:03:53 +01:00
Sam Grove fa82a783a8 Merge pull request #4427 from 0xc0170/dev_remove_ticker
tests: remove ticker test
2017-06-02 04:22:31 -05:00
Martin Kojtal 3e0cdb966c tests: remove ticker test
This is temporary, as this test does not fit to some 16kB RAM devices. This requires few more steps: some small devices are using big async HAL structures, RTX changes increased the RAM footprint, plus this test seems to be too big. With all these, it won't fit in RAM regions for some devices.
2017-06-02 09:26:39 +01:00
Sam Grove 6b0db0d8c7 Merge pull request #4411 from hasnainvirk/add_to_namespace_mbed
Adding APIs to namespace mbed
2017-06-01 23:46:49 -05:00
Sam Grove 4c4fb822dd Merge pull request #4415 from theotherjimmy/disable-2-builds
Disallow building of mbed OS 2 + RTOS, and remove mbed OS 5 support for Cortext-A
2017-06-01 23:43:40 -05:00
Sam Grove fa0cd205a2 Merge pull request #4094 from pan-/fix_hal_ticker
[HAL] Add support for 64 bit us timestamp
2017-06-01 23:25:26 -05:00
Jimmy Brisson cee0cbd900 Remove Cortex-A mbed OS 5 support 2017-06-01 13:16:09 -05:00
Jimmy Brisson d8caee9077 Disallow building of mbed OS 2 + rtos 2017-06-01 13:16:03 -05:00
Vincent Coubard 045b026ad4 NCS36510 RTC driver: Fix driver.
* Initialization clear interrupt status
* Remove state in management of interrupt
* Handle timestamp in the past
* Handle current seconds, even if out of the relative timestamp.
* Simplify interrupt handling logic.
2017-06-01 16:33:49 +01:00
Vincent Coubard c6433b018a lp ticker test: Fix timestamp update during deepsleep test. 2017-06-01 16:31:48 +01:00
Hasnain Virk 91aab99727 Add APIs to namespace mbed
Certain public APIs are being added to mbed.h so as to make them
part of namespace mebd.

APIs being added are:

	* drivers/UARTSerial.h
	* platform/ATCmdParser.h
	* platform/mbed_poll.h
	* netsocket/nsapi_ppp.h
2017-06-01 15:17:53 +03:00
Martin Kojtal 9381a7af06 Merge pull request #4413 from theotherjimmy/fix-dep-bug
Fix a bug in dependency handling
2017-06-01 14:06:46 +02:00
Martin Kojtal 3553a4573a Merge pull request #4178 from nvlsianpu/getAddrFromPeerTab_sd_api_5
[NRF52840]: SecurityManager::getAddressesFromBondTable
2017-06-01 14:05:39 +02:00
Martin Kojtal e229a49182 Merge pull request #4207 from geky/spi-remove-byte-locking
spi: Add SPI block-write to C++ and HAL for performance
2017-06-01 14:03:36 +02:00
Martin Kojtal 9355531653 Merge pull request #4388 from c1728p9/deprecate_config_store
Deprecate config store and related libraries
2017-06-01 14:02:43 +02:00
Martin Kojtal 8a870a66c0 Merge pull request #4119 from hasnainvirk/cellular_feature_br
Cellular feature br
2017-06-01 14:01:17 +02:00
Martin Kojtal c674ee2290 Jenkinsfile: remove client app test temporarily
This should be fixed as soon as client and its dependencies
are updated to resolve conflicts there. We expect this to be reverted asap.
2017-06-01 12:15:09 +01:00
Vincent Coubard 6fe07c640f Ticker NCS36510: Fix tests of the status register. 2017-05-31 19:16:05 +01:00
Vincent Coubard f52da48d95 TimerEvent: Use ticker_insert_event_us instead of the old API in
insert_absolute.

With this patch, event insertion should be more precise.
2017-05-31 19:14:21 +01:00
Vincent Coubard 3e24e8fa62 lp_ticker test: Capture completion time at completion point. 2017-05-31 19:13:10 +01:00
Jimmy Brisson 07a6c07408 Revert "Disable Cortex-A in tooling to provide better error messages"
This reverts commit f5859b308b.
2017-05-31 13:06:30 -05:00
Russ Butler 58041a215d Deprecate config store and related libraries
Deprecate configuration-store, flash-journal and
storage-volume-manager for the 5.5 release. Also disable the
storage tests.
2017-05-31 12:08:11 -05:00
Jimmy Brisson 944a17fe3c Merge pull request #4402 from LMESTM/STM32_F2_CUBE_v160
Stm32 f2 cube sdk update to v1.6.0
2017-05-31 11:28:36 -05:00
Jimmy Brisson 99bc80d3b3 Merge pull request #4403 from 0xc0170/fix_mbed_version
mbed: version macros are not defined on master
2017-05-31 11:27:19 -05:00
Jimmy Brisson b46b6c34aa Merge pull request #4321 from hanno-arm/update-mbedtls
Update mbed TLS to version 2.5.0
2017-05-31 11:26:36 -05:00
Jimmy Brisson 4806229090 Fix bug in dependency handling 2017-05-31 09:54:09 -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 b51fbe817b mbedtls md5 or lwip internal crypt Fudge
Some targets define MBEDTLS_md5_C in targets.json in order to force the system to use
external mbedtls instead of lwip internal crypt, i.e.,  polarssl.
LWIP's internal md5 mechanism is tied to PPP  for some reason. In a previosly merged commit
an attempt was made to steal md5 functions by faking that PPP was turned on. However
that solution was broken in case of really turning on PPP  functionality.

This commit fixes the breakage and also corrects the logic in case a target decides to use
external md5 implementation from mbedtls or otherwise (i.e, wants to stick to the internal
implementation).
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