Commit Graph

68 Commits (2deb3706d2ecbcec2166b04fa0c56bc133e4d34f)

Author SHA1 Message Date
Toyomasa Watarai d05b7f51d8 Fixed crash issue in RawSerial::printf for uARM
Fixed crash issue in RawSerial::printf() function for microlib platforms
since microlib doesn't fully support C99 functions such as vsnprintf().
2014-08-25 16:13:43 +09:00
Martin Kojtal a681b14416 Change "error.h" to "mbed_error.h" to avoid conflicts with 3rd party code 2014-08-15 16:19:18 +01:00
Alexander Valitov cde156cadc Added implementation for "rename" on FAT file system 2014-08-13 10:20:31 +01:00
Andreas Løve Selvik f3de4bc529 Bugfix: Make redirected stdio write initialize UART
Calling a scanf before the first printf would end up calling serial_getc without initializing the UART.
2014-07-29 11:47:46 +02:00
fritzprix 8c7e738263 - fix some type mismatch which causes error in build time 2014-07-17 23:38:34 +09:00
Martin Kojtal 09251dd3ba Revert "error.h -> mbed_error.h" 2014-07-08 14:04:50 +02:00
0xc0170 f7f77392d9 error header file rename to mbed_error.h 2014-07-04 08:05:49 +02:00
Bogdan Marinescu 0b5a92fbc5 Merge pull request #352 from 0xc0170/dev_error_header_inclusion
Error header inclusion in the error code file - fix.
2014-06-12 10:07:36 +01:00
0xc0170 d6c10d1cd2 mbed interface header inclusion in board.c 2014-06-12 09:46:24 +01:00
Bogdan Marinescu c694da0543 Merge branch 'dev_error_assert' of git://github.com/0xc0170/mbed into 0xc0170-dev_error_assert
Conflicts:
	libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/serial_api.c
	workspace_tools/toolchains/arm.py
2014-06-11 15:50:34 +01:00
0xc0170 2e05e5cc07 Error header inclusion in the error code file - fix.
- weak declarations removal from code files
2014-06-11 14:23:55 +01:00
0xc0170 9017b27778 mbed common - trailing white spaces removal 2014-05-29 15:11:05 +02:00
0xc0170 3ce40e2f75 License headers for new assert files. 2014-05-29 08:59:19 +02:00
0xc0170 be43ebc182 MBED_ASSERT - mbed assert implementation 2014-05-28 15:39:44 +02:00
0xc0170 6a84ffa433 Merge branch 'master' into dev_error_assert
Conflicts:
	libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20D5M/spi_api.c
	libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_api.c
	libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/gpio_api.c
	libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/analogin_api.c
	libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_api.c
	libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/i2c_api.c
	libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/pwmout_api.c
	libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/serial_api.c
	libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/spi_api.c
	libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/i2c_api.c
	libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/i2c_api.c
	libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/i2c_api.c
2014-05-28 09:53:51 +02:00
Rohit Grover f65b7d9077 removing warnings discovered by using -Weffc++ flag for gcc 2014-05-26 18:04:46 +01:00
0xc0170 d843d56c08 [ALL TARGETS] error replaced by assert for preconditions 2014-05-20 14:20:37 +01:00
Bogdan Marinescu 4d4ac9cd81 Fixed LPC11U68 flow control issue 2014-05-15 17:12:28 +01:00
0xc0170 09fe00f041 gpio and pinmap - asserts for NC as parameters (not init), abort retarget
- retarget - abort - calls mbed_die
	- asserts added to gpio mbed hal for all targets
2014-05-15 15:30:14 +01:00
Bogdan Marinescu 65be1ee4a1 Merge pull request #247 from Sissors/master
Mode added to BusIn + allow creation of NC pins
2014-04-14 11:23:24 +01:00
sg- b64e32299f add fflush to exit
enable DEVICE_STDIO_MESSAGES on k64f
remove all line endings from error messages throughout mbed sdk (all targets)
2014-04-09 16:24:13 -05:00
sg- e20949093c added '\n' to error("") calls for all freescale targets and common source 2014-04-09 01:14:41 -05:00
Sissors fc0a2cf35e Mode added to BusIn + allow creation of NC pins
Now BusIn can also use PullUp, etc, instead of only BusInOut.

