Problems with USB HID using AT91SAM7SE512SE

OP #1173306
Hi,
I'm trying to set up an USB Human Interface Device like discripted at
the Atmel-Site.
(http://atmel.com/dyn/products/tools_card.asp?tool_id=4092)


My problem is, that I want to use the GNU Chain Tool with "arm-elf-gcc"
and "make" for Windows. In the pdf-Readme is said, that I have to use
nmake. I have no idea how to change the example to use it with make.

I found at
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/index_at91.html#at91_usb1
the "AT91 USB Core + HID Code ported to GNU/gcc"-project which I also
tried to run. With starting the building-process the message prompt:

**** Build of configuration Default for project HID ****

make all
make: *** No rule to make target `all'.  Stop.


So, in the end I spent a lot of time and have no idea how to fix the
problem.
I can't be so difficult to run a simple program for this
Microcontroller...
OP #1173307
> I found at
> 
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/index_at91.html#at91_usb1
> the "AT91 USB Core + HID Code ported to GNU/gcc"-project which I also
> tried to run. With starting the building-process the message prompt:
>
> **** Build of configuration Default for project HID ****
>
> make all
> make: *** No rule to make target `all'.  Stop.


Ok. This was mistake I did. Solved the one and get new one :)
I have the AT91SAM7SE512 on a AT91SAM7SE512-EK Board.
The make-command "make TARGET=AT91SAM7SE512 BOARD=AT91SAM7SE512-EK" is
followed with errors:

board.h:80:6: error: #error core_board.h Main clock
board.h:147:2: error: #error message core_board.h led
board.h:225:6: error: #error core_board.h switch
board.h:267:10: error: #error core_board.h BUS POWERED
In file included from device.c:46:
board.h: In function 'AT91F_LED_On':
board.h:298: error: 'LED_PIO' undeclared (first use in this function)
board.h:298: error: (Each undeclared identifier is reported only once
board.h:298: error: for each function it appears in.)
board.h: In function 'AT91F_LED_Off':
board.h:307: error: 'LED_PIO' undeclared (first use in this function)
board.h: In function 'AT91F_LED_Init':
board.h:315: error: 'LED_PIO_ID' undeclared (first use in this function)
board.h:316: error: 'LED_PIO' undeclared (first use in this function)
board.h:316: error: 'LED_POWER' undeclared (first use in this function)
board.h:317: error: 'LED_USB' undeclared (first use in this function)
board.h:318: error: 'LED_MEM' undeclared (first use in this function)
board.h: In function 'AT91F_LED_Toggle':
board.h:327: error: 'LED_PIO' undeclared (first use in this function)
board.h: In function 'AT91F_BUTTON_Init':
board.h:342: error: 'SWITCH_PIO_ID' undeclared (first use in this
function)
board.h:343: error: 'SWITCH_PIO' undeclared (first use in this function)
board.h:343: error: 'SWITCH1' undeclared (first use in this function)
board.h:344: error: 'SWITCH2' undeclared (first use in this function)
board.h:345: error: 'SWITCH3' undeclared (first use in this function)
board.h:346: error: 'SWITCH4' undeclared (first use in this function)

Any idea, what I have to change, to build the project without errors? I
haven't found any information for this problem.

Thanks, Christian
OP #1173308
OOOOOOOOOOOoookaaaayyy...

The Boardname was worng in the commandline. Right way is most likely

"make TARGET=AT91SAM7SE512 BOARD=AT91SAM7SEEK MODE=MOUSE".

mthomans edit the device.h file and exact for this line I get following
error-message:
"device.c:117: error: 'struct _AT91S_MC' has no member named 'MC_FMR'"

Anybody knows for what this line is and why it don't work with
AT91SAM7SE512-Evaluation Board? And maybe how to fix this?

I searched for the file in which the struct is defined but didn't find
any result.


Thanks, Christian
OP #1173310
Martin Thomas wrote:
> What version of make do you use (output of make --version)?

make v3.81


I got external help and I get the suggestion to exchange the code-line
with the following:

AT91C_BASE_MC->MC0_FMR = AT91C_MC_FWS_1FWS;
AT91C_BASE_MC->MC1_FMR = AT91C_MC_FWS_1FWS;

After doing the exchange, the example-project worked.

If you have another solution, let me know.

Regards,
Christian

Reply

A question of your own? This thread is over 18 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.