Skip to content

Commit 6ae1e9e

Browse files
committed
Merge branch 'master' of git://github.com/mbedmicro/mbed into bugfix-STM32-vectors
2 parents 0ef4905 + 544ac9e commit 6ae1e9e

File tree

162 files changed

+2476
-9629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+2476
-9629
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
*.py[cod]
22

3+
# Distribution dir
4+
dist
5+
6+
# MANIFEST file
7+
MANIFEST
8+
39
# Private settings
410
private_settings.py
511

@@ -53,4 +59,4 @@ uVision Project/
5359
debug.log
5460

5561
# Ignore OS X Desktop Services Store files
56-
.DS_Store
62+
.DS_Store

MANIFEST

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# file GENERATED by distutils, do NOT edit
2+
LICENSE
3+
setup.py
4+
workspace_tools/__init__.py
5+
workspace_tools/__init__.pyc
6+
workspace_tools/autotest.py
7+
workspace_tools/build.py
8+
workspace_tools/build_api.py
9+
workspace_tools/build_release.py
10+
workspace_tools/client.py
11+
workspace_tools/export_test.py
12+
workspace_tools/hooks.py
13+
workspace_tools/libraries.py
14+
workspace_tools/make.py
15+
workspace_tools/options.py
16+
workspace_tools/patch.py
17+
workspace_tools/paths.py
18+
workspace_tools/project.py
19+
workspace_tools/server.py
20+
workspace_tools/settings.py
21+
workspace_tools/size.py
22+
workspace_tools/syms.py
23+
workspace_tools/synch.py
24+
workspace_tools/targets.py
25+
workspace_tools/tests.py
26+
workspace_tools/utils.py
27+
workspace_tools/data/__init__.py
28+
workspace_tools/data/example_test_spec.json
29+
workspace_tools/data/support.py
30+
workspace_tools/data/rpc/RPCClasses.h
31+
workspace_tools/data/rpc/class.cpp
32+
workspace_tools/dev/__init__.py
33+
workspace_tools/dev/dsp_fir.py
34+
workspace_tools/dev/rpc_classes.py
35+
workspace_tools/export/__init__.py
36+
workspace_tools/export/codered.py
37+
workspace_tools/export/codered_lpc1768_cproject.tmpl
38+
workspace_tools/export/codered_lpc1768_project.tmpl
39+
workspace_tools/export/codered_lpc4088_cproject.tmpl
40+
workspace_tools/export/codered_lpc4088_project.tmpl
41+
workspace_tools/export/codesourcery.py
42+
workspace_tools/export/codesourcery_lpc1768.tmpl
43+
workspace_tools/export/ds5_5.py
44+
workspace_tools/export/ds5_5_lpc11u24.cproject.tmpl
45+
workspace_tools/export/ds5_5_lpc11u24.launch.tmpl
46+
workspace_tools/export/ds5_5_lpc11u24.project.tmpl
47+
workspace_tools/export/ds5_5_lpc1768.cproject.tmpl
48+
workspace_tools/export/ds5_5_lpc1768.launch.tmpl
49+
workspace_tools/export/ds5_5_lpc1768.project.tmpl
50+
workspace_tools/export/exporters.py
51+
workspace_tools/export/gcc_arm_lpc1768.tmpl
52+
workspace_tools/export/gccarm.py
53+
workspace_tools/export/iar.ewp.tmpl
54+
workspace_tools/export/iar.eww.tmpl
55+
workspace_tools/export/iar.py
56+
workspace_tools/export/uvision4.py
57+
workspace_tools/export/uvision4_kl25z.uvopt.tmpl
58+
workspace_tools/export/uvision4_kl25z.uvproj.tmpl
59+
workspace_tools/export/uvision4_lpc1114.uvopt.tmpl
60+
workspace_tools/export/uvision4_lpc1114.uvproj.tmpl
61+
workspace_tools/export/uvision4_lpc11c24.uvopt.tmpl
62+
workspace_tools/export/uvision4_lpc11c24.uvproj.tmpl
63+
workspace_tools/export/uvision4_lpc11u24.uvopt.tmpl
64+
workspace_tools/export/uvision4_lpc11u24.uvproj.tmpl
65+
workspace_tools/export/uvision4_lpc1347.uvopt.tmpl
66+
workspace_tools/export/uvision4_lpc1347.uvproj.tmpl
67+
workspace_tools/export/uvision4_lpc1768.uvopt.tmpl
68+
workspace_tools/export/uvision4_lpc1768.uvproj.tmpl
69+
workspace_tools/export/uvision4_lpc4088.uvopt.tmpl
70+
workspace_tools/export/uvision4_lpc4088.uvproj.tmpl
71+
workspace_tools/export/uvision4_lpc812.uvopt.tmpl
72+
workspace_tools/export/uvision4_lpc812.uvproj.tmpl
73+
workspace_tools/host_tests/__init__.py
74+
workspace_tools/host_tests/echo.py
75+
workspace_tools/host_tests/host_test.py
76+
workspace_tools/host_tests/mbedrpc.py
77+
workspace_tools/host_tests/net_test.py
78+
workspace_tools/host_tests/rpc.py
79+
workspace_tools/host_tests/tcpecho_client.py
80+
workspace_tools/host_tests/tcpecho_server.py
81+
workspace_tools/host_tests/tcpecho_server_loop.py
82+
workspace_tools/host_tests/udpecho_client.py
83+
workspace_tools/host_tests/udpecho_server.py
84+
workspace_tools/host_tests/example/BroadcastReceive.py
85+
workspace_tools/host_tests/example/BroadcastSend.py
86+
workspace_tools/host_tests/example/MulticastReceive.py
87+
workspace_tools/host_tests/example/MulticastSend.py
88+
workspace_tools/host_tests/example/TCPEchoClient.py
89+
workspace_tools/host_tests/example/TCPEchoServer.py
90+
workspace_tools/host_tests/example/UDPEchoClient.py
91+
workspace_tools/host_tests/example/UDPEchoServer.py
92+
workspace_tools/host_tests/example/__init__.py
93+
workspace_tools/toolchains/__init__.py
94+
workspace_tools/toolchains/arm.py
95+
workspace_tools/toolchains/gcc.py
96+
workspace_tools/toolchains/iar.py

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
graft workspace_tools
2+
include __init__.py LICENSE

