Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for USB slave functions on smaller micro's (e.g. LPC11U23) #68

Closed
pbrier opened this issue Sep 16, 2013 · 5 comments
Closed

Support for USB slave functions on smaller micro's (e.g. LPC11U23) #68

pbrier opened this issue Sep 16, 2013 · 5 comments

Comments

@pbrier
Copy link
Contributor

pbrier commented Sep 16, 2013

When using smaller microcontrollers, like the LPC11U23, some USB functions take up a considerable amount of memory, and do fit or leave too little memory for useful work (depending on compiler and std. libraries used; KEIL performing better than GCC). One solution is not to include the Stream class, and remove this from the USB classes. Now it does fit (of course you loose the standard Stream functionality on the interface):

For example: modify line 92 of USBKeyboard.h from:

class USBKeyboard: public USBHID, public Stream {

to

class USBKeyboard: public USBHID {

Note: A similar issue is occurs with the Serial() class, you can remove the Stream or access the C-api directly to conserve memory.

Question: Can a build option be provided for compilation without Stream classes?
(e.g. NOCPPSTREAM?)

@emilmont
Copy link
Contributor

Hi Peter,
did you collect some numbers about how much memory it would save?

Thanks,
Emilio

@mbednotifications
Copy link

On Monday, September 16, 2013 1:13:56 PM UTC-4, Peter Brier wrote:

When using smaller microcontrollers, like the LPC11U23, some USB functions
take up a considerable amount of memory

NXP LPC11Uxx, LPC18xx and LPC43xx MCUs include a USB device stack in ROM
that can reduce code and memory size requirements for implementing USB
devices. It supports CDC, DFU, HID, MSC and custom classes, including
composites. Documentation is somewhat weak, so a solid implementation
usually takes some iteration. We have used it with our LPC43xx boards and
it works well. May consider adding support for it in the mbed LPC43xx port
later this year.

http://docs.lpcware.com/usbromlib/v1.0/

Regards,
Jesus Alvarez

@mbednotifications
Copy link

You could also consider to disable DEVICE_STDIO_MESSAGES. Those take up
quite some memory as well.

On Monday, September 16, 2013 10:13:56 AM UTC-7, Peter Brier wrote:

When using smaller microcontrollers, like the LPC11U23, some USB functions
take up a considerable amount of memory, and do fit or leave too little
memory for useful work (depending on compiler and std. libraries used; KEIL
performing better than GCC). One solution is not to include the Stream
class, and remove this from the USB classes. Now it does fit (of course you
loose the standard Stream functionality on the interface):

For example: modify line 92 of USBKeyboard.h from:

class USBKeyboard: public USBHID, public Stream {

to

class USBKeyboard: public USBHID {

Note: A similar issue is occurs with the Serial() class, you can remove
the Stream or access the C-api directly to conserve memory.

Question: Can a build option be provided for compilation without Stream
classes?
(e.g. NOCPPSTREAM?)


Reply to this email directly or view it on GitHubhttps://github.com//issues/68
.

bridadan pushed a commit that referenced this issue Jun 21, 2016
@ciarmcom
Copy link
Member

ciarmcom commented Aug 1, 2016

ARM Internal Ref: IOTMORF-330

@sg- sg- added enhancement and removed mirrored labels Aug 12, 2016
deepikabhavnani pushed a commit to deepikabhavnani/mbed-os that referenced this issue Jun 15, 2017
adbridge pushed a commit that referenced this issue Jul 14, 2017
artokin pushed a commit to artokin/mbed-os that referenced this issue Aug 23, 2017
… from e125164..d65b6b0

d65b6b0 Update unittests for nsdynmemlib API change (ARMmbed#71)
bc69b8b Disable CoAP duplicate message detection (ARMmbed#69)
ccb65f8 Change year 2017 to copyright (ARMmbed#68)
76490a7 Add option to join COAP multicast group (ARMmbed#67)
381d910 Register to multicast groups (ARMmbed#66)
dce323c Add transaction delete to CoAP service (ARMmbed#65)
feea33e Add option to select used socket interface (ARMmbed#63)
5a5c0f9 Merge pull request ARMmbed#62 from ARMmbed/coap_separation
0d26c00 Modifying file headers and Makefile  to adapt from libcoap to mbed-coap
d323c3a Fixing unit tests based on new coap library
d1a3d25 Modifying Makefile and source file based on new coap library

git-subtree-dir: features/nanostack/FEATURE_NANOSTACK/coap-service
git-subtree-split: d65b6b0
@ghost
Copy link

ghost commented Oct 27, 2017

GitHib issue review: Closed due to inactivity. Please re-file if critical issues found.

@ghost ghost closed this as completed Oct 27, 2017
0xc0170 pushed a commit that referenced this issue Jul 2, 2018
…45db..2705b9b

2705b9b Add IPv4 string conversion utils
8978dac Add API to set temporary allocation heap limit (#70)
86fa01c Update max heap size to use size_t (#68)
9808289 nsdynmemlib: silence IAR warnings caused by gotos skipping variable init

git-subtree-dir: features/frameworks/nanostack-libservice
git-subtree-split: 2705b9b93877f18828106df80af5b8c1c441e713
linlingao added a commit to linlingao/mbed-os that referenced this issue Jul 12, 2019
pan- added a commit to pan-/mbed that referenced this issue May 29, 2020
pan- added a commit to pan-/mbed that referenced this issue May 29, 2020
Updating mbed-os to mbed-os-5.4.1
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants