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

Compilation error: 'Serial3' was not declared in this scope #21

Open
andru666 opened this issue Sep 13, 2023 · 1 comment
Open

Compilation error: 'Serial3' was not declared in this scope #21

andru666 opened this issue Sep 13, 2023 · 1 comment

Comments

@andru666
Copy link

Hi, it doesn't work with arduino nano. Here is such a mistake
FQBN: arduino:avr:nano:cpu=atmega328old
Using board 'nano' from platform in folder: C:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\eightanaloginputs C:\Users\ANDREAS\AppData\Local\Temp\arduino\sketches\DD420099BF8F7ED02C7B25D704E2BE58\sketch\basic_working.ino.cpp -o nul
Alternatives for KWP2000.h: [[email protected]]
ResolveLibrary(KWP2000.h)
-> candidates: [[email protected]]
C:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\eightanaloginputs -Ic:\Users\ANDREAS\Documents\Arduino\libraries\KWP2000\src C:\Users\ANDREAS\AppData\Local\Temp\arduino\sketches\DD420099BF8F7ED02C7B25D704E2BE58\sketch\basic_working.ino.cpp -o nul
C:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\eightanaloginputs -Ic:\Users\ANDREAS\Documents\Arduino\libraries\KWP2000\src c:\Users\ANDREAS\Documents\Arduino\libraries\KWP2000\src\KWP2000.cpp -o nul
Generating function prototypes...
C:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\eightanaloginputs -Ic:\Users\ANDREAS\Documents\Arduino\libraries\KWP2000\src C:\Users\ANDREAS\AppData\Local\Temp\arduino\sketches\DD420099BF8F7ED02C7B25D704E2BE58\sketch\basic_working.ino.cpp -o C:\Users\ANDREAS\AppData\Local\Temp\3594476015\sketch_merged.cpp
C:\Users\ANDREAS\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\ANDREAS\AppData\Local\Temp\3594476015\sketch_merged.cpp
Компиляция скетча...
"C:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\ANDREAS\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\eightanaloginputs" "-Ic:\Users\ANDREAS\Documents\Arduino\libraries\KWP2000\src" "C:\Users\ANDREAS\AppData\Local\Temp\arduino\sketches\DD420099BF8F7ED02C7B25D704E2BE58\sketch\basic_working.ino.cpp" -o "C:\Users\ANDREAS\AppData\Local\Temp\arduino\sketches\DD420099BF8F7ED02C7B25D704E2BE58\sketch\basic_working.ino.cpp.o"
C:\Users\ANDREAS\AppData\Local\Temp.arduinoIDE-unsaved2023813-2476-1h7eo93.5f3c\basic_working\basic_working.ino:12:14: error: 'Serial3' was not declared in this scope
#define bike Serial3
^
C:\Users\ANDREAS\AppData\Local\Temp.arduinoIDE-unsaved2023813-2476-1h7eo93.5f3c\basic_working\basic_working.ino:19:14: note: in expansion of macro 'bike'
KWP2000 ECU(&bike, TX_PIN, YOUR_MOTORBIKE);
^~~~
C:\Users\ANDREAS\AppData\Local\Temp.arduinoIDE-unsaved2023813-2476-1h7eo93.5f3c\basic_working\basic_working.ino:12:14: note: suggested alternative: 'Serial'
#define bike Serial3
^
C:\Users\ANDREAS\AppData\Local\Temp.arduinoIDE-unsaved2023813-2476-1h7eo93.5f3c\basic_working\basic_working.ino:19:14: note: in expansion of macro 'bike'
KWP2000 ECU(&bike, TX_PIN, YOUR_MOTORBIKE);
^~~~
C:\Users\ANDREAS\AppData\Local\Temp.arduinoIDE-unsaved2023813-2476-1h7eo93.5f3c\basic_working\basic_working.ino:19:28: error: 'YOUR_MOTORBIKE' was not declared in this scope
KWP2000 ECU(&bike, TX_PIN, YOUR_MOTORBIKE);
^~~~~~~~~~~~~~

Используем библиотеку KWP2000 версии 1.3.0 из папки: C:\Users\ANDREAS\Documents\Arduino\libraries\KWP2000
exit status 1

Compilation error: 'Serial3' was not declared in this scope

@66zai
Copy link

66zai commented Sep 13, 2023 via email

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

No branches or pull requests

2 participants