Commit Graph

12376 Commits (c022c4a8f06d2b11681d028be049b0ee115f4853)

Author SHA1 Message Date
Christopher Haster e798c5359e bd: Changed BlockDevice erase to default as no-op
This should help with confusion around devices that don't have
a physical erase operation, such as SD cards and spinny disks.
2017-09-05 11:16:15 -05:00
Jimmy Brisson 94fb4a3aad Merge pull request #4929 from bcostm/adc_sampletime_vrefint
STM32F4: Increase ADC sample time for VREF
2017-09-05 11:15:53 -05:00
Yuguo Zou 67f1ee5343 Resolve including directory issue in GCC linker script for Ameba
Should not make assumption of specific directory when include .h from
linker script
2017-09-05 19:11:38 +08:00
Laurent MEUNIER f2eb77a81a STM32_us_ticker_16b: reset counter when fire interrupt
Fixing regression introduced in commit
"Ticker: add fire interrupt now function".

In above mentioned commit, the management of timestamp being in the past
has been moved to higher layer (hal/mbed_ticker_api.c), but the reset of
oc_int was missing when implementing the new us_ticker_fire_interrupt
function - which is fixed now.
2017-09-05 13:03:21 +02:00
Laurent MEUNIER 5997811d46 STM32: F2: put can_s struct under DEVICE_CAN option
In case of F2 devices without CAN support.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 04ac65a4e6 STM32: CAN: restore registers after can_reset
After reset the MCR register content needs to be restored so we're
introducing the can_registers_init function to be called at the first
init stage, but also after reset. We also store the can frequency to
go through the initialisation phase again.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 8357f6fe77 STM32: CAN: store the mode in object context
In order to apply the same mode in case of reset, we store the current
requested mode in the HAL structure.

To make storage in a single place, we also change can_monitor to call
can_mode function as they actually acting on same registers.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 57222b604f STM32: CAN: do not overwite BTR register when setting frequency
BTR register has other bits than the ones calculated and set through
the can_speed function, so let's take care to only write to the
right registers.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 759642af8e STM32: Define CAN handle as part of can object
Instead of a static object, this will make driver
instantiation more robust and allow to re-use init
configuration on a need basis.

The CANName struct member is actually the CAN registers base address,
which is now available in the CanHandle.Instance field, so we don't need
CANName anymore.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 66162c6b1d STM32: move can_s definition to common_objects.h
This will ease up further changes to the structure.
2017-09-05 10:27:21 +02:00
Russ Butler b2384b1629 Remove use of internal RTX types
Make calls to cmsis-os to get thread state, stack size, and max stack
usage rather than accessing internal RTX data directly. Wrap RTX5
specific code in OS_BACKEND_RTX5.

Also refactor the code to use mbed types rather than RTX types:
os_timer_t -> mbed_rtos_storage_timer_t
os_event_flags_t -> mbed_rtos_storage_event_flags_t
osRtxMutex_t -> mbed_rtos_storage_thread_t
2017-09-04 11:26:38 -05:00
Martin Kojtal 5bddd881e9 Merge pull request #4406 from kjbracey-arm/shared_equeues
mbed_events.h: Add ability to request a shared event queue
2017-09-04 16:55:50 +01:00
Martin Kojtal abafc6e7df Merge pull request #4580 from deepikabhavnani/wifi_34
Use EventFlags instead of Semaphores
2017-09-04 16:54:55 +01:00
Martin Kojtal 18f79bfad7 Merge pull request #4907 from Patater/m487
Update uVisor to v0.30.0
2017-09-04 16:53:14 +01:00
Martin Kojtal c0fe3b5109 Merge pull request #4911 from mikaleppanen/lwip_ipv4v6_ppp
Support cellular IPv4v6 dual stack in LWIP
2017-09-04 16:52:55 +01:00
Martin Kojtal 3f347ed290 Merge pull request #4843 from geky/fat-min-block
fatfs: Add lower bound to block sizes
2017-09-04 16:52:05 +01:00
Martin Kojtal b0dd984493 Merge pull request #4939 from c1728p9/crash_on_boot
Fix crashes on boot on some Kinetis devices
2017-09-04 16:51:22 +01:00
Martin Kojtal 4ccff693ae Merge pull request #4962 from 0xc0170/dev_critical_section
platform: add CriticalSectionLock
2017-09-04 16:50:59 +01:00
Martin Kojtal 5b4e0b30df Merge pull request #4963 from NXPmicro/Fix_NVIC_NUM_VECTORS
K66F,KW24D,K22F,K64F: Fix NVIC_NUM_VECTORS value
2017-09-04 16:50:32 +01:00
Martin Kojtal 675a17cff2 Merge pull request #4980 from LMESTM/stm32_flash_update
Stm32 flash update
2017-09-04 16:49:18 +01:00
Martin Kojtal c291973f49 Merge pull request #4933 from 0xc0170/fix_stats_depth
test: fix stats depth variable scope
2017-09-04 16:48:53 +01:00
Martin Kojtal eefb84c0db Merge pull request #5003 from c1728p9/restructure_rtx
Move Cortex specific RTX behind TARGET_CORTEX
2017-09-04 16:48:16 +01:00
Martin Kojtal 0fec52de94 Merge pull request #5001 from anttiylitokola/master
Update mbed-coap to version 4.0.10
2017-09-04 16:47:10 +01:00
Martin Kojtal fc4afabab3 Merge pull request #4934 from Patater/stm32f439xi-aes-hw-disable
mbedtls: STM32F439xI: Don't enable AES acceleration by default
2017-09-04 16:46:24 +01:00
Hasnain Virk fce2ca2122 Adjusting Stack size Allocation (IAR, LPC176x)
Since mbed-os 5.4.3, something increased foot print of mbed-os and the applications that were barely fitting in started to spill.

IAR toolchain for LPC176x target family is set to use 2 RAM regions (32K each). RAM region
2 is being used for ETH/USB and 1 is being used for vector table, stack/heap/static data.

In this commit we have decreased heap size allocation from 8K to 7K so that the is more room for stack and static data.
2017-09-04 14:54:42 +03:00
Jan Jongboom 72262ca0b3 MTS targets: Don't use any printf() calls when NDEBUG is defined, prevents linking out printf() and friends in release build 2017-09-04 12:05:41 +01:00
Laurent MEUNIER b01cc966b0 Introduce TIMEOUT_1_BYTE
This makes the code more explicit about what is last parameter of
HAL_SPI_Transmit/HAL_SPI_Receive functions.
2017-09-04 11:16:49 +02:00
Russ Butler b402b7a8c6 Fix crash on boot due to vector size mismatch
If NVIC_NUM_VECTORS is larger than the space allocated by the vector
table in ram (__ram_vector_table_size__) then the call to mbed_cpy_nvic
during boot will corrupt valid data, which can lead to a crash. This
patch fixes the declared number of vectors on the KL27Z, KL43Z and
KL82Z to fix this crash.
2017-09-01 18:43:38 -05:00
Kevin Gilbert 41000e091c Add LED color remapping definitions to Odin target 2017-09-01 17:00:24 -05:00
Kevin Bracey b55af5c620 Use shared event queue for timer
Don't create our own timer thread - use the shared event queue.
2017-09-01 13:26:09 +03:00
Kevin Bracey eb80c25398 Add ability to request a shared event queue
To allow components with a simple need to schedule a few events to not
have to create their own threads, with all the associated memory
overhead, add 2 central calls to get shared normal and an
interrupt-deferral event queues, each dispatched on their own shared
threads.

For non-RTOS systems, just the normal event queue is provided, and the
application would have to dispatch this itself. This
application-dispatch is also available via a config option, to
potentially save memory by reusing the main thread.

Possible future improvement: the ability for separate components to
request a minimum stack size, and have the JSON combine these requests.
(Analogous tooling has already been mooted for mbed TLS config options
like key size).
2017-09-01 13:26:08 +03:00
JojoS 32c56b2743 added support for targets with extra SDK
some targets need an additional SDK.
2017-09-01 09:45:42 +02:00
JojoS d00d6f412a add support for K64F target
added template for K64F
2017-09-01 09:43:36 +02:00
JojoS 2615982b3a applied patch from mmahadevan108
- fixes invalid char '#' in linker script
- added 'mbedclean'
2017-09-01 09:41:12 +02:00
Russ Butler ac22225ad9 Move Cortex specific RTX behind TARGET_CORTEX
Update directory structure to include RTX for only cortex targets, and
for all cortex targets. This patch accomplishes this by moving mbed-os
specific RTX files and RTX itself into rtos/TARGET_CORTEX along with
removing TARGET_CORTEX_M from the RTX5 directory.

The old directory structure:

