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

Make throws Error 2: clock_div_1 undeclared #25

Open
sanotronics opened this issue May 9, 2015 · 0 comments
Open

Make throws Error 2: clock_div_1 undeclared #25

sanotronics opened this issue May 9, 2015 · 0 comments
Labels

Comments

@sanotronics
Copy link

Hi! I downloaded the last version yesterday and tried recompiling to rename my device and I had 2 different issues.
I am using windows 7, 64 bit, and "LUFA-140928"

The first one was that I had to erase every other project from the lufa Projects folder, since I was getting an error at Benito.c xD

The second one was with the file "arduino-midi.c"
2015-05-09 10_36_42-new issue ddiakopoulos_hiduino

I got that error on line 74, so I checked and with some search I found this:
http://fab.cba.mit.edu/classes/863.14/people/andrew_mao/week11/

Apparently "clock_div_1" is not defined in avr/power.h for Atmega16u2, so for make to work, and still disable the clock prescaler you need to comment line 74 and add this code:

CLKPR = (1 << CLKPCE);
CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0);

That works!

Thx for hiduino guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants