fabriceo / SCoop

Simple Cooperative Scheduler for Arduino and Teensy ARM and AVR
126 stars 82 forks source link

V1.8.8 arduino undefined reference to `timer0_overflow_count' #6

Open onionstack opened 5 years ago

onionstack commented 5 years ago

Leonardo:

C:\Users\l\AppData\Local\Temp\ccyqFSrX.ltrans0.ltrans.o: In function `SCoopMicros16':

D:\Arduino-mindPlus\hardware\arduino\avr\libraries\SCoop/SCoop.cpp:226: undefined reference to `timer0_overflow_count'

D:\Arduino-mindPlus\hardware\arduino\avr\libraries\SCoop/SCoop.cpp:226: undefined reference to `timer0_overflow_count'

D:\Arduino-mindPlus\hardware\arduino\avr\libraries\SCoop/SCoop.cpp:226: undefined reference to `timer0_overflow_count'

collect2.exe: error: ld returned 1 exit status

fabriceo commented 5 years ago

Hi the problem is that now the Arduino library is not declaring the timer0_overflow_count as a global public variable... the only way to solve is to edit the Arduino library and to make this variable visible/public

best regards & good luck fabriceo

Le lun. 13 mai 2019 à 05:20, LI Xin notifications@github.com a écrit :

C:\Users\l\AppData\Local\Temp\ccyqFSrX.ltrans0.ltrans.o: In function `SCoopMicros16':

D:\Arduino-mindPlus\hardware\arduino\avr\libraries\SCoop/SCoop.cpp:226: undefined reference to `timer0_overflow_count'

D:\Arduino-mindPlus\hardware\arduino\avr\libraries\SCoop/SCoop.cpp:226: undefined reference to `timer0_overflow_count'

D:\Arduino-mindPlus\hardware\arduino\avr\libraries\SCoop/SCoop.cpp:226: undefined reference to `timer0_overflow_count'

collect2.exe: error: ld returned 1 exit status

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fabriceo/SCoop/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYX5NQIZT6XC7VUVFPSVMDPVDM6JANCNFSM4HMMBGCA .

--

Envoyé depuis mon compte Gmail personnelSent from my Gmail personnal account

fuwenchao2426 commented 5 years ago

@fabriceo Hello, I really like Scoop. How to modify it in Arduino V1.8.9 can I use it normally? I found it in "\hardware\arduino\avr\cores\arduino\wiring.c", but I will not modify it. Please tell me the method, thank you very much!

soif commented 4 years ago

If found a workaround fix years ago, subitted a PR and @fabriceo had merged this fix in his v1.21 branch : https://github.com/fabriceo/SCoop/tree/v1.2.1

I did not check this with newer Arduino versions, since my initial PR, but if it still works, I strongly suggest that @fabriceo merge it into the master branch, so that all users get a workable version of this nice library, (without having to submit new issue)...

My 2cts

soif commented 4 years ago

BTW: there's even a PR (#7) asking to merge 1.21 into master... ;-)