rtos/rtx5/<mbed-os specific RTX files>
rtos/rtx5/TARGET_CORTEX_M/*
rtos/rtx4/*
rtos/<mbed-os specific RTX files>

Is re-arranged to:

rtos/TARGET_CORTEX/rtx5/*
rtos/TARGET_CORTEX/rtx4/*
rtos/TARGET_CORTEX/<mbed-os specific rtx files>

This both encapsulates RTX code more cleanly and makes it easier to
experiment with non-cortex cmsis-os2 backends, such as a posix
based cmsis-os2 backend.

Note - A potentially better name for the CORTEX_M directory would be
something like FEATURE_RTX5 since this directory only contains RTX5
related files. This cannot be done because there is not an easy way
to turn this feature on, since it cannot be done from mbed_lib.json.
2017-08-31 19:55:54 -05:00
Martin Kojtal b99e6b5f7a Pass stats depth to singletest correctly
Fixes #4930
2017-08-31 10:41:20 -05:00
Antti Yli-Tokola e7c8a4d71f Update mbed-coap to version 4.0.10
Fixes following error: IOTMAC-615 Node mDS registration failure during OTA transfer
2017-08-31 17:02:40 +03:00
gorazd 7773acd78c arduino connector namings added 2017-08-31 15:18:14 +02:00
Maciej Bocianski ae0b90f440 Extends test set for Mail class 2017-08-31 15:04:36 +02:00
Kevin Bracey 65639e80fc Reduce K64F Ethernet driver to 1 thread
Save 1K of RAM by using only 1 thread for RX and TX, and
running the PHY check in lwIP's context.
2017-08-31 13:05:28 +03:00
Kevin Bracey 5a7405e1a3 Correct LWIP_DEBUG definition
Commit f602c936 incorrectly started defining LWIP_DEBUG as either 0 or
1.

lwipopts.h locally was changed to use #if, but all existing users
continued to use #ifdef. Therefore defining it to 0 was accidentally
enabling it for quite a few users.

This would have pulled in some unwanted lwIP code, and affected some
drivers, eg k64f_emac.c allocating an extra 2K of stack.

Correct lwipopts.h to either define it as 1 or leave it undefined, and
change the #if tests back to #ifdef, so all are consistent.
2017-08-31 11:51:10 +03:00
Boting Ren 04461acf5e Remove HAL_GetUID_12Bytes function from stm32l4xx_hal layer. 2017-08-31 15:21:22 +09:00
Boting Ren 87ce631490 Fix a parse error at targets/targets.json. 2017-08-31 11:18:31 +09:00
0x6d61726b 4434569719 Build with external tool fails: missing includes
When building with VisualGDB the compilation fails due to the lack of required include files Dir.h and File.h.
Compiler report:

1>------ Build started: Project: exported-mbed-STM32F429-nucleo, Configuration: Debug VisualGDB ------
1>  FileSystem.cpp
1>  mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'class Managed<mbed::File>':
1>  mbed-os\features\filesystem\FileSystem.cpp(141,19): note :   required from here
1>mbed-os\features\filesystem\FileSystem.cpp(130,7): error :  invalid use of incomplete type 'class mbed::File'
1>   class Managed : public F {
1>         ^~~~~~~
1>  mbed-os\features\filesystem\FileSystem.cpp(18):
1>  mbed-os\features\filesystem\FileSystem.h(39,7): note :  forward declaration of 'class mbed::File'
1>   class File;
1>         ^~~~
1>  mbed-os/features/filesystem/FileSystem.cpp: In member function 'virtual int mbed::FileSystem::open(mbed::FileHandle**, const char*, int)':
1>mbed-os\features\filesystem\FileSystem.cpp(141,19): error :  cannot convert 'Managed<mbed::File>*' to 'mbed::File*' in initialization
1>       File *f = new Managed<File>;
1>                     ^~~~~~~~~~~~~
1>mbed-os\features\filesystem\FileSystem.cpp(142,16): error :  invalid use of incomplete type 'class mbed::File'
1>       int err = f->open(this, path, flags);
1>                  ^~
1>  mbed-os\features\filesystem\FileSystem.cpp(18):
1>  mbed-os\features\filesystem\FileSystem.h(39,7): note :  forward declaration of 'class mbed::File'
1>   class File;
1>         ^~~~
1>mbed-os\features\filesystem\FileSystem.cpp(144,16): warning :  possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
1>           delete f;
1>                  ^
1>mbed-os\features\filesystem\FileSystem.cpp(141,11): warning :  'f' has incomplete type
1>       File *f = new Managed<File>;
1>             ^
1>  mbed-os\features\filesystem\FileSystem.cpp(18):
1>  mbed-os\features\filesystem\FileSystem.h(39,7): note :  forward declaration of 'class mbed::File'
1>   class File;
1>         ^~~~
1>  mbed-os\features\filesystem\FileSystem.cpp(144,16): note :  neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
1>           delete f;
1>                  ^
1>mbed-os\features\filesystem\FileSystem.cpp(148,13): error :  cannot convert 'mbed::File*' to 'mbed::FileHandle*' in assignment
1>       *file = f;
1>               ^
1>  mbed-os\features\filesystem\FileSystem.cpp(18):
1>  mbed-os\features\filesystem\FileSystem.h(39,7): note :  class type 'mbed::File' is incomplete
1>   class File;
1>         ^~~~
1>  mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'class Managed<mbed::Dir>':
1>  mbed-os\features\filesystem\FileSystem.cpp(153,18): note :   required from here
1>mbed-os\features\filesystem\FileSystem.cpp(130,7): error :  invalid use of incomplete type 'class mbed::Dir'
1>   class Managed : public F {
1>         ^~~~~~~
1>  mbed-os\features\filesystem\FileSystem.cpp(18):
1>  mbed-os\features\filesystem\FileSystem.h(38,7): note :  forward declaration of 'class mbed::Dir'
1>   class Dir;
1>         ^~~
1>  mbed-os/features/filesystem/FileSystem.cpp: In member function 'virtual int mbed::FileSystem::open(mbed::DirHandle**, const char*)':
1>mbed-os\features\filesystem\FileSystem.cpp(153,18): error :  cannot convert 'Managed<mbed::Dir>*' to 'mbed::Dir*' in initialization
1>       Dir *d = new Managed<Dir>;
1>                    ^~~~~~~~~~~~
1>mbed-os\features\filesystem\FileSystem.cpp(154,16): error :  invalid use of incomplete type 'class mbed::Dir'
1>       int err = d->open(this, path);
1>                  ^~
1>  mbed-os\features\filesystem\FileSystem.cpp(18):
1>  mbed-os\features\filesystem\FileSystem.h(38,7): note :  forward declaration of 'class mbed::Dir'
1>   class Dir;
1>         ^~~
1>mbed-os\features\filesystem\FileSystem.cpp(156,16): warning :  possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
1>           delete d;
1>                  ^
1>mbed-os\features\filesystem\FileSystem.cpp(153,10): warning :  'd' has incomplete type
1>       Dir *d = new Managed<Dir>;
1>            ^
1>  mbed-os\features\filesystem\FileSystem.cpp(18):
1>  mbed-os\features\filesystem\FileSystem.h(38,7): note :  forward declaration of 'class mbed::Dir'
1>   class Dir;
1>         ^~~
1>  mbed-os\features\filesystem\FileSystem.cpp(156,16): note :  neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
1>           delete d;
1>                  ^
1>mbed-os\features\filesystem\FileSystem.cpp(160,12): error :  cannot convert 'mbed::Dir*' to 'mbed::DirHandle*' in assignment
1>       *dir = d;
1>              ^
1>  mbed-os\features\filesystem\FileSystem.cpp(18):
1>  mbed-os\features\filesystem\FileSystem.h(38,7): note :  class type 'mbed::Dir' is incomplete
1>   class Dir;
1>         ^~~
1>  mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'int Managed<F>::close() [with F = mbed::Dir]':
1>  mbed-os\features\filesystem\FileSystem.cpp(162,1): note :   required from here
1>mbed-os\features\filesystem\FileSystem.cpp(133,27): error :  incomplete type 'mbed::Dir' used in nested name specifier
1>           int err = F::close();
1>                     ~~~~~~~~^~
1>  mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'int Managed<F>::close() [with F = mbed::File]':
1>  mbed-os\features\filesystem\FileSystem.cpp(162,1): note :   required from here
1>mbed-os\features\filesystem\FileSystem.cpp(133,27): error :  incomplete type 'mbed::File' used in nested name specifier
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
2017-08-30 17:21:53 +02:00
Akos Kiss 90b326a664 Fix BLE API docs
Some misguidances, some typos, some stylistics, some doxygen misuses.
2017-08-30 11:15:39 +02:00
gorazd 40b0d961b6 extra label deleted 2017-08-30 08:16:08 +02:00
Deepika beb5aac640 RTOS: Add EventFlags class
EventFlags class is a wrapper for Event Flag functionality introduced in
RTOS2/RTX5.
2017-08-29 14:07:44 -05:00
Jimmy Brisson 4978a08ae2 Merge pull request #4960 from artokin/master
Nanostack update for mbed-os-5.6
2017-08-29 13:46:47 -05:00
Jimmy Brisson 2d65f49f61 Merge pull request #4954 from c1728p9/fix_isr_clear
Fix ISR powerdown in mbed_application.c
2017-08-29 13:46:25 -05:00
Jimmy Brisson 82f5ce22f8 Merge pull request #4951 from JanneKiiskila/ublox_odin_buttons
UBLOX_EVK_ODIN_W2- add BUTTON1/2 definitions
2017-08-29 13:46:10 -05:00