libraries/USBHost/USBHost3GModule/IUSBHostSerial.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030

3131
#include "IUSBHostSerialListener.h"
3232

33+
// This is needed by some versions of GCC
34+
#undef putc
35+
#undef getc
36+
3337
class IUSBHostSerial {
3438
public:
3539

libraries/USBHost/USBHost3GModule/WANDongle.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
#define __MODULE__ "WANDongle.cpp"
2626
#endif
2727

28-
#include "core/dbg.h"
29-
#include <cstdint>
28+
#include "dbg.h"
29+
#include <stdint.h>
3030
#include "rtos.h"
3131

3232
#include "WANDongle.h"
@@ -47,7 +47,7 @@ bool WANDongle::tryConnect()
4747
{
4848
//FIXME should run on USB thread
4949

50-
DBG("Trying to connect device");
50+
USB_DBG("Trying to connect device");
5151

5252
if (dev_connected) {
5353
return true;
@@ -61,23 +61,23 @@ bool WANDongle::tryConnect()
6161
{
6262
m_pInitializer = NULL; //Will be set in setVidPid callback
6363

64-
DBG("Enumerate");
64+
USB_DBG("Enumerate");
6565
int ret = host->enumerate(dev, this);
6666
if(ret)
6767
{
6868
return false;
6969
}
7070

71-
DBG("Device has VID:%04x PID:%04x", dev->getVid(), dev->getPid());
71+
USB_DBG("Device has VID:%04x PID:%04x", dev->getVid(), dev->getPid());
7272

7373
if(m_pInitializer) //If an initializer has been found
7474
{
75-
DBG("m_pInitializer=%p", m_pInitializer);
76-
DBG("m_pInitializer->getSerialVid()=%04x", m_pInitializer->getSerialVid());
77-
DBG("m_pInitializer->getSerialPid()=%04x", m_pInitializer->getSerialPid());
75+
USB_DBG("m_pInitializer=%p", m_pInitializer);
76+
USB_DBG("m_pInitializer->getSerialVid()=%04x", m_pInitializer->getSerialVid());
77+
USB_DBG("m_pInitializer->getSerialPid()=%04x", m_pInitializer->getSerialPid());
7878
if ((dev->getVid() == m_pInitializer->getSerialVid()) && (dev->getPid() == m_pInitializer->getSerialPid()))
7979
{
80-
DBG("The dongle is in virtual serial mode");
80+
USB_DBG("The dongle is in virtual serial mode");
8181
host->registerDriver(dev, 0, this, &WANDongle::init);
8282
m_serialCount = m_pInitializer->getSerialPortCount();
8383
if( m_serialCount > WANDONGLE_MAX_SERIAL_PORTS )
@@ -86,13 +86,13 @@ bool WANDongle::tryConnect()
8686
}
8787
for(int j = 0; j < m_serialCount; j++)
8888
{
89-
DBG("Connecting serial port #%d", j+1);
90-
DBG("Ep %p", m_pInitializer->getEp(dev, j, false));
91-
DBG("Ep %p", m_pInitializer->getEp(dev, j, true));
89+
USB_DBG("Connecting serial port #%d", j+1);
90+
USB_DBG("Ep %p", m_pInitializer->getEp(dev, j, false));
91+
USB_DBG("Ep %p", m_pInitializer->getEp(dev, j, true));
9292
m_serial[j].connect( dev, m_pInitializer->getEp(dev, j, false), m_pInitializer->getEp(dev, j, true) );
9393
}
9494

95-
DBG("Device connected");
95+
USB_DBG("Device connected");
9696

9797
dev_connected = true;
9898

@@ -101,16 +101,16 @@ bool WANDongle::tryConnect()
101101
}
102102
else if ((dev->getVid() == m_pInitializer->getMSDVid()) && (dev->getPid() == m_pInitializer->getMSDPid()))
103103
{
104-
DBG("Vodafone K3370 dongle detected in MSD mode");
104+
USB_DBG("Vodafone K3370 dongle detected in MSD mode");
105105
//Try to switch
106106
if( m_pInitializer->switchMode(dev) )
107107
{
108-
DBG("Switched OK");
108+
USB_DBG("Switched OK");
109109
return false; //Will be connected on a next iteration
110110
}
111111
else
112112
{
113-
ERR("Could not switch mode");
113+
USB_ERR("Could not switch mode");
114114
return false;
115115
}
116116
}
@@ -168,21 +168,21 @@ void WANDongle::init()
168168
{
169169
WANDongleInitializer* initializer;
170170

171-
for(unsigned i = 0; i < m_totalInitializers; i++)
171+
for(int i = 0; i < m_totalInitializers; i++)
172172
{
173173
initializer = m_Initializers[i];
174-
DBG("initializer=%p", initializer);
175-
DBG("initializer->getSerialVid()=%04x", initializer->getSerialVid());
176-
DBG("initializer->getSerialPid()=%04x", initializer->getSerialPid());
174+
USB_DBG("initializer=%p", initializer);
175+
USB_DBG("initializer->getSerialVid()=%04x", initializer->getSerialVid());
176+
USB_DBG("initializer->getSerialPid()=%04x", initializer->getSerialPid());
177177
if ((dev->getVid() == initializer->getSerialVid()) && (dev->getPid() == initializer->getSerialPid()))
178178
{
179-
DBG("The dongle is in virtual serial mode");
179+
USB_DBG("The dongle is in virtual serial mode");
180180
m_pInitializer = initializer;
181181
break;
182182
}
183183
else if ((dev->getVid() == initializer->getMSDVid()) && (dev->getPid() == initializer->getMSDPid()))
184184
{
185-
DBG("Dongle detected in MSD mode");
185+
USB_DBG("Dongle detected in MSD mode");
186186
m_pInitializer = initializer;
187187
break;
188188
}
@@ -229,7 +229,7 @@ bool WANDongle::addInitializer(WANDongleInitializer* pInitializer)
229229

230230
WANDongle::~WANDongle()
231231
{
232-
for(unsigned i = 0; i < m_totalInitializers; i++)
232+
for(int i = 0; i < m_totalInitializers; i++)
233233
delete m_Initializers[i];
234234
}
235235

libraries/USBHost/USBHost3GModule/WANDongleInitializer.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323

2424
#ifdef USBHOST_3GMODULE
2525

26-
#include <cstdint>
27-
using std::uint16_t;
28-
using std::uint32_t;
26+
#include <stdint.h>
2927

3028
#include "USBHost.h"
3129
#include "IUSBEnumerator.h"
@@ -44,6 +42,7 @@ class WANDongleInitializer : public IUSBEnumerator
4442
uint8_t m_serialIntfMap[WANDONGLE_MAX_SERIAL_PORTS];
4543

4644
public:
45+
virtual ~WANDongleInitializer() {}
4746
virtual uint16_t getMSDVid() = 0;
4847
virtual uint16_t getMSDPid() = 0;
4948

libraries/USBHost/USBHost3GModule/WANDongleSerialPort.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
#define __MODULE__ "WANDongleSerialPort.cpp"
2626
#endif
2727

28-
#include "core/dbg.h"
29-
#include <cstdint>
28+
#include "dbg.h"
29+
#include <stdint.h>
3030
#include "rtos.h"
3131

3232
#include "WANDongleSerialPort.h"
@@ -65,31 +65,31 @@ void WANDongleSerialPort::reset()
6565

6666
int WANDongleSerialPort::readPacket()
6767
{
68-
DBG("Read packet on %p", this);
68+
USB_DBG("Read packet on %p", this);
6969
rx_mtx.lock();
7070
if(lock_rx)
7171
{
72-
ERR("Fail");
72+
USB_ERR("Fail");
7373
rx_mtx.unlock();
7474
return -1;
7575
}
7676

7777
if( bulk_in == NULL )
7878
{
79-
WARN("Port is disconnected");
79+
USB_WARN("Port is disconnected");
8080
rx_mtx.unlock();
8181
return -1;
8282
}
8383

8484
lock_rx = true; //Receiving
8585
rx_mtx.unlock();
86-
// DBG("readPacket");
86+
// USB_DBG("readPacket");
8787
//lock_rx.lock();
8888
USB_TYPE res = host->bulkRead(dev, (USBEndpoint *)bulk_in, buf_in, ((USBEndpoint *)bulk_in)->getSize(), false); //Queue transfer
8989
if(res != USB_TYPE_PROCESSING)
9090
{
9191
//lock_rx.unlock();
92-
ERR("host->bulkRead() returned %d", res);
92+
USB_ERR("host->bulkRead() returned %d", res);
9393
Thread::wait(100);
9494
return -1;
9595
}
@@ -101,28 +101,28 @@ int WANDongleSerialPort::writePacket()
101101
tx_mtx.lock();
102102
if(lock_tx)
103103
{
104-
ERR("Fail");
104+
USB_ERR("Fail");
105105
tx_mtx.unlock();
106106
return -1;
107107
}
108108

109109
if( bulk_out == NULL )
110110
{
111-
WARN("Port is disconnected");
111+
USB_WARN("Port is disconnected");
112112
tx_mtx.unlock();
113113
return -1;
114114
}
115115

116116
lock_tx = true; //Transmitting
117117
tx_mtx.unlock();
118-
// DBG("writePacket");
118+
// USB_DBG("writePacket");
119119

120120
//lock_tx.lock();
121121
USB_TYPE res = host->bulkWrite(dev, (USBEndpoint *)bulk_out, buf_out, buf_out_len, false); //Queue transfer
122122
if(res != USB_TYPE_PROCESSING)
123123
{
124124
//lock_tx.unlock();
125-
ERR("host->bulkWrite() returned %d", res);
125+
USB_ERR("host->bulkWrite() returned %d", res);
126126
Thread::wait(100);
127127
return -1;
128128
}
@@ -142,7 +142,7 @@ int WANDongleSerialPort::putc(int c)
142142
}
143143
else
144144
{
145-
ERR("CAN'T WRITE!");
145+
USB_ERR("CAN'T WRITE!");
146146
}
147147
tx_mtx.unlock();
148148
return c;
@@ -162,7 +162,7 @@ int WANDongleSerialPort::getc()
162162
}
163163
else
164164
{
165-
ERR("CAN'T READ!");
165+
USB_ERR("CAN'T READ!");
166166
}
167167
rx_mtx.unlock();
168168
return c;
@@ -305,7 +305,7 @@ void WANDongleSerialPort::rxHandler()
305305
else //Error, try reading again
306306
{
307307
//lock_rx.unlock();
308-
DBG("Trying again");
308+
USB_DBG("Trying again");
309309
readPacket();
310310
}
311311
}

0 commit comments

Comments
 (0)