If the pin is NC, it does get to the init, but all write/mode functions
are disabled. This is how it used to be in the old gpio version. Quite
some libraries allow users to make pins NC, and they are all locking up
with the current mbed version. This is far from a perfect solution, but
more a temporary fix.
2014-04-03 09:22:51 +02:00
neilt6 e57e69c772 Changed error(...) to a weak function
Made error(...) a weak function so that it can be overridden in
production projects. Also fixed several serial_api.c files that required
stdlib.h, but were getting it from error.h.
2014-03-31 10:27:14 -06:00
tkuyucu 1f962a16a4 Fixed syntactic bug in board.c 2014-03-13 12:37:09 +01:00
tkuyucu 4086fa09d9 merge with mbedmicro 2014-03-13 12:28:59 +01:00
tkuyucu 0f68519f85 Update after hex enabled firmware release
Removed SystemInit write to FWID.
Added DEVICE_ERROR_PATTERN for error signaling.
Exception for NRF added to board.c to keep irqs enabled since timer irq
is needed for the wait function.
Button pin names changed from BUTTON0 to BUTTON1 and from BUTTON1 to
BUTTON2.
2014-03-13 10:59:09 +01:00
tkuyucu 026b6610a8 Merge remote-tracking branch 'upstream/master'
Conflicts:
	libraries/tests/mbed/portinout/main.cpp
	libraries/tests/mbed/portout_portin/main.cpp
	libraries/tests/mbed/sd/main.cpp
	libraries/tests/mbed/spi_slave/main.cpp
	workspace_tools/targets.py
	workspace_tools/toolchains/arm.py
	workspace_tools/toolchains/gcc.py
	workspace_tools/toolchains/iar.py
2014-02-07 11:04:50 +01:00
tkuyucu 804188a6f7 Clean up and Reformatting
Unused header files are removed from the cmsis dir.
Tab characters replaced by 4 spaces.
Brackets and parenthesis formatted.
Spi slave functions updated for faster response.
2014-02-03 10:33:34 +01:00
Bogdan Marinescu 2665d5bac4 Modified call-before-main mechanism
Added a new function (mbed_sdk_init) that can be used by the SDK itself to
do initializations before main() is called.
2014-01-31 11:58:18 +02:00
sg- 28f0cf71b3 Update to macro test in board.c, remove C027.cpp(h), set default IO in mbed_main and fixed copy paste error in MBED_LPC1768 reserved_pins.h 2014-01-29 22:33:41 -06:00
sg- f1fa9a0c25 Added support for C027. Small re-factor to LPC1768 to accommodate this. 2014-01-28 20:44:32 -06:00
Bogdan Marinescu 425e197ba6 Fix missing case in flow control code 2013-12-19 17:59:24 +02:00
Bogdan Marinescu 5f62a399db Added preliminary printf() support to RawSerial 2013-12-19 15:05:17 +02:00
Bogdan Marinescu c3d4d3079f Added DEVICE_SERIAL_FC as an indicator for the flow control implementation 2013-12-11 10:26:18 +02:00
Bogdan Marinescu fbeb52d613 Added RTS/CTS flow control
Currently implemented only for LPC1768. On this platform, when hardware
flow control is not directly supported, it will be emulated.
Also added "not_implemented.c" as a placeholder for various HAL functions
that might not be implemented on all platforms (in this particular case,
serial_set_flow_control). These are weak implementations that default to a
"not implemented" error message.
2013-12-04 19:42:11 +02:00
Bogdan Marinescu 256f70fffc Merge remote-tracking branch 'origin/master' 2013-11-26 17:14:46 +02:00
Bogdan Marinescu 3c0a8b633f Provide generic pinout defines
This commit adds generic peripheral names to various mbed enabled
boards, to make it easier to write portable code amongst various
mbed boards.
2013-11-26 17:12:36 +02:00
mazgch a3a16b3683 Avoid hardfault when CAN object is destructed.
interrupts have to be disabled(can_irq_free) before we turn off(can_free) the peripheral
2013-11-21 17:31:17 +01:00
Emilio Monti 317a1f66d2 Merge pull request #91 from jorisa/master
Add CAN api filter support and LPC11CXX CAN implementation
2013-10-25 06:58:05 -07:00
Bogdan Marinescu 2404dc0092 Added new serial class, remove interrupt chaining
The new RawSerial class is a simple wrapper over the serial HAL that can
be safely used from an interrupt handler.
Interrupt chaining code was removed from InterruptIn, Serial and Ticker
because it caused lots of issues with the RTOS. Interrupt chaining is
still possible using the InterruptManager class.
2013-10-23 16:08:34 +03:00
Joris Aerts 067e446ae2 Add CAN->filter to API and add placeholders to hal's
Add filter function and modify CAN->read definition to allow reading specific messages.
2013-10-22 10:57:28 -07:00
0xc0170 b0537af763 gpio irq enable/disable
- InterruptIn disable_irq/enable_irq
2013-10-19 22:28:29 +02:00
Adam Green 5eb976a088 Fix _sbrk() implementation for Cortex-M parts.
A recent commit, 43acaa4166, to get _sbrk() to build successfully for
LPC2368 broke the Cortex-M implementation.  __get_MSP() isn't ever
defined as a macro, it is an inline function.  This means that the
code would always be compiled to use SP instead of MSP on Cortex-M
parts.  I switched the code to instead use the TARGET_ARM7 define
to choose which stack pointer to utilize.

