Mouse Host

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mouse Host

730 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fumio yoshizawa on Tue Mar 24 01:45:23 MST 2015
Hi,
I am try to use usb library with LPCXpresso LCP11U14.
And I success to run  Example_GenericHIDDevice.
But I want to make "Mouse Host".
Is it possible to make it?

Best Regards,
F.Y
0 Kudos
Reply
8 Replies

678 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fumio yoshizawa on Sun May 24 19:57:00 MST 2015
Hi lpcxpresso-support,

Thank you so much.
It was going to pass. But next error undefined "ret_get_PSP". So I add "GCC_ARM" folder to USBHost\rtx folder.
And also add include path "${workspace_loc:/${ProjName}/USBHost/mbed-rtos/rtx/GCC_ARM}".
I wander why mbed export to lpcxpresso remove these source files. Anyway I success to build and run.
But unfortunately running stop this error.

No source available for "HardFault_Handler() at 0xf8"

I try to debug Step into and I find out the error of this line.

void rt_put_rdy_first (P_TCB p_task) {
  /* Put task identified with "p_task" at the head of the ready list. The   */
  /* task must have at least a priority equal to highest priority in list.  */
  p_task->p_lnk = os_rdy.p_lnk;
  p_task->p_rlnk = NULL;      <--------   this line  happen'd error
  os_rdy.p_lnk = p_task;
}

I can't fix it how to the way.
Could you advice for me something?

Best Regards,
F.Y
0 Kudos
Reply

678 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu May 21 23:12:00 MST 2015

Quote: fumio yoshizawa

Then I recompile the project. But error is same as this follow line.
static volatile __align(256) uint8_t usb_buf[TOTAL_SIZE] __attribute((section("AHBSRAM1"),aligned));  //256 bytes aligned!



__align(256) is an armcc C extension. You need to move the alignment request into the __attribute__ clause.

Something like the following (untested) definition:
static volatile uint8_t usb_buf[TOTAL_SIZE] __attribute__((section("AHBSRAM1"),aligned(256)));


For more details see:

https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Variable-Attributes.html

Regards,
LPCXpresso Support
0 Kudos
Reply

678 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fumio yoshizawa on Thu May 21 18:09:41 MST 2015
Hi everyone,

I know same file was not copy from embed to export project.
That files were some assembly files in LPC1768 folder.
I add that files to LPCXpresso to " USBHostMouse_HelloWorld\USBHost\mbed-rtos\rts".
LPC1768 folder was include ARM and GCC_ARM folders and each folder was same assembly files.
Then I recompile the project. But error is same as this follow line.
static volatile __align(256) uint8_t usb_buf[TOTAL_SIZE] __attribute((section("AHBSRAM1"),aligned));  //256 bytes aligned!
Please same advice for me.
Best Regards,
F.Y
0 Kudos
Reply

678 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fumio yoshizawa on Tue May 19 00:09:57 MST 2015
Hi everyone,

I try to continue make USBMouseHost .
I export mbed UsbMouseHost example and import in to lpcxpresso.
USBHostMouse_HellowWorld_lpcxpresso_lpc1768.zip slight change about cmsis_os.h
add to #define TOOLCHAIN_GCC_ARM. And the it build.
But follow error appear.
./USBHost/USBHost/USBHALHost.cpp:42:24: error: ISO C++ forbids declaration of '__align' with no type [-fpermissive]
../USBHost/USBHost/USBHALHost.cpp:42:30: error: expected ',' or ';' before 'uint8_t'
My environment LPCXpresso v772_379 and target lpc1769.
I can't cause of error.

Please any advice for me.
F.Y
0 Kudos
Reply

678 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Mar 26 01:10:36 MST 2015
No, you need an MCU with a USB host controller. LPC11U24 only has a USB device controller.

You need an LPC17xx,  LPC18xx, LPC40xx or LPC43xx if you want your MCU to act as a USB host.

Regards,
LPCXpresso Support
0 Kudos
Reply

678 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fumio yoshizawa on Wed Mar 25 19:14:10 MST 2015
Hi,

I want to ask more.
I read about nxpUSBlib and how to use it.
But Can we make possible "Mouse Host" use LPC11U24/14 or not?

Regards,
F.Y,
0 Kudos
Reply

678 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fumio yoshizawa on Tue Mar 24 16:52:35 MST 2015
Hi mc,

Thank you for replay.
I see It's cpu need more ability right.
I want to control  3 axis and use 3 step motors by Mouse.
So I need Mouse Host.
Which cpu recommended ?

Best Regards,
F.Y
0 Kudos
Reply

678 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Tue Mar 24 06:34:26 MST 2015
Hi F.Y.
To make any product USB host, you will need Micro-controller with Host capabilities. You can use LPC1700/LPC1800/LPC4300.


Quote:
But I want to make "Mouse Host".
Is it possible to make it?



Could you please explain in detail?
0 Kudos
Reply