Commit Graph

1744 Commits (8edcefa42a3e693f815db067abafbfa2ee2cef30)

Author SHA1 Message Date
Michael Conners 5bd25ac046 Added K20D5M support 2013-09-24 10:36:04 -04:00
Michael Conners afcc79ad27 Added KL46Z support 2013-09-24 10:01:06 -04:00
Andreas Rebert bb35d16521 Merged bugfixes and improvments for LPC1768 target to LPC4088 target 2013-09-23 11:39:52 +02:00
Bogdan Marinescu f2f7b213cd Merge pull request #75 from jorisa/master
Keep LPC11CXX in sync with LPC11XX
2013-09-20 01:53:40 -07:00
Emilio Monti 38ed9eb6a0 Merge pull request #72 from jorisa/master
Split uVision project source files in groups mbed/hal/src
2013-09-19 01:46:53 -07:00
Bogdan Marinescu 81b372d362 Merge pull request #73 from ytsuboi/master
Fixed LPC1114 ADC offset problem
2013-09-19 01:35:42 -07:00
Toyomasa Watarai 866858a816 Fixed LPC1114 ADC offset problem 2013-09-19 16:19:04 +09:00
Toyomasa Watarai f4bfe5aedb Revert "Fixed ADC offset problem"
This reverts commit 399acd1d6f.
2013-09-19 16:16:52 +09:00
Toyomasa Watarai 399acd1d6f Fixed ADC offset problem 2013-09-19 16:16:05 +09:00
Joris Aerts a4badc7dd2 Keep LPC11CXX in sync with LPC11XX
Only differences in CMSIS now are:
* Top of RAM (0x10001000 vs 0x10002000)
* Clock configuration (IRC/System PLL vs System Oscillator/IRC)
2013-09-18 18:54:53 -07:00
Joris Aerts 979bba6864 Don't call mbed_interface_disconnect when DEVICE_SEMIHOST is disabled 2013-09-18 14:10:29 -07:00
Joris Aerts c275ef3b3d Replace #ifdef with #if DEVICE_STDIO_MESSAGES
DEVICE_STDIO_MESSAGES is the only #define in device.h that is being used in the library as #ifdef rather than #if. This is misleading since setting it to 0 will not disable including the <stdio.h> libraries.
2013-09-17 18:19:22 -07: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
Emilio Monti 96ea3db1b3 Merge pull request #66 from dinau/lpc2368_mod
LPC2368 mod
2013-09-16 08:00:20 -07:00
Emilio Monti 061259c07c Merge pull request #67 from adamgreen/gccFixUSBHost
Get USBHost to build and run with GCC_ARM
2013-09-16 07:12:43 -07:00
dinau efbc52465d LPC2368 [GCC_ARM]: Silence some warnings. 2013-09-13 22:01:21 +09:00
dinau 43acaa4166 LPC2368 [GCC_ARM]: Fixed: Compilation and link errors in case "SD" example. 2013-09-13 22:01:19 +09:00
Emilio Monti 2481fbe2a2 Merge pull request #62 from arebert/lpc4088
LPC4088: PIN mode fix, export to external tools and MAC address retrieval
2013-09-13 05:59:14 -07:00
Bogdan Marinescu b9d52bda50 Merge remote-tracking branch 'github/master' 2013-09-12 16:38:13 +03:00
Erik Olieman c255ca2959 USBDevice memory leaks fixes
Fixes memory leaks in USBMSD, USBSerial (CircBuffer) and the KL25Z USB
HAL.
Original author: Erik Olieman, a few changes by Bogdan Marinescu.
2013-09-12 16:35:52 +03:00
Bogdan Marinescu 6eec86cbbf Merge pull request #64 from ytsuboi/master
[LPC812] Added RTOS support
2013-09-11 12:10:17 -07:00
Erik Olieman 94ff741989 LPC1768 InterruptIn speedup
Use __CLZ to speed up GPIO interrupt processing.
2013-09-11 18:46:18 +03:00
ytsuboi a693ad6d06 Merge branch 'master' of https://github.com/ytsuboi/mbed 2013-09-11 02:30:33 +09:00
ytsuboi f79b9d3430 [LPC812] Added RTOS support 2013-09-11 02:30:27 +09:00
Bogdan Marinescu 171dda705c Merge pull request #63 from jorisa/master
Fix hardfault when attaching callback to CAN2 when CAN1 is not defined
2013-09-10 03:22:55 -07:00
Joris Aerts efd3d8d8e0 Fix hardfault when attaching callback to CAN2 when CAN1 is not defined
Fault is triggered by trying to read LPC_CAN1->IER when the peripheral is powered off. Fixed by checking the power control register before checking the IER register.
2013-09-09 09:06:04 -07:00
Bogdan Marinescu cfa6a1d912 Merge pull request #61 from ytsuboi/master
Fixed problem in PWMOUT mapping table
2013-09-09 08:22:11 -07:00
Andreas Rebert 00cfdbad2a Merge remote-tracking branch 'upstream/master' into lpc4088 2013-09-09 14:13:08 +02:00
unknown 0e36bdd457 Bugfix: PIN Modes was not set correctly
Added: Export to uVision and Code Red toolchains
2013-09-09 14:10:11 +02:00
Bogdan Marinescu 1f243a900c Merge remote-tracking branch 'github/master' 2013-09-09 12:31:42 +03:00
Bogdan Marinescu fded46b459 [LPC1768] Fix serial_clear
serial_clear() erroneously disabled the UART FIFOs.
Reported by Adam Green.
2013-09-09 12:28:11 +03:00
Toyomasa Watarai d0d2df3ce5 Fixed problem in PWMOUT mapping table
Fixed problem in PWMOUT output issue.
Startup code cean-up (correced exception names).
Corrected test cases.
2013-09-09 18:15:51 +09:00
Bogdan Marinescu d51411294f Merge pull request #57 from adamgreen/serialTxDropsRx
serial_putc() can cause rx bytes to be dropped
2013-09-09 01:19:29 -07:00
Joris Aerts 743e178455 Fix MASKED_ACCESS bug in gpio_init, now same as LPC11xx (Also use PIN_SHIFT instead of magic number 8 in gpio_set) 2013-09-08 18:57:40 -07:00
Adam Green 5d27f98c7b serial_putc() can cause rx bytes to be dropped
While fixing this issue in the various LPC* ports, I noticed a comment
pointing to this mbed forum post which summarizes this bug quite well:
  https://mbed.org/forum/bugs-suggestions/topic/4473/

This bug was introduced in the following commit:
2662e105c4

The following code was added to serial_putc() as part of this commit:
    uint32_t lsr = obj->uart->LSR;
    lsr = lsr;
    uint32_t thr = obj->uart->THR;
    thr = thr;

As the forum post indicates, this causes the serial_putc() routine to
actually eat an inbound received byte if it exists since reading THR is
really reading the RBR, the Receiver Buffer Register.  This code looks
like code that was probably added so that the developer could take a
snapshot of these registers and look at them in the debugger.  It
probably got committed in error.
2013-09-07 00:44:44 -07:00
Bogdan Marinescu e03e337af6 Fix USBDevice compilation on LPC11U24_301 and LPC11U35_401
Reported by Frank Buss <fb@frank-buss.de>
2013-09-06 12:21:38 +03:00
Bogdan Marinescu 423f1abd63 Fix startup files for various versions of LPC11Uxx
LPC11U24/LPC11U24_301/LPC11U35_401 shared the same startup file for ARM
and uARM toolchains, which is wrong, because the initial SP value is
different for LPC11U24_301. This commit fixes this issue by giving each
target its own startup file.
2013-09-06 11:50:52 +03:00
Bogdan Marinescu 95f6826196 Refactor code for LPC810/LPC812
There were lots of overlaps in the code for LPC810 and LPC812, including
duplicated source files. This commit adds a TARGET_LPC81X_COMMON folder in
both HAL and CMSIS, this folder keeps common code for the targets.
2013-09-05 19:00:19 +03:00
Bogdan Marinescu 233979e88f Merge pull request #54 from ytsuboi/master
Added LPC810 support
2013-09-05 07:00:17 -07: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
ytsuboi 46003d4c3c Merge remote-tracking branch 'upstream/master' 2013-09-05 13:01:12 +09:00
Abe Karplus 96101aed32 Added complete PwmOut mappings for KL25Z 2013-09-04 15:52:58 +03:00
Bogdan Marinescu 45565cb055 Merge pull request #48 from adamgreen/gccRetargetSbrk
gcc: Provide _sbrk implementation compatible with RTX
2013-09-04 01:12:31 -07:00
ytsuboi 0718c7671a Merge remote-tracking branch 'upstream/master' 2013-09-03 19:38:34 +09:00
Bogdan Marinescu 42e27e70b9 Merge pull request #51 from adamgreen/netMorePerformanceWork
Asm versions of netstack memcpy() and lwip_standard_chksum()

[Note] I'm generally a bit reluctant when including optimizations like this (from an architectural standpoint), because they tend to be a bit too specific (for example, this one works only with lwIP+GCC+Cortex-M3 or M4), but for now it looks as this is the right place for them, although the optimized memcpy should ideally be in libc (or even better replaced with a DMA transfer in this particular case). But this will be both a nice optimization and a reminder of what we need to implement/change in the future.
2013-09-02 04:05:56 -07:00
Adam Green 2056ad025e usbhost: USBHost::fileControlBuf() handle alignment and endianness
Based on great feedback from Martin Kojtal on my previous commit, I
have modified my USBHost::fileControlBuf() change to be more portable.
    ddb3fbe826 (commitcomment-3988044)

The code now fills in the setupPacket byte array a byte at a time,
using bit shifts to extract lower and upper bytes from the 16-bit
values so that the code should work on big endian or little endian
machines.  I also removed the 2-byte alignment attribute from the
setupPacket array as it is no longer required.
2013-09-01 12:19:59 -07:00
dinau 8503ccb7a3 LPC2368 [GCC_ARM, GCC_CR]:
1. Added: GCC_CR toolchain ID for LPC2368. (targets.py)
2. Modified: Startup codes for GCC_ARM and GCC_CR toolchain.
3. Verified: "ticker" and "basic" test program work well, so far.
(Fixed typo.)
2013-08-31 16:00:40 +09:00
dinau 7bcdf0b980 LPC2368 [GCC_ARM, GCC_CR]:
1. Added: GCC_CR toolchain ID for LPC2368. (targets.py)
2. Modified: Startup codes for GCC_ARM and GCC_CR toolchain.
3. Verified: "ticker" and "basic" test program works well, so far.
2013-08-31 13:33:34 +09: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 7dddd9e578 Asm versions of netstack memcpy() and lwip_standard_chksum()
For tests such as TCPEchoServer
(http://mbed.org/users/emilmont/notebook/networking-libraries-benchmark/)
this change showed a 28% improvement (14Mbps to 18Mbps) when the echo
test was modified to instead use 1K data buffers.

I targetted these two functions based on manual profiling samples which
showed that a great deal of time was being spent in these two functions
when the network stack was being slammed with UDP packets.
2013-08-30 06:09:16 -07:00
Bogdan Marinescu e23be8a1b3 Merge pull request #46 from adamgreen/netAssertDisableAndCrashFixes2
Robustness fixes for netstack
2013-08-30 04:47:15 -07:00
Bogdan Marinescu 1798920cf4 Merge remote-tracking branch 'github/master' 2013-08-30 12:26:37 +03:00
Bogdan Marinescu e870a90ff2 Added toolchain hooks and support for LPC4088_EA binary generation
A new hooks mechanism (hooks.py) allows various targets to customize
part(s) of the build process. This was implemented to allow generation of
custom binary images for the EA LPC4088 target, but it should be generic
enough to allow other such customizations in the future. For now, only the
'binary' step is hooked in toolchains/arm.py.
2013-08-30 12:19:08 +03:00
Adam Green c0d7c3fb39 USBHost: Silence narrowing warning in USBHostMSD::inquiry
I changed the following initialization from:
    uint8_t cmd[6] = {0x12, (lun << 5) | evpd, page_code, 0, 36, 0};
to:
    uint8_t cmd[6] = {0x12, uint8_t((lun << 5) | evpd), page_code, 0, 36, 0};
This makes it clear to the compiler that we are Ok with the 32-bit
integer result from the shift and logical OR operation (after integral
promotions) being truncated down to a 8-bit unsigned value.  This is
safe as long as lun only has a value of 7 or lower.
2013-08-29 21:16:45 -07:00
Adam Green fb769b1566 USBHost: Don't pass NULL in for uint32_t parameters.
USBHostHub.cpp made a few calls to the USBHALHost::deviceDisconnected()
virtual method passing in NULL for the addr parameter which is actually
declared as uint32_t and not a pointer type.  Switching these calls
to pass in a 0 for this parameter silences GCC warnings about
incompatible types.
2013-08-29 21:12:12 -07:00
Adam Green 8281836df3 USBHost: Silence unused variable warnings.
I removed the initialization of some variables which were never used to
silence GCC warnings.

One of them had me removing the following line from
USBHostMouse::rxHandler():
    int len = int_in->getLengthTransferred();
The variable len is never used again in this method and it doesn't
appear that the int_in->getLengthTransferred() call has any side
effects which would require this extraneous call to remain in the code.
2013-08-29 21:07:43 -07:00
Adam Green ddb3fbe826 USBHost: Silence GCC warnings in USBHost.cpp
There are a few warnings thrown by GCC for this source file that I have
attempted to correct.  I would definitely appreciate feedback from
others on these changes:
* USBHost::usb_process() would attempt to write past the end of the
  deviceInited[] array in the following code snippet:
    if (i == MAX_DEVICE_CONNECTED) {
        USB_ERR("Too many device connected!!\r\n");
        deviceInited[i] = false;
  The i variable is guaranteed to index 1 item past then end of this
  array since it only contains MAX_DEVICE_CONNECTED elements.  I have
  removed the line which sets deviceInited[i] to false.  Two questions
  result though:
    1) What was the intent of this line of code and is it Ok that I
       just removed it or should it be replaced with something else?
    2) I see no where else that elements in the deviceInited array are
       set to false except when all are set to false in the usbThread()
       method.  Should there be code in DEVICE_DISCONNECTED_EVENT to
       do this as well?
* USBHost::transferCompleted(volatile uint32_t addr) was comparing addr
  to NULL, which is of pointer type.  GCC issues a warning on this
  since the types are different (void* being compared to uint32_t).  I
  switched it to just compare with 0 instead.
* There is a switch statement in USBHost::unqueueEndpoint() which
  is conditional on a ENDPOINT_TYPE enumeration but doesn't contain
  cases for all values in the enumeration.  I just added a default
  case to simply break on other values to silence this GCC warning and
  allow the code to continue working as it did before.  Is it Ok that
  this particular piece of code only handles these two particular
  cases?
* USBHost::fillControlBuf() was generating a warning about possible
  alignment issues when accessing the setupPacket byte array as 16-bit
  half words instead.  I changed the casting to silence the warnings
  and modified the declaration of the setupPacket field to make sure
  that it is at least 2-byte aligned for these 16-bit accesses.
2013-08-29 19:22:36 -07:00
Adam Green bfafd8a014 USBHost: Calling memcpy() instead of memset()?
The two following memcpy() calls in USBEndpoint::init() are passing in
a NULL pointer as the copy source location.

    memcpy(td_list_[0], 0, sizeof(HCTD));
    memcpy(td_list_[1], 0, sizeof(HCTD));

I suspect that these were meant to be memset() calls instead so I
switched them.  In one of the places that I found where this method is
called, USBHost::newEndpoint(), its passes in an array of HCTD objects
which have already been cleared with similar memset() calls.  I am
therefore pretty certain that these were meant to be memset() calls but
if all callers already guarantee that they are zeroed out then maybe
the memset()s can be removed from USBEndpoint::init() anyway.
2013-08-29 18:22:22 -07:00
Adam Green 8a6d5ebc34 USBHost: Updates to allow compilation with GCC_ARM
I updated a few things in the USBHost source code to get it to compile
with GCC:
* In USBHALHost.cpp, the usb_buf global variable was defined with two
  different aligmnent specifiers:
    static volatile __align(256) uint8_t usb_buf[TOTAL_SIZE] __attribute((section("AHBSRAM1"),aligned));  //256 bytes aligned!
  The first one was not accepted by GCC.  I removed the duplicate
  alignment specifier and updated the one in the existing __attribute
  property to force the desired 256 byte alignment.
* Removed the explicit use of the __packed property from structures
  and instead used the PACKED macro defined in the mbed SDK's
  toolchain.h header file.  This macro does the right thing for the
  various compilers supported by the mbed team.
* Updated USB_* message macros in dbg.h to place spaces around
  references to the 'x' macro parameter.  Without this, C++ 11
  compilation thought the x character was a string literal operator but
  it wasn't one it recognized.  Adding the spaces makes it easier to
  see the use of the parameter, fixes this compile time error, and
  doesn't add any extra space to the final output string since the
  compiler only concatenates the contents within the double quotes of
  the strings.

By the way, I build with the gnu++11 standard since I have had requests
for its support from gcc4mbed.  Some of the items fixed here might not
be errors when using older standards with GCC.

I built and tested a USBHostMSD sample with these updates using both
GCC and the online compiler.  I will test more of the host interfaces
before issuing a pull request containing this commit.
2013-08-29 12:48:20 -07:00
dinau 841ce1d719 Fixed: The issue of interrupt vector remapping for GCC_ARM LPC1114 2013-08-29 21:40:57 +09:00
dinau 97d92789ec Fixed: The issue of interrupt vector remapping for GCC_ARM LPC1114 2013-08-28 23:29:16 +09:00
Adam Green b0c0f47c7d Changed leading whitespace back to tab.
The leading whitespace preceeding the fields in the lpc_enetdata
structure definition were originally a tab and I used 4 spaces when
I added RxThread.
2013-08-27 23:57:24 -07:00
Adam Green 8cf3e658d1 Don't use semaphore from ENET_IRQHandler to packet_rx
I now use a signal to communicate when a packet has been received by
the ethernet hardware and should be processed by the packet_rx thread.
Previously the change to make the lwIP stack thread safe introduced
enough delay in packet_rx that the semaphore count could lag behind
the processed packets and overflow its maximum token count.  Now the
ISR uses the signal to indicate that >= 1 packet has been received
since the last time packet_rx() was awaken.

Previously the ethernet driver used generic sys_arch* APIs exposed from
lwIP to manipulate the semaphores.  I now call CMSIS RTOS APIs
directly when using the signals.  I think this is acceptable since that
same driver source file already contains similar os* calls that talk
directly to the RTOS.
2013-08-27 23:38:42 -07:00
Adam Green 2bed996462 Revert "net: Only process 1 packet per ethernet RX interrupt"
This reverts commit acb35785c9.

It turns out that this commit actually causes problems if an ethernet
interrupt is dropped because a higher privilege task is running, such
as LocalFileSystem accesses.  If this happens, the semaphore count isn't
incremented enough times and the packet_rx() thread will fall behind and
end up running as though it had only one ethernet receive buffer.  This
causes even more lost packets.

I plan to fix this by switching the semaphore to be a signal so that
the syncronization object is more boolean.  It simply indicates if an
interrupt has arrived since the last time packet_rx() was awaken to
process inbound packets.
2013-08-27 22:24:47 -07:00
Adam Green de8161fde1 net: Reset pbuf length when re-queueing on error.
I recently pulled a NXP crash fix for their ethernet driver which will
requeue a pbuf to the ethernet driver rather than sending it to the
lwip stack if it can't allocate a new pbuf to keep the ethernet
hardware primed with available packet buffers.  While recently
reviewing this code I noticed that the full size of the pbuf wasn't
used on this re-queueing operation but the size of the last received
packet.  I now reset the pbuf size back to its originally allocated
size before doing this requeue operation.
2013-08-27 22:24:03 -07:00
Adam Green acb35785c9 net: Only process 1 packet per ethernet RX interrupt
Previously the packet_rx() function would wait on the RxSem and when
signalled it would process all available inbound packets.  This used to
cause no problem but once the thread synchronization was turned
on via SYS_LIGHTWEIGHT_PROT, the semaphore actually started to overflow
its maximum token count of 65535.  This caused the mbed_die() flashing
LEDs of death.  The old code was really breaking the producer/consumer
pattern that I typically see with a semaphore since the consumer was
written to consume more than 1 produced object per semaphore wait.
Before the thread synchronization was enabled, the packet_rx() thread
could use a single time slice to process all of these packets and then
loop back around a few more times to decrement the semaphore count
while skipping the packet processing since it had all been done.
Now the packet processing code would cause the thread to give up its
time slice as it hit newly enabled critical sections.  In the end it
was possible for the code to leak 2 semaphore signals for every 1 by
which the thread was awaken.  After about 10 seconds of load, this
would cause a leak of 65535 signals.

NOTE: Two potential issues with this change:
1) The LPC_EMAC->RxConsumeIndex != LPC_EMAC->RxProduceIndex check was
   removed from packet_rx().  I believe that this is Ok since the same
   condition is later checked in lpc_low_level_input() anyway so it
   won't now try to process more packets than what exist.
2) What if ENET_IRQHandler(void) ends up not signalling the RxSem for
   every packet received?  When would that happen?  I could see it
   happening if the ethernet hardware would try to pend more than 1
   interrupt when the priority was too elevated to process the
   pending requests.  Putting the consumer loop back in packet_rx()
   and using a Signal instead of a Semaphore might be a better
   solution?
2013-08-27 22:24:03 -07:00
Adam Green f5ec5d3ab2 net: Enable SYS_LIGHTWEIGHT_PROT
This option actually enables the use of the lwip_sys_mutex for
protecting concurrent access to such important lwIP resources as:
  select_cb_list (this is the one which orig flagged problem)
  sockets array
  mem stats (if enabled)
  heap (if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT was non-zero)
  memp pool allocs/frees
  netif->loop_last pbuf linked list
  pbuf reference counts
  ...

I first noticed this issue when I hit a crash while slamming the net
stack with a large number of TCP packets (I was actually sending 1k
data buffers from the TCPEchoServer mbed sample.)  It crashed in the
last line of this code snippet from event_callback:
  for (scb = select_cb_list; scb != NULL; scb = scb->next) {
    if (scb->sem_signalled == 0) {

It was crashing because scb had an invalid address so it generated a
bus fault.  I figured that memory was either corrupted or there was
some kind of concurrency issue.  In trying to determine which, I wanted
to walk through the select_cb_list linked list and see where it was
corrupted:
    (gdb) p scb
    $1 = (struct lwip_select_cb *) 0x85100080
    (gdb) p select_cb_list
    $2 = (struct lwip_select_cb *) 0x0

That was interesting, the head of the linked list was now NULL but it
must have had a non-NULL value when this loop started running or we
would have never gotten to the point where we hit this crash.

This was starting to look like a concurrency issue since the linked
list was modified out from underneath this thread.  Looking through the
source code for this function, I saw use of macros like
SYS_ARCH_PROTECT and SYS_ARCH_UNPROTECT which looked like they should
be providing the thead synchronization.  I disassembled the
event_callback() function in the debugger and saw no signs of the
usage of synchronizition APIs that I expected.  A search
through the code for the definition of these SYS_ARCH_UN/PROTECT
macros led me to discovering that they were actually ignored unless an
implementation defined them itself (the mbed version doesn't do so) or
the SYS_LIGHTWEIGHT_PROT macro is set to non-zero (the mbed version
didn't do this either).  Flipping the SYS_LIGHTWEIGHT_PROT macro on in
lwipopts.h fixed the crash I kept hitting, increased the size of the
code a bit, and unfortunately slows things down a bit since it now
actually serializes access to these data structures by making calls
to the RTOS sync APIs.
2013-08-27 22:24:03 -07:00
Adam Green fa392423c8 Silence GCC unused variable warning.
After making my previous commit to completely disable LWIP_ASSERT
macro invocations, I ended up with a warning in pbuf.c where an
err variable was set but only checked for success in an assert.  I
added a "(void)err;" reference to silence this warning.
2013-08-27 22:24:03 -07:00
Adam Green 4603d729f9 net: Fully disable LWIP_ASSERTs
I was doing some debugging that had me looking at the disassembly of
lpc_rx_queue() from within the debugger.  I was looking for the call to
pbuf_alloc() that we see in the following code snippet:
		p = pbuf_alloc(PBUF_RAW, (u16_t) EMAC_ETH_MAX_FLEN, PBUF_RAM);
		if (p == NULL) {
			LWIP_DEBUGF(UDP_LPC_EMAC | LWIP_DBG_TRACE,
				("lpc_rx_queue: could not allocate RX pbuf (free desc=%d)\n",
				lpc_enetif->rx_free_descs));
			return queued;
		}

		/* pbufs allocated from the RAM pool should be non-chained. */
		LWIP_ASSERT("lpc_rx_queue: pbuf is not contiguous (chained)",
			pbuf_clen(p) <= 1);

When I was looking through the disassembly for this code I noticed a
call to pbuf_clen() in the actual machine code.
=> 0x0000bab0 <+24>:	bl	0x44c0 <pbuf_clen>
   0x0000bab4 <+28>:	ldr	r3, [r4, #112]	; 0x70
   0x0000bab6 <+30>:	ldrh.w	r12, [r5, #10]
   0x0000baba <+34>:	add.w	r2, r3, #9
   0x0000babe <+38>:	add.w	r0, r12, #4294967295	; 0xffffffff

The only call to pbuf_clean made from this function is made from
within the LWIP_ASSERT.  When I looked more closely at how this macro
was defined, I saw that the mbed version of the stack had disabled the
LWIP_PLATFORM_ASSERT macro when LWIP_DEBUG was false which means that
no action will be taken if the assert is false but it still allows the
LWIP_ASSERT macro to potentially evaluate the assert expression.
Defining the LWIP_NOASSERT macro will fully disable the LWIP_ASSERT
macro.

I saw one of my TCP/IP samples shrink about 0.5K when I made this
change.
2013-08-27 22:24:03 -07:00
Bogdan Marinescu 2cdd41d9b1 Added support for LPC11U24/_301 and LPC11U35_401 in uARM 2013-08-27 15:31:47 +03:00
Bogdan Marinescu 9a270999d0 Added support for LPC11U35_401 in ARM and GCC_ARM 2013-08-27 15:19:01 +03:00
Bogdan Marinescu 1c23d68281 Added support for LPC11U24_301/401 compilation with ARM toolchain 2013-08-27 14:52:39 +03:00
ytsuboi 2e549668a8 [LPC810] fixed scatter file 2013-08-24 16:02:03 +09:00
ytsuboi 8dd6bdb701 [LPC810] add LPC810 support 2013-08-24 15:49:16 +09:00
Adam Green 76b7bb4209 USBDevice: Silence GCC warning
The following line in USBHAL_KL25Z.cpp would generate a warning in GCC
because of a potential operator precendence issue:
    return((USB0->FRMNUML | (USB0->FRMNUMH << 8) & 0x07FF));

This would have been interpreted as:
    return((USB0->FRMNUML | ((USB0->FRMNUMH << 8) & 0x07FF)));
since & has higher precedence than |

I switched it to be:
    return((USB0->FRMNUML | (USB0->FRMNUMH << 8)) & 0x07FF);
Since it makes more sense to & with 0x7FF after having merged the lower
and upper bytes together rather than just the upper byte.  It should
have resulted in the same value either way.
2013-08-21 22:23:35 -07:00
ytsuboi 4c0b5ab404 [LPC1114] fixed to use IRC and System PLL clock 2013-08-21 20:44:31 +09:00
Toyomasa Watarai 1ff64de847 Fixed gpio_irq_api bugs
Corrected improper implementation of channel_ids[] usage.
Revemod redundant arrays e.g. pin_names[] and trigger_events[]
2013-08-21 16:46:03 +09:00
Toyomasa Watarai 463bf47a40 Support LPC1114 platform
Added TARGET_LPC1114 pins for InterruptIn test case and changed to
PullUp mode.
2013-08-21 16:41:18 +09:00
Toyomasa Watarai 10e30b5cfb Fixed error handling and cleanup 2013-08-21 10:46:37 +09:00
Adam Green 5e4439bb19 fs: Silence GCC signed/unsigned warnings
The SDFileSystem class contained a few routines which compared a signed
integer loop index to an unsigned integer length/size.  I switched the
loop index to be uint32_t as well.
2013-08-19 22:53:49 -07:00
Bogdan Marinescu b7301d7a54 Merge remote-tracking branch 'github/master' 2013-08-16 16:00:25 +03:00
Bogdan Marinescu 15ed7ea66a Fix bug in Ticker code
The bug was introduced by the interrupt chaining code.
2013-08-16 15:55:24 +03:00
Toyomasa Watarai c26d2a990d Removed detach() call in test case 2013-08-16 21:47:42 +09:00
ytsuboi c4ea5e6717 Merge branch 'master' of https://github.com/ytsuboi/mbed 2013-08-16 21:36:52 +09:00
Toyomasa Watarai 10c44a99b2 Merge branch 'master' of https://github.com/ytsuboi/mbed 2013-08-16 21:07:03 +09:00
Toyomasa Watarai 66deb5e24d Added LPC1114 support and fixed hard fault 2013-08-16 21:06:51 +09:00
Emilio Monti 089441f75d Merge pull request #34 from ytsuboi/master
Added LPC1114 and target for some test cases, Removed SWCLK and SWDIO pins from pinmap
2013-08-16 01:57:39 -07:00
Adam Green e0fb0a8f9b Don't dereference NULL ipaddr in netif_set_ipaddr()
The code in netif_set_ipaddr would read the memory pointed to by its
ipaddr parameter, even if it was NULL on this line:
  if ((ip_addr_cmp(ipaddr, &(netif->ip_addr))) == 0) {
On the Cortex-M3, it is typically OK to read from address 0 so this
code will actually compare the reset stack pointer value to the
current value in netif->ip_addr.

Later in the code, this same pointer will be used for a second read:
  ip_addr_set(&(netif->ip_addr), ipaddr);

The ip_addr_set call will first check to see if the ipaddr is NULL and
if so, treats it like IP_ADDR_ANY (4 bytes of 0).
    /** Safely copy one IP address to another (src may be NULL) */
    #define ip_addr_set(dest, src) ((dest)->addr = \
                                        ((src) == NULL ? 0 : \
                                        (src)->addr))

The issue here is that when GCC optimizes this code, it assumes that
the first dereference of ipaddr would have thrown an invalid memory
access exception and execution would never make it to this second
dereference.  Therefore it optimizes out the NULL check in ip_addr_set.

The -fno-delete-null-pointer-checks will disable this optimization and
is a good thing to use with GCC in general on Cortex-M parts.  I will
let the mbed guys make that change to their build system.

I have however corrected the code so that the intent of how to handle a
NULL ipaddr is more obvious and gets rid of the potential NULL
dereference.

By the way, this bug caused connect() to fail in obtaining an
address from DHCP.  If I recall correctly from when I first debugged
this issue (late last year), I actually saw the initial value of the
stack pointer being used in the DHCP request as an IP address which
caused it to be rejected.
2013-08-15 19:02:51 -07:00
ytsuboi 478f0498e7 Merge remote-tracking branch 'upstream/master' 2013-08-16 02:38:42 +09:00
Toyomasa Watarai 268a2973ea Added LPC1114 and target for some test cases 2013-08-16 00:24:09 +09:00
Toyomasa Watarai 1d1c8c6391 Removed SWCLK and SWDIO pins from pinmap 2013-08-16 00:17:52 +09:00
Bogdan Marinescu 6744f47359 Changed definition structure of ETHMEM_SECTION
This structure makes it easier to add more targets/toolchains in the
future and it's (arguably) a bit easier to read.
2013-08-15 15:56:24 +03:00
Bogdan Marinescu 1e4c9bed66 Merge remote-tracking branch 'github/master' 2013-08-15 15:18:52 +03:00
Adam Green 28a3466d11 Fixups to network code after recent merges.
Peter's and my changes to LPC1768.ld ended up adding the same AHBSRAM0
and AHBSRAM1 section clauses to the script twice.  I removed one copy.

I also pulled Peter's define of the ETHMEM_SECTION macro up into the
previous nested #if so that the preprocessor wouldn't spit out a
redefined macro warning.

I verified that building the code clean before and after these changes
still results in the same .bin file but now without warnings and/or
duplicate code.
2013-08-15 04:40:53 -07:00
Bogdan Marinescu 44c43e6e38 Restore C++98 compilation mode
Also, remove the line that required C++11 from UDPSocket.h
2013-08-15 14:09:20 +03:00
Bogdan Marinescu ff55aa3e13 Merge pull request #32 from adamgreen/netPerfRobustness
Updates to network code to improve performance/robustness
2013-08-15 03:51:47 -07:00
Bogdan Marinescu 370b270848 Merge pull request #30 from pbrier/master
Experimental fix for issue #29
2013-08-15 03:24:36 -07:00
Adam Green 657e6df203 Updates to network code to improve performance/robustness
I started out looking at some UDP receive code that was only able to
handle 3 inbound 550 byte datagrams out of 16 when sent in quick
succession.  I stepped through the ethernet driver code and it
seemed to work as expected but it just couldn't queue up more than
3 PBUFs for each burst.  It was almost like it was being starved of
CPU cycles.  Based on that observation, I looked up the thread
priorities for the receive ethernet thread and found the following
close to the top of the lpc17_emac.c source file:
    #define RX_PRIORITY   (osPriorityNormal)
This got me to thinking, what is the priority of the tcp thead?  It
turns out that it gets its priority from the following line in
lwipopts.h:
    #define TCPIP_THREAD_PRIO           1
Interesting!  What priority is 1?  It turns out that it corresponds
to osPriorityAboveNormal.  This means that while the tcp thread is
handling one packet that has been posted to its mailbox from the
ethernet receive thread, the receive thread is starved from processing
any more inbound ethernet packets.

What happens if we set TCP_IP_THREAD_PRIO to osPriorityNormal?  Crash!
The ethernet driver ends up crashing in lpc_low_level_input() when
it tries to set p->len on a NULL p pointer.  The p pointer ended up
being NULL because an earlier call to pbuf_alloc() in lpc_rx_queue()
failed its allocation (I will have more to say about this failed
allocation later since that is caused by yet another bug).  I pulled a
fix from http://lpcware.com/content/bugtrackerissue/lpc17xx-mac-bugs to
remedy this issue.  When the pbuf allocation fails, it discards the
inbound packet in the pbuf and just puts it back into the rx queue.
This means we never end up with a NULL pointer in that queue to
dereference and crash on.

With that bug fixed, the application would just appear to hang after
receiving and processing a few datagrams.  I could place breakpoints in
the packet_rx() thread function and found that it was being signalled
by the ethernet ISR but it was always failing to allocate new PBUFs,
which is what led to our previous crash.  This means that the new
crash prevention code was just discarding every packet that arrived.

Why are these allocations failing?  In my opinion, this was the most
interesting bug to track down.  Is there a memory leak somewhere in
the code which maybe only triggers in low memory situations?  I
figured the easiest way to determine that would be to learn a bit
about the format of the lwIP heap from which the PBUF was failing to
be allocated.  I started by just stepping into the failing lwIP memory
allocator, mem_malloc().  The loop which search the free list starts
with this code:
    for (ptr = (mem_size_t)((u8_t *)lfree - ram);
This loop didn't even go through one iteration and when I looked at the
initial ptr value it contained a really large value.  It turns out that
lfree was actually lower than ram.  At this point I figured that lfree
had probably been corrupted during a free operation after one of the
heap allocations had been underflowed/overflowed to cause the metadata
for an allocation to be corrupted.  As I started thinking about how to
track that kind of bug down, I noticed that the ram variable might be
too large (0x20080a68).  I restarted the debugger and looked at the
initial value.  It was at a nice even address (0x2007c000) and
certainly nothing like what I saw when the allocations were failing.
This global variable shouldn't change at all during the execution of
the program.  I placed a memory access watchpoint on this ram variable
and it fired very quickly inside of the rt_mbx_send() function.  The
ram variable was being changed by this line in rt_mbx_send():
    p_MCB->msg[p_MCB->first] = p_msg;

What the what?  Why does writing to the mailbox queue overwrite the
ram global variable?  Let's start by looking at the data structure used
in the lwIP port to target RTX (defined in sys_arch.h):
// === MAIL BOX ===

typedef struct {
    osMessageQId    id;
    osMessageQDef_t def;
    uint32_t        queue[MB_SIZE];
} sys_mbox_t;

Compare that to the utility macro that RTX defines to help setup one of
these mailboxes with queue:
    #define osMessageQDef(name, queue_sz, type)   \
    uint32_t os_messageQ_q_##name[4+(queue_sz)]; \
    osMessageQDef_t os_messageQ_def_##name = \
    { (queue_sz), (os_messageQ_q_##name) }
Note the 4+(queue_sz) used in the definition of the message queue
array.  What a hack!  The RTX OS requires an extra 16 bytes to contain
its OS_MCB header and this is how it adds it in.  Obviously the
sys_mbox_t structure used in the lwIP OS targetting code doesn't have
this.  Without it, the RTX mailbox routines end up scribbling on
memory following the structure in memory.  Adding 4 in that structure
fixes the memory allocation failure that I was seeing and now the network
stack can handle between 7 and 10 datagrams within a burst.
2013-08-15 03:08:47 -07:00
Bogdan Marinescu 9d846d9902 Merge pull request #31 from adamgreen/gccWarnFixNetwork
Update LPC1768 linker script and silence GNU warnings in network stack
2013-08-15 02:55:51 -07:00
Adam Green 282c354ba7 The value of 2 can't fit in a 1 bit wide field.
The phy_speed_100mbs, phy_full_duplex, and phy_link_active fields of
PHY_STATUS_TYPE are 1 bit wide but lpc_phy_init() attempted to
initialize them to a value of 2.  I switched the initializations to
be 0 instead and it still generated the same .bin image.
2013-08-14 20:17:54 -07:00
Adam Green 962dd8bd8f Silence GCC warnings in dhcp.c
The first was a potential out of range index read in dhcp_handle_ack().
The (n < DNS_MAX_SERVERS) check should occur first.  There is also a
documented lwIP bug for this issue here:
    http://savannah.nongnu.org/bugs/?36170

In dhcp_bind() there is no need to perform the NULL check in
ip_addr_isany() for &gw_addr.  Just check (gw_addr.addr == IPADDR_ANY)
instead.

I refactored the chaddr[] copy in dhcp_create_msg() to first copy all
of the valid bytes in hwaddr and then pad the rest of the bytes with 0.
Before it used to check on every destination byte if it should copy or
pad.  GCC originally complained about an index out of range read from
the hwaddr[] array even though it was protected by a conditional
operator.  The refactor makes the intent a bit clearer and saves the
extra comparison per loop iteration.  It also stops GCC from
complaining :)
2013-08-14 20:17:54 -07:00
Adam Green 1cf5243206 Don't call ip_addr_isany() on objects which can't be NULL.
GCC will issue a warning when the ip_addr_isany() macro is used on
a pointer which can never be NULL since the macros NULL check will
always be false:
    #define ip_addr_isany(addr1) ((addr1) == NULL || \
                                  (addr1)->addr == IPADDR_ANY)

In these cases, it is probably clearer to just perform the
x.addr == IPADDR_ANY check inline.
2013-08-14 20:17:54 -07:00
Adam Green 6e95a5ecde Removed extra ALIGNED macro define 2013-08-14 20:17:53 -07:00
Adam Green e014b41377 Silence signed/unsigned comparison warnings in GCC
The dn variable in lpc_low_level_output() was originally defined as a
u32_t but it is later compared to the s32_t return value from
lpc_tx_ready().  Since it is intialized to pbuf_clean() which returns
a u8_t, a s32_t type can safely hold the initial value and remains
consistent with the signed lpc_tx_ready() comparison.

I also modifed writtenLen in TCPSocketConnection::send_all() and
readLen in TCPSocketConnection::recieve_all() to be of type int instead
of size_t.  This is more consistent with their usage within these
methods (they accumulate int ret values and are compared to the int
length value) and their use as a signed integer return values.
2013-08-14 20:17:53 -07:00
Adam Green aa7a55b6dd Update LPC1768.ld linker script to work with net stack.
The original script assigned memory ranges to USB_RAM and ETH_RAM but
it never placed any section data in those regions.  I added clauses
towards the bottom of the script to place data that the programmer
has marked for the AHBSRAM0 and AHBSRAM1 sections into these regions
of RAM.  Previously the data destined for these sections was being
placed in the lower 32K RAM bank and overflowing it at link time.

I also added a few Image$$ linker symbols to mimic those used by the
online compiler.  I have had samples in the past which took advantage
of these to display static memory statistics for each SRAM region.

I also changed LENGTH=0x7F38 to LENGTH=(32K - 0xC8) to make it more
consistent with the sizing of the other regions in this script which
use human readable K sizing information.  The 0xC8 subtraction reflects
the starting offset of 0xC8 for this region.
2013-08-14 20:17:53 -07:00
pbrier ac078485ac Compile network and RTOS with GCC_ARM 2013-08-14 22:52:16 +02:00
pbrier 9011a5453a Compile network and RTOS with GCC_ARM 2013-08-14 22:45:55 +02:00
pbrier c0fdbede02 Compile network and RTOS with GCC_ARM 2013-08-14 22:34:33 +02:00
0xc0170 3d9be83e38 Chaining in Ticker - switched arguments [fix] 2013-08-14 18:22:30 +02:00
Toyomasa Watarai 9f2a930f31 Fixed GPIO read operation 2013-08-14 22:43:03 +09:00
Toyomasa Watarai b632d8db46 Removed redundant code in serial_api 2013-08-14 22:29:31 +09:00
Toyomasa Watarai 83e065d1bc Fixed missing mask register setting for I2C 2013-08-14 22:28:30 +09:00
0xc0170 4cbbf8f274 Update eth_static_mac_address from mbed master 2013-08-14 07:29:56 +02:00
0xc0170 74a34c842d default mbed interface for ethernet
- correction in macros, renamimg
2013-08-13 21:49:04 +02:00
Adam Green 692e666ced Silence signed/unsigned comparison warnings in GCC.
i2c_frequency() compares a uint32_t ref variable to the int hz
function parameter passed in by the caller.  I forced this to be an
uint32_t comparison.

i2c_slave_write() declared i and count variables to be of type uint32_t
but used them as int type throughout the code (in comparisons and
returns) so I switched them to be of signed int type.

spi_frequency() contains a change similar to that made in
i2c_frequency().
2013-08-13 01:47:20 -07:00
Adam Green 461a3dd0d2 Cast to matching enumeration type instead of uint32_t
This commit targets the KL25Z code, whereas previous ones targetted
similar issues in the LPC1768 and LPC11U24 mbed HAL code.

These changes were made 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, pinmap.c used to contain this code:
    if (pin == (uint32_t)NC) return;
I switched it to:
    if (pin == (PinName)NC) return;

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:20 -07:00
Adam Green cc56997a70 Cast to matching enumeration type instead of uint32_t
This commit targets the LPC11U24 code, whereas a previous one
targetted similar issues in the LPC1768 mbed HAL code.

These changes were made 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, pinmap.c used to contain this code:
    if (pin == (uint32_t)NC) return;
I switched it to:
    if (pin == (PinName)NC) return;

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
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 c411823656 Fix operator precedence warning in can_api.c
The original code was:
    if(LPC_CAN1->IER | LPC_CAN2->IER != 0) {

This would actually be interpreted as:
    if(LPC_CAN1->IER | (LPC_CAN2->IER != 0)) {
I simplified it to:
    if(LPC_CAN1->IER | LPC_CAN2->IER) {
With the comparison removed, the GCC warning no longer fires since the
user's intent is no longer unclear.  However, the end result should be
the same.
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
0xc0170 4ea25c9ebd Static mac address for ethernet interface
- enables to debug code even with semihosting enabled
2013-08-12 21:56:25 +02:00
Bogdan Marinescu 1a47a218a4 [KL25Z] Fixed counter type for i2c_read operations. 2013-08-12 12:31:05 +03:00
Emilio Monti 0843613136 Add LPC11U24/301 TARGET 2013-08-09 17:21:03 +01:00
Andreas Rebert 75dba19438 Updated pin mapping and CAN HAL for LPC4088 target 2013-08-08 13:57:02 +02:00
Bogdan Marinescu 3b465de3aa Changed line endings to LF, removed non-ASCII chars from sources 2013-08-08 12:58:34 +03:00
Bogdan Marinescu 3f703f1bf0 [LPC11C24] Make code compatible with the interrupt chaining code 2013-08-07 15:24:30 +03:00
Bogdan Marinescu 9ee1fc9f55 [KL25Z] Fix I2C issue related to the silicon errata.
Makes a difference when running the I2C EEPROM test at 400KHz, which has a 100%
success rate after this change.
2013-08-07 14:49:11 +03:00
Bogdan Marinescu 6c05438993 Interrupt chaining: added documentation, fixed a synchronization issue in CallChain. 2013-08-07 14:46:40 +03:00
Bogdan Marinescu d399e51bfd Interrupt chaining: now working on all targets.
Tested on LPC1768, LPC11U24, KL25Z, LPC2368.
2013-08-07 14:43:36 +03:00
Bogdan Marinescu 43d4445074 Interrupt chaining: preliminary version 2013-08-07 14:43:26 +03:00
Bogdan Marinescu 1e8e50996c [KL25Z] Restore full SPI pin mappings 2013-08-07 14:42:02 +03:00
Bogdan Marinescu 58fd85fc6f Add support for calling a function before main()
The name of the function is mbed_main.
Fixes PRMBED-906.
2013-08-07 14:39:13 +03:00
francois.berder@arm.com ffb2668411 Fixed some bugs in HTTPS library 2013-08-07 14:38:07 +03:00
francois.berder@arm.com bd9a31095a Add HTTPS library 2013-08-07 14:36:53 +03:00
Emilio Monti 1142df8cfd Merge pull request #22 from matthewelse/anotherpullrequest
PWM Patch Pull Request
2013-08-07 02:20:51 -07:00
Matthew Else e1eb357c53 Added changes to PWM API from LPC1114 to LPC11C24 2013-08-07 09:45:47 +01:00
Matthew Else b437a3ca22 Removed can_api.c from TARGET_LPC11CXX, as it's not ready for pull request yet. 2013-08-07 09:43:28 +01:00
Toyomasa Watarai 0c0b51f663 Fixed pwm_api bug
Corrected pwm_timer_map table for LPC1114
2013-08-07 16:24:58 +09:00
0xc0170 6127ed3bb7 KL25Z adc channels A
- only channels B were available
2013-08-06 21:21:03 +02:00
Matthew Else 548d18ebd7 Pull in changes to the main mbed code base. 2013-08-06 20:04:32 +01:00
Matthew Else d29ebefbd9 Begin to add can_api.c to LPC11C24 codebase. Not complete yet, which is why it's #if 0ed out. Lots of build errors come up if #if0 isn't there, which is why it is for now. 2013-08-06 17:41:31 +01:00
Emilio Monti e42786649f The LPC1347 board does not have an interface chip 2013-08-06 16:36:03 +01:00
Emilio Monti 790a71b041 Merge pull request #20 from matthewelse/master
CAN-Related Pull Request
2013-08-06 07:15:15 -07:00
Matthew Else 45470aba31 Updated READMEs 2013-08-06 15:09:41 +01:00
Matthew Else 4401516f14 Removed unnecessary core_cm* files, as they are now shared in cmsis 2013-08-06 15:06:28 +01:00
Emilio Monti 2c882199b4 Add lwIP copyright information 2013-08-06 14:55:22 +01:00
Matthew Else 6cf35dbcb8 Fix CAN Interrupt Test (MBED_31) 2013-08-06 14:52:04 +01:00
Matthew Else 714daff020 Fix CAN Test (MBED_30) 2013-08-06 14:51:00 +01:00
Matthew Else bf02700a32 Merge https://github.com/jorisa/mbed 2013-08-06 09:43:52 +01:00
Matthew Else f7a2be4bed Merge remote-tracking branch 'upstream/master' 2013-08-06 09:42:09 +01:00
Joris Aerts c747e2533f Rename some argument and enum names to match existing naming
Add CAN->mode(Mode mode) function (not implemented in hal)
2013-08-05 17:28:27 -07:00
emilmont 4f03cd09b8 Remove undefined peripherals 2013-08-05 22:09:32 +01:00
0xc0170 e1af24c1f2 Spaces correction 2013-08-05 19:06:22 +02:00
Matthew Else ef28879863 Merged remote tracking branch 'upstream/master' 2013-08-05 17:22:01 +01:00
Matthew Else 2c45596673 Merge https://github.com/jorisa/mbed 2013-08-05 17:11:58 +01:00
Matthew Else 7c8c7228c8 Pushed LPC1114 I2C updates to the LPC11C24 2013-08-05 17:09:22 +01:00
0xc0170 3c0775f5c3 More pin mux options for KL25Z
- as reported in mbed bug section, add all available mux options
2013-08-04 21:33:06 +02:00
0xc0170 e993e94886 Update kl25z_gcc_arm branch to latest master 2013-08-04 19:21:04 +02:00
0xc0170 08beebcd83 RAM region shifted by 0xC0 for vectors 2013-08-02 22:32:41 +02:00
0xc0170 0d6bec9d8c LD - space reserved for vectors in RAM 2013-08-02 21:08:29 +02:00
Emilio Monti 8562b3660b Add LPC1347 export templates. Cleanup GCC toolchain check. 2013-08-02 17:56:11 +01:00
0xc0170 48ee225d1f vectors and flash protection area are separated 2013-08-02 18:01:49 +02:00
Emilio Monti 54893092c3 Merge pull request #17 from matthewelse/forpullrequest
LPC1114 Port Pull Request
2013-08-02 08:56:44 -07:00
matthewelse 7827d62504 Added alternative DIP package names for pins in the LPC1114
Added this so it is consistent with the notebook page.
2013-08-02 10:38:05 +01:00
0xc0170 afab75fd01 only one flash memory (FLASH) 2013-08-02 07:14:36 +02:00
Joris Aerts 48fc1aa49d Add test case MBED_30 and MBED_31 to test CAN api 2013-08-01 17:54:13 -07:00
Joris Aerts f685efa9b2 Merge remote-tracking branch 'upstream/master' 2013-08-01 17:24:20 -07:00
Matthew Else 7f736b9d19 Removed unnecessary LPC1114-specific test. 2013-08-01 23:04:13 +01:00
Matthew Else 789f81b1ea Removed extra core_* files that are no longer needed. Makes Emilio more happy. 2013-08-01 22:54:52 +01:00
Matthew Else d899612525 Merge branch 'forpullrequest' 2013-08-01 16:25:28 +01:00
Matthew Else 0f7ece02a8 Fixed I2C API 2013-08-01 16:23:13 +01:00
Matthew Else df5c36a9ae Uncommented i2c_wait_SI(obj), as it should not have been commented out. 2013-08-01 16:04:18 +01:00
Matthew Else dc68b76d0f Added timeout for i2c_stop in LPC1114 target. 2013-08-01 15:46:05 +01:00
Joris Aerts a16dc72272 Add @param documentation for new event parameter
Add clear irq to attach() template function
Call irq_handler for every interrupt set
2013-07-31 10:45:28 -07:00
Joris Aerts 63b2b271d1 Refactor CAN interrupt handling to LPC176X HAL implementation
Add handlers for other CAN interrupt events
Changed CAN private entities to protected
2013-07-31 07:26:32 -07:00
0xc0170 33c096c9d0 Initial version of a ld and a startup for KL25Z ARM GCC 2013-07-31 10:19:18 +02:00
Joris Aerts 8ef8aac36e Merge remote-tracking branch 'upstream/master' 2013-07-30 19:16:34 -07:00
Joris Aerts 51bfe267f4 Add can_t->index to struct and set it during can_init 2013-07-30 15:17:40 -07:00
Matthew Else 07cddbf038 Merge remote-tracking branch 'upstream/master' 2013-07-30 12:01:49 +01:00
Bogdan Marinescu df5a993197 __cxa_pure_virtual changes
- rename stdio.cpp to retarget.cpp, since it doesn't contain only stdio-related
  code
- move __cxa_pure_virtual from exit.c to retarget.cpp where it belongs.
2013-07-29 18:54:22 +03:00
Bogdan Marinescu 0c5d3548d1 I2C EEPROM test: remove the redundant TestHelper class 2013-07-29 18:20:05 +03:00
Bogdan Marinescu fb347b62c8 [KL25Z] Fix tests for KL25Z
This commit fixes a number of issues with invalid/wrong pin assignments for the
KL25Z mbed target:

- analog: PTC1 doesn't seem to be exported at all, replaced with PTC2.
- digitalin/out, interruptin, portin/out: these tests used PTA1 and PTA2, which
are the console UART pins for the KL25Z mbed. The tests now use PTA4<->PTC5 and
PTA5<->PTC6.
2013-07-29 18:20:05 +03:00
Bogdan Marinescu 1cd95c2467 [KL25Z] Fix clock generation for I2C and SPI
Don't set a clock higher than the one requested for the I2C and SPI interfaces,
even if this setting is the closest to the requested one. This was causing
some issues with the EEPROM test and possibly other issues with the SPI SD test.
2013-07-29 18:20:04 +03:00
Bogdan Marinescu ade7a941e2 Multiple fixes to test_env
- send {{message}} instead of {message}. This is neede to overcome a serial
interface issue on the Freedom board.
- don't blink the passed/failed LEDs if they are not actually connected.
2013-07-29 18:19:37 +03:00
Bogdan Marinescu 48d41016cd Added armcc support for STM32F407 2013-07-29 18:15:04 +03:00
Bogdan Marinescu 5655d2fc2a Fix for the previous "change vector table relocation check" commit. 2013-07-29 18:13:38 +03:00
Bogdan Marinescu beed7117ad Add __cxa_pure_virtual to avoid pulling in functions from the C++ library
Fixes PRMBED-859
2013-07-29 18:13:37 +03:00
Bogdan Marinescu 14409cd7fd Change the check for vector table relocation
Allows the user to specify his own VTOR location.
Fixes PRMBED-1065.
2013-07-29 18:13:37 +03:00
matthewelse 429d2e61eb Enabled CAN for LPC11CXX in device.h 2013-07-29 10:59:18 +01:00
Matthew Else 200b263dcd Added basic stuff necessary to compile for LPC11C24 target. 2013-07-27 18:12:35 +01:00
ytsuboi a9f0d9a3f7 [LPC1114]: uARM fixed
Tested with only "[ 32] MBED_11: Ticker"
2013-07-27 02:06:12 +09:00
Matthew Else 8c2ede6f4f Merge remote-tracking branch 'upstream/master' 2013-07-26 15:50:59 +01:00
Emilio Monti 5f0bd9d283 Update ARM toolchain symbols 2013-07-26 15:49:00 +01:00
Matthew Else 153153f261 Added serial_break_clear/serial_break_set
Fixes #24
2013-07-26 11:44:09 +01:00
Toyomasa Watarai 698001caa2 Fixed issue #13
Changed pwm test code for LPC1114 using P1_1 (CT32B1_MAT0) and P1_2
(CT32B1_MAT1).

[PWM test (MBED_5) result]
Initialize PWM on pin 13 with duty cycle: 0.75
Initialize PWM on pin 14 with duty cycle: 0.50
{success}
{end}
2013-07-26 18:12:49 +09:00
Matthew Else 3172fd97ca Fix both edge bug in gpio_irq_api.c
Fixes #22
2013-07-26 09:41:20 +01:00
Matthew Else 1b399ecfab Added new test for devices with no analog out. 2013-07-25 16:02:02 +01:00
Matthew Else a356553c7d Fixed incorrect use of static in port_api.c
This was causing errors when compiling in GCC_ARM
2013-07-25 16:01:45 +01:00
Matthew Else c3ebd47071 Tidying up gpio_irq_api.c 2013-07-25 10:43:49 +01:00
Matthew Else a7ba27618d Fixed bug in gpio_irq_api
Test interruptin now works. Fixes #16
2013-07-25 10:26:46 +01:00
Matthew Else 4bce371f2b Fixed InterruptIn (MBED_A7) Test 2013-07-24 16:42:18 +01:00
Matthew Else df067bd4e9 Complete support for GPIO interrupts. 2013-07-24 16:02:01 +01:00
Matthew Else 3d08be9700 Attempt to fix the interrupts problem. 2013-07-24 11:00:07 +01:00
Toyomasa Watarai a125a25a97 Implemented PortIn, PortOut and PortInOut API #8
Followingt test cases have been passed:
* PortOut (#24)
* PortOut PortIn (#9)
* PortInOut (#8)
2013-07-24 18:37:12 +09:00
Matthew Else 9f47511812 Made some mbed tests compatible with the LPC1114 2013-07-23 16:08:45 +01:00
matthewelse d67d4f7fc1 Create README.md 2013-07-23 15:54:13 +01:00
Matthew Else 55f91f1da8 Fixed errors in gpio_irq_api.c 2013-07-23 15:44:24 +01:00
Matthew Else c56d1a5236 Fully implemented GPIO_IRQ
* Removed unused variables/comments.
* As of yet, untested...
2013-07-23 15:35:38 +01:00
Matthew Else 819ca5547c Removed extraneous comment from the function 2013-07-23 14:21:40 +01:00
Matthew Else 8011992021 Fully implemented gpio_irq_set 2013-07-23 14:19:33 +01:00
Matthew Else fea818fccb Updates to interrupt handling 2013-07-22 13:56:56 +01:00
Matthew Else 1da8e8a2c7 Started to implement gpio_irq_set 2013-07-22 13:30:00 +01:00
Matthew Else 4cf6f09411 Enabled the interrupts api to compile 2013-07-22 12:46:46 +01:00
Toyomasa Watarai 2a989551aa Fixed gpio_api
Corrected base address of GPIO port register
2013-07-22 18:53:45 +09:00
Matthew Else 1097af7091 Added DIP package pins to PinNames.h 2013-07-22 09:30:47 +01:00
Toyomasa Watarai 1781d58249 Merge branch 'master' of https://github.com/matthewelse/mbed 2013-07-22 15:13:13 +09:00
Toyomasa Watarai b172cd866c More fix for uARM build to avoid link error 2013-07-22 15:12:42 +09:00
ytsuboi ca31bda530 Removed printf debug lines 2013-07-22 14:55:19 +09:00
Toyomasa Watarai b4de4503a8 Fixed uARM build
Added EXPORT directive for stack/heap.
2013-07-22 10:29:20 +09:00
Toyomasa Watarai 8bd3171943 Fixed ticker test case to support LPC1114 2013-07-21 23:46:33 +09:00
Toyomasa Watarai 74741c6d0a Merge branch 'master' of https://github.com/matthewelse/mbed 2013-07-21 23:04:54 +09:00
Toyomasa Watarai 794ab9cbd3 Fixed #9 and test ticker test code
Clean-up GPIO stuff, but it shoud be same behavior as before.
2013-07-21 23:04:46 +09:00
ytsuboi d15647e9d8 [LPC1114]: add support for RTOS
just succeed in build process. not yet tested.
2013-07-21 00:51:42 +09:00
Toyomasa Watarai 796bbbeb0d Fixed ARM/uARM build and compile error in DigitalOut.h 2013-07-20 19:46:24 +09:00
Matthew Else 84a76cd8d8 Added a load of debug lines
Basically this outputs a load of stuff to the serial port. I'm just
using this to get an idea of where the error lies within the code...
2013-07-19 16:56:49 +01:00
Matthew Else 9097bf7f55 A bit more debugging
Also removed a random shortcut link that didn't need to be there
2013-07-19 15:32:29 +01:00
Matthew Else 66ca1c9db2 Refactored bits of gpio_api.c
In between the last two commits, I added debugging lines using serial to
try and locate the line of code that was causing the issues with GPIO.
However, didn't get anywhere with this because the gpio_write function
is defined in a header file, rather than in an implementation file, so
the printf function can't go there. As a result, it's just refactoring.
2013-07-19 15:23:25 +01:00
Matthew Else 04051989bd Added UART to testing. 2013-07-19 14:13:38 +01:00
Matthew Else a9bb4aa5cb Lots of changes, fixing build bugs and renaming
Files renamed to fit with the new style folder structure
2013-07-19 13:59:50 +01:00
Matthew Else 18c291b7ce Added ytsuboi's modifications for using the 1114 2013-07-19 11:24:51 +01:00
Emilio Monti 091fe5c3d0 synch targets, exporters and tests 2013-07-17 14:11:54 +01:00
Bogdan Marinescu 6d652bddfa mbed_interface_disconnect/powerdown are now synchronous calls
Fixes PRMBED-804
2013-07-17 15:29:41 +03:00
Bogdan Marinescu dd70336886 [LPC11U24] Take advantage of the full 8K of RAM
The linker command scripts/startup files used only 4K of RAM on this target.
2013-07-17 15:29:40 +03:00
Bogdan Marinescu 0c33d40fbb Added support for UART break generation. 2013-07-17 15:29:39 +03:00
samuel.mokrani@arm.com 0af919a5e9 [LPC1347]: add support for RTOS 2013-07-17 15:28:34 +03:00
samuel.mokrani@arm.com f2ea747280 [LPC1347] Change LED pin names 2013-07-17 15:27:10 +03:00
Bogdan Marinescu 7d5e9dac70 [LPC1347] Added support for the ARM toolchain. 2013-07-17 15:25:18 +03:00
samuel.mokrani@arm.com 4bbd13b957 [LPC1347]: first implementation of USB device (not tested) 2013-07-17 15:23:54 +03:00
Bogdan Marinescu 358e84edf3 [LPC1347] Added GPIO interrupts 2013-07-17 15:17:20 +03:00
samuel.mokrani@arm.com 5b0fe44b0d [LPC1347]: first implementation of analogIn (not tested) 2013-07-17 15:17:19 +03:00
samuel.mokrani@arm.com 6b7f4b998e [LPC1347]: first implementation of PWMOut (not tested) 2013-07-17 15:17:09 +03:00
Bogdan Marinescu 721082257c Preliminary support for LPC13XX
Works only with GCC_ARM for now.
2013-07-17 14:57:02 +03:00
Emilio Monti 5020b9ad3b Stop using the patched microlib 2013-07-08 17:31:04 +01:00
jesusalvarez 804176b806 Update targets and pins for LPC43xx 2013-07-07 23:27:11 -04:00
0xc0170 43ace93009 removed KL05Z hw tests + mv KL05Z to TARGET_Freescale 2013-07-04 17:57:52 +02:00
0xc0170 551f06b66b Merge branch 'master' into freedomKL05
Conflicts:
	workspace_tools/toolchains/arm.py
2013-07-04 17:40:46 +02:00
0xc0170 2b57ae9c23 KL25 + KL05 - no pull down, pullup for INPUT pins by default
- pull down removal
  - ARMCC - debug information option
2013-07-03 19:39:19 +02:00
Emilio Monti 597c62e06a Add the vendor name as a proper target label 2013-07-03 17:14:43 +01:00
Helmut Schmucker e38bce5ccd fix for mbed lib issue 1 (i2c problem)
see also https://mbed.org/users/mbed_official/code/mbed/issues/1
2013-07-03 16:12:03 +01:00
0xc0170 c1c1102a89 i2c api update 2013-07-02 20:27:20 +02:00
0xc0170 9ff042699b Update freedomKL05 from upstream master 2013-07-02 19:44:15 +02:00
0xc0170 90bb8521aa ADC, code indentation
- ADC resolution - 12bit, all pins definition
  - code indentation
2013-07-02 19:34:11 +02:00
samux da778bd931 vodafone: non blocking circular buffer 2013-07-02 16:34:52 +01:00
Emilio Monti f4f34a025d Merge pull request #9 from spectaclelabs/fix-gpio-mode
Fix setting STM32 GPIO input/output mode.
2013-07-02 02:44:29 -07:00
Emilio Monti 585b369ab8 Explicitly add gpio write/read prototypes to the HAL header 2013-07-02 10:37:57 +01:00
Joe Turner fac01e3186 Fix setting GPIO input/output mode. 2013-07-02 10:37:24 +01:00
0xc0170 ed200183d0 RTC OSC32, systemUpdate v0.1
- RTC clock init from crystal, tested
  - system update function
  - startup - handler PORTB correction
2013-07-01 21:32:22 +02:00
Emilio Monti 95e66aa4c6 Move the target dependent code from the shared code to the HAL implementation 2013-07-01 18:05:31 +01:00
Bogdan Marinescu 28961db4a5 Added timeout to i2c_stop operations
Fixes this issue:

http://mbed.org/users/mbed_official/code/mbed/issues/3
2013-07-01 16:28:35 +01:00
Bogdan Marinescu 4a98d0ed7e Added I2C master/slave test 2013-07-01 16:28:33 +01:00
Bogdan Marinescu bfeb47f523 I2C API refactoring
Now the I2C send/receive functions in the mbed HAL return the number of
bytes actually transferred or an error code (a negative value). The
public API remains unchanged.
2013-07-01 16:28:32 +01:00
0xc0170 20789374a0 i2C - pulse definition, serial - define correction 2013-06-29 09:10:26 +02:00
0xc0170 7d3864f27b Update KL05 to mbed new structure 2013-06-29 09:08:28 +02:00
0xc0170 cd5d235e2b Merge branch 'master' into freedomKL05
Conflicts:
	workspace_tools/targets.py
	workspace_tools/tests.py
2013-06-29 07:53:32 +02:00
0xc0170 4c4d15f323 Serial api - clock, SPImaster test 2013-06-28 19:59:15 +02:00
Emilio Monti 265c5b405d Move common CMSIS headers
Remove obsolete CMSIS "*.c" files
2013-06-28 16:12:45 +01:00
0xc0170 5d169ce654 Clocks correction, ticker, tests
- systemInit - clock update (crystal 32768Hz)
  - us_ticker - MCG clock input
  - Kl05 testing - pin definitions for KL05 (all run in KEIL with debugger)
2013-06-27 23:20:47 +02:00
Joe Turner 6bfe908d8b Remove start to USB Device so only tested code is merged. 2013-06-26 14:05:33 +01:00
Joe Turner 3e40b905f0 Merge branch 'master' of git://github.com/mbedmicro/mbed into STM32F4
Conflicts:
	workspace_tools/targets.py
2013-06-26 13:34:34 +01:00
0xc0170 bf4746897f KL05 clock removal, I2C API
- spi - bus clock clock correction
  - i2c driver
2013-06-25 21:53:06 +02:00
jesusalvarez ecd051c7a1 LPC43xx port from Micromint 2013-06-25 02:20:08 -04:00
0xc0170 3884f1ba3c SPI API 2013-06-24 22:40:04 +02:00
0xc0170 19ead14dcb KL05 Clocks, PWM, RTC, Serial
- clock setup update
  - serial correction with core clock (define)
  - pwm defines
  - RTC clock
2013-06-24 19:41:54 +02:00
Emilio Monti 984ba4b113 Refactor the build system:
* add sets of TARGET and TOOLCHAIN "labels"
2013-06-24 14:32:08 +01:00
0xc0170 0bad32c110 Serial API
- serial UART0 added
  - correction in gpio irq (port b)
2013-06-23 22:55:23 +02:00
0xc0170 8a41a5ba9a KL05 analog in+out, gpio irq
- AnalogIn
  - AnalogOut
  - GPIO irq
  - target KL05 added
2013-06-23 18:22:46 +02:00
0xc0170 72659a220b HAL removing code for API which is not ported yet 2013-06-22 20:54:48 +02:00
0xc0170 a14d88f156 KL05 - target ARM - gpio, us_ticker
- cmsis - only one type of MCG at the moment
  - HAL - gpio pins
        - us_ticker
2013-06-21 20:39:27 +02:00
Joe Turner 92a5e412bd Merge branch 'master' into STM32F4
Conflicts:
	workspace_tools/build_api.py
	workspace_tools/data/support.py
	workspace_tools/libraries.py
	workspace_tools/paths.py
	workspace_tools/toolchains.py
2013-06-19 13:10:44 +01:00
Emilio Monti 90b614baf8 Unify mbed library sources
Remove stdio retargeting reference form cmsis: keep it as a standalone
object
Avoid object files clash for sources with the same name
2013-06-14 17:32:15 +01:00
Emilio Monti 31ee5e5f29 Refactoring of the mbed SDK:
- Provide a well defined HAL and API
- Keep separated the HAL implementations for the different targets
2013-06-10 15:44:08 +01:00
Joe Turner 425f177097 Untested start to USB device support. 2013-06-05 13:08:49 +01:00
Joe Turner fe625b1f65 Remove empty files, and not ported driver code. 2013-06-04 11:50:07 +01:00
Joe Turner af5bc356ca Changes to make port api work. 2013-06-04 11:30:51 +01:00
Joe Turner 79bb66bab5 Small fixes to make analog in work. 2013-06-03 16:42:28 +01:00
Joe Turner 32e7bb8b8c GPIO fixes to make digital input work. 2013-06-03 14:55:51 +01:00
Joe Turner a3fd58bf2b Initialize the I2S PLL in the system startup. 2013-05-31 08:49:12 +01:00
Joe Turner 9e3cd7f379 Make GPIOs use high-speed mode 2013-05-31 08:48:40 +01:00
Emilio Monti a0c51e0eff mirror the mbed.org libraries 2013-05-30 18:17:50 +01:00
Emilio Monti 1ac73081f6 setup main thread stack for GCC toolchains 2013-05-30 10:57:27 +01:00
Emilio Monti f3acb6c8fd cleanup 2013-05-30 10:56:18 +01:00
Joe Turner a71c955c35 Various small fixes to get I2C working. 2013-05-28 16:37:01 +01:00
Joe Turner e06063aa64 Lots of small fixes to make SPI work. 2013-05-16 11:02:16 +01:00
Joe Turner 9329d73d87 Leave enough space at the start of the RAM block for the dynamic
vectors.
2013-05-16 11:01:38 +01:00
Andreas Rebert 2662e105c4 Add support for NXP LPC4088 2013-05-16 08:53:02 +02:00
Joe Turner bec4ecab29 Add fixes for us_ticker so it updates the prescale register after the
counter is enabled, and uses the capture/compare register rather than
the auto-reset register to trigger interrupts.
2013-05-15 11:54:23 +01:00
Joe Turner 4e68eaef57 Make pinmap and port API use the correct memory region for the GPIOs. 2013-05-14 11:00:18 +01:00
Joe Turner 3a0c872df4 Small fixes to the GPIO api, meaning it works! 2013-05-14 10:59:14 +01:00
Joe Turner 8ffca414a5 Generate update event when initializing the ticker so the new prescaler
value is used straight away.
2013-05-14 10:58:37 +01:00
Emilio Monti be73e26366 [mbed::net] Not shutting down the socket, before closing it, is not robust in lwIP 2013-05-14 10:41:47 +01:00
Joe Turner e6ff45d87c Remove moved options file. 2013-05-13 14:35:32 +01:00
Joe Turner 8efa81bb32 Lot of small fixes to cmsis code so it works correctly. 2013-05-13 14:34:38 +01:00
Emilio Monti 992f34117a Use two separate toolchains for CodeWarrior: one using EWL and one using newlib 2013-05-10 16:36:40 +01:00
samux 4292adebc1 [KL25Z]: spi slave and i2c slave support 2013-05-08 16:05:57 +01:00
Emilio Monti 3f5db944ab In the Keil MDK toolchain RTX_Config.h is a special system library header file 2013-04-30 11:58:51 +01:00
Emilio Monti a6cad7b15e Prepare support for ARMCC 5.03 (mainline microlib) 2013-04-24 15:29:23 +01:00
Emilio Monti a44371aa5c Fix typo in mbed-rpc parse_pins 2013-04-24 15:26:47 +01:00
Emilio Monti 15e1cb5bbb Add KL25Z support to rtos 2013-04-24 15:25:28 +01:00
Joe Turner 179b7f677e Add us_ticker api. 2013-04-24 14:29:53 +01:00
Joe Turner 0b01040f47 Lots of small changes which get us compiling. 2013-04-24 11:48:27 +01:00
Joe Turner 7fba5bae39 Add fix for non-compiling analog in C API when median filtering is disabled. 2013-04-24 09:52:45 +01:00
Joe Turner b4c4ae8f09 Add options.json file for STM32. 2013-04-24 09:46:59 +01:00
Joe Turner f1a18358b8 Add device specific pin definitions, etc. 2013-04-24 09:46:22 +01:00
Joe Turner a28d1704be Add define to let stm32f4xx.h know which uC version we are working with. 2013-04-24 09:45:30 +01:00
Joe Turner f51b151a9c Add pinmap. 2013-04-24 09:45:09 +01:00
Joe Turner 7acc783058 Add SPI api 2013-04-24 09:44:55 +01:00
Joe Turner 56ad7f7d58 Add I2C master mode API 2013-04-24 09:44:44 +01:00
Joe Turner 93b0048cb5 Add GPIO api 2013-04-24 09:41:15 +01:00
Joe Turner 883d9855d3 Add analog in api 2013-04-24 09:40:58 +01:00
Joe Turner 96f69ae818 Add untested port api 2013-04-24 09:40:33 +01:00
Joe Turner 4718fc6e2b Add alternative function to pinmap for STM32. 2013-04-24 09:39:28 +01:00
Emilio Monti 1cfac4cec4 Add parse_pins function removed from the mbed library 2013-04-22 17:53:15 +01:00
Joe Turner d18875bee3 Add nvic dynamic vector handling. 2013-04-19 10:11:13 +01:00
Joe Turner ed9e0c1f0f Start adding STM32F4 cmsis and placeholders for the C API 2013-04-18 17:13:08 +01:00
Emilio Monti a607392724 [LPC812] Add us_ticker interrupts, board pin names and tests 2013-04-17 16:32:49 +01:00
Emilio Monti 0037711cc5 Merge pull request #1 from pbrier/master
Build USB libs with GCC_ARM
2013-04-16 02:38:15 -07:00
Emilio Monti 3f684a518f Add initial KL25Z startup code and linker script for Code Warrior 2013-04-11 17:22:34 +01:00
Emilio Monti 498d5efcc4 Add LPC812 peripherals 2013-04-11 17:19:34 +01:00
Emilio Monti 49b28faba3 Update tests 2013-04-11 17:13:23 +01:00
pbrier 4440251d78 Added __packed macro to be compatible with GCC compiler, in order to build USB libs with GCC_ARM 2013-04-06 15:50:57 +02:00
Emilio Monti 3fa0f0a3c0 [KL25Z] Use channel 0 as a prescaler for channel 1 2013-03-21 13:33:59 +00:00
Emilio Monti db129a9c27 [KL25Z] Improve division by constant integer in us_ticker implementation. 2013-03-18 17:20:05 +00:00
samux a498bff4a7 usbhost: fixed skip bits/max size conf descriptor 2013-03-18 14:54:08 +00:00
emilmont b8b42d3abd Fix GCC build including define of ARMCC intrinsic __disable_irq
Change-Id: I13ca92e54d8f752cca18f5c75ac026526419edbe
2013-03-18 10:31:26 +00:00
Emilio Monti ca6e1ed7ab [LPC812] Add serial_api implementation. Make sure to always pull in the stdio retargeting module. Remove redundant stdio serial initialization. 2013-03-15 17:11:28 +00:00
unknown 1c981f929a add USBHost library 2013-03-14 16:36:35 +00:00
Emilio Monti 80518c489c Add LPC812 target. Update tests. Remove obsolete documentation. Move shared code among targets to target independent layer. 2013-03-14 11:52:38 +00:00
Emilio Monti 5f09c37d0f [KL25Z] Fix us_ticker_api implementation and improve documentation 2013-03-05 18:16:46 +00:00
Emilio Monti a80058dc5f Add multicast and broadcast support 2013-03-01 17:02:35 +00:00
Emilio Monti faa724220f Add KL25Z tests and USBDevice implementation 2013-02-26 15:37:59 +00:00
Emilio Monti a5e0438a97 Add Freescale KL25Z 2013-02-26 14:57:42 +00:00
Emilio Monti 9ffa978741 [CodeSourcery Toolchain] Fix standard library retargeting removing duplicate _isatty. 2013-02-25 10:37:22 +00:00
Emilio Monti cfb0ae66ad [GCC toolchains] declare "__semihost" as "static inline" 2013-02-23 15:58:22 +00:00
Emilio Monti 5c20760685 Initial commit of the mbed libraries and tools 2013-02-18 15:32:11 +00:00