I tested this fix by making sure that the LPC2368 version of the mbed
SDK would still build successfully with the Python scripts and that the
NET1 test still built and ran successfully on my mbed-LPC1768 device.
2013-09-17 04:29:35 -07:00
dinau 43acaa4166 LPC2368 [GCC_ARM]: Fixed: Compilation and link errors in case "SD" example. 2013-09-13 22:01:19 +09:00
Bogdan Marinescu ae16d3efa8 Fix NULL pointer indirection in FilePath
If the FileBase::lookup operation in the constructor of FilePath returns
NULL, subsequent operations (such as isFile()/isFileSystem()) will call
methods on a NULL 'fb' pointer. This commit fixes this issue by adding
explicit NULL checks and a new method in FilePath (exists()).
2013-09-05 14:09:27 +03:00
Adam Green 9e6d1683b8 gcc: Provide _sbrk implementation compatible with RTX
I verified that the hang issue I was seeing when building and running
the mbed official networking tests with GCC_ARM was related to this
issue reported on the mbed forums:
    http://mbed.org/forum/mbed/topic/3803/?page=1#comment-18934

If you are using the 4.7 2013q1 update of GCC_ARM or newer then it
will have a _sbrk() implementation which checks the new top of heap
pointer against the current thread SP, stack pointer.
See this GCC_ARM related thread for more information:
    https://answers.launchpad.net/gcc-arm-embedded/+question/218972
When using RTX RTOS threads, the thread's stack pointer can easily
point to an address which is below the current top of heap so this
check will incorrectly fail the allocation.

I have added a _sbrk() implementation to the mbed SDK which checks the
heap pointer against the MSP instead of the current thread SP.  I have
only enabled this for TOOLCHAIN_GCC_ARM as this is the only GCC based
toolchain that I am sure requires this.
2013-08-30 18:15:25 -07:00
Adam Green 8fe7276b98 Silence signed/unsigned comparison warnings in GCC.
Why do the wait APIs take a signed integer if they are going to be
compared to unsigned quantities?
2013-08-13 01:47:19 -07:00
Adam Green 15f833bc1b Cast to matching enumeration type instead of uint32_t
These were done to silence GCC warnings and fix potential bugs where
they would never be equal when the enumeration wasn't a 32-bit type.

For example, common/pinmap_common.c used to contain this code:
    if (pin == (uint32_t)NC)
I switched it to:
    if (pin == (PinName)NC)

I wonder why this casting to uint32_t was done in the first place?
Maybe another supported compiler requires it?
2013-08-13 01:47:19 -07:00
Bogdan Marinescu 3b465de3aa Changed line endings to LF, removed non-ASCII chars from sources 2013-08-08 12:58:34 +03:00