Closed brunoproza closed 1 year ago
Hey Carlo, sure I can help.
I just clean compiled on my laptop, so I guess there might be a problem with your setup or config.h settings. I assume you are using the latest version, and that you select the ESP32 dev board.
Also, did you copy the ESP32 libraries over from your cloned github folder to your arduino library folder?
If you post your config.h here I can take a look at it.
I'm sorry, I got confused with the name of the board
I'm actually using a blue pill stm32.
I'm using the latest version of the Tracker antenna, I copied all the libraries, and adjusted the arduino ide settings as your post quoted above
but I always get this serial error :/
Check out this link: []https://github.com/stm32duino/Arduino_Core_STM32
Did you use this json?
Add this link in the "Additional Boards Managers URLs" field:
https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
I changed it to the JSON informed above, I will perform a new test
Again the same error, here are some prints that maybe can help to show my problem more.
I put the informed JSON
installed all dependencies
I set the options to STM32
but when running the code verification I get the error below. (all apparently related to the serial)
In file included from C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:126:
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino: In function 'void setup()':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:350:3: note: in expansion of macro 'log'
350 | log.begin(115200);
| ^~~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino: In function 'void loop()':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1005:15: note: in expansion of macro 'log'
1005 | log.println("Dynamic tracking (moving home) started"); // moving home tracking
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1015:15: note: in expansion of macro 'log'
1015 | log.println("Dynamic tracking (moving home) failed. No good tracker box compass!");
| ^~~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino: In function 'void FinalStoreHome()':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1118:11: note: in expansion of macro 'log'
1118 | log.print("Heading calculated = "); log.print(hom.hdg, 1);
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1151:9: note: in expansion of macro 'log'
1151 | log.println("Trackerbox GPS/Compass. Should never get here because home is dynamic!");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1157:9: note: in expansion of macro 'log'
1157 | log.println("No headingSource!");
| ^~~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino: In function 'void FirstStoreHome()':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1176:5: note: in expansion of macro 'log'
1176 | log.print("Static home location AUTO set to ");
| ^~~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino: In function 'void DisplayHome()':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1187:5: note: in expansion of macro 'log'
1187 | log.print("Static home location set to Lat = "); log.print(hom.lat,7);
| ^~~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino: In function 'void DisplayHeadingSource()':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1201:7: note: in expansion of macro 'log'
1201 | log.printf("headingSource = %u FC GPS\n", headingSource);
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1205:7: note: in expansion of macro 'log'
1205 | log.printf("headingSource = %u FC Compass\n", headingSource);
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1209:7: note: in expansion of macro 'log'
1209 | log.printf("headingSource = %u Tracker Box Compass\n", headingSource);
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\AntTrack.ino:1213:7: note: in expansion of macro 'log'
1213 | log.printf("Dynamic heading source = %u Tracker Box Compass\n", headingSource);
| ^~~
C:\temp\AntTracker\Source\AntTrack\Compass.ino: In function 'bool initialiseCompass()':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Compass.ino:28:7: note: in expansion of macro 'log'
28 | log.println("No HMC5883 compass found!");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Compass.ino:32:7: note: in expansion of macro 'log'
32 | log.println("No HMC5883 compass found! No box orientation!");
| ^~~
C:\temp\AntTracker\Source\AntTrack\FrSky.ino: In function 'bool SPort_Read_A_Frame(uint8_t)':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\FrSky.ino:244:10: note: in expansion of macro 'log'
244 | log.printf("S.Port goodFrames:%d badFrames:%d frame loss:%.3f%%\n", goodFrames, badFrames, packetloss);
| ^~~
C:\temp\AntTracker\Source\AntTrack\FrSky.ino: In function 'bool FPort_Read_A_Frame(uint8_t, frport_t)':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\FrSky.ino:316:11: note: in expansion of macro 'log'
316 | log.printf("F.Port goodFrames:%d badFrames:%d frame loss:%.3f%%\n", goodFrames, badFrames, packetloss);
| ^~~
C:\temp\AntTracker\Source\AntTrack\GetProtocol.ino: In function 'uint32_t getBaud(uint8_t)':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\GetProtocol.ino:183:3: note: in expansion of macro 'log'
183 | log.print("autoBaud - sensing pin "); log.println(pin);
| ^~~
C:\temp\AntTracker\Source\AntTrack\Mavlink.ino: In function 'void Mavlink_Receive()':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Mavlink.ino:237:13: note: in expansion of macro 'log'
237 | log.print(" hb_count=");
| ^~~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino: In function 'void PrintMavBuffer(const void)':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:77:5: note: in expansion of macro 'log'
77 | log.print("mav1: /");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:134:5: note: in expansion of macro 'log'
134 | log.print("mav2: /");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:179:4: note: in expansion of macro 'log'
179 | log.print("Raw: ");
| ^~~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino: In function 'void Printbyte(byte, bool, char)':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:190:5: note: in expansion of macro 'log'
190 | log.println();
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:192:15: note: in expansion of macro 'log'
192 | if (b<=0xf) log.print("0");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:193:3: note: in expansion of macro 'log'
193 | log.print(b,HEX);
| ^~~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino: In function 'void PrintByte(byte)':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:199:15: note: in expansion of macro 'log'
199 | if (b<=0xf) log.print("0");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:200:5: note: in expansion of macro 'log'
200 | log.print(b,HEX);
| ^~~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino: In function 'void PrintMavBuffer(int)':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:209:3: note: in expansion of macro 'log'
209 | log.println();
| ^~~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino: In function 'void PrintFrsBuffer(byte, uint8_t)':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:213:3: note: in expansion of macro 'log'
213 | log.print("len:"); log.print(len); log.print(" ");
| ^~~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino: In function 'bool PacketGood()':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:227:3: note: in expansion of macro 'log'
227 | log.print(" Bad lat! cur.lat=");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:234:3: note: in expansion of macro 'log'
234 | log.print(" Bad lon! cur.lon=");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:241:3: note: in expansion of macro 'log'
241 | log.print(" Bad alt! cur.alt=");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:248:3: note: in expansion of macro 'log'
248 | log.print(" Bad alt! cur.alt=");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:256:5: note: in expansion of macro 'log'
256 | log.print(" Bad hdg! cur.hdg=");
| ^~~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino: In function 'void ReportOnlineStatus()':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:305:12: note: in expansion of macro 'log'
305 | log.println("Motors Armed!");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:308:11: note: in expansion of macro 'log'
308 | log.println("Motors Disarmed");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:315:12: note: in expansion of macro 'log'
315 | log.println("FrSky read good!");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:318:11: note: in expansion of macro 'log'
318 | log.println("FrSky read timeout!");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:326:12: note: in expansion of macro 'log'
326 | log.println("RC PWM good");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:329:11: note: in expansion of macro 'log'
329 | log.println("RC PWM timeout");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:336:12: note: in expansion of macro 'log'
336 | log.println("Good flight computer GPS lock");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:339:11: note: in expansion of macro 'log'
339 | log.println("Flight Computer GPS timeout");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:348:14: note: in expansion of macro 'log'
348 | log.println("Good box GPS lock");
| ^~~
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:351:13: note: in expansion of macro 'log'
351 | log.println("No box GPS lock!");
| ^~~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino: In function 'void LostPowerCheckAndRestore(uint32_t)':
C:\temp\AntTracker\Source\AntTrack\config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
850 | #define log Serial // USB / Serial
| ^~
C:\temp\AntTracker\Source\AntTrack\Utilities.ino:379:7: note: in expansion of macro 'log'
379 | log.printf("Home data restored from NVM, decay %d secs is within limit of %d secs\n", decay_secs, home_decay_secs);
| ^~~
exit status 1
Compilation error: 'Serial' was not declared in this scope; did you mean 'Serial3'?
U(S)ART Support Enabled (generic serial). Immediately under the blue highlighting.
I'm going to test this but if it doesn't work I'm going to change the card to an esp32
It worked ;) Now I'm going to do the other settings, such as adding display support.
Thanks!
Hello.
I followed the steps from the link https://www.rcgroups.com/forums/showthread.php?2942118-Build-a-Reliable-and-Cheap-Antenna-Tracker-this-Weekend-%C2%96-by-zs6buj/page44 in your answer #657
and everything is ok, however I am getting the error with the serial ports.
if defined STM32F1xx
endif
define log Serial // USB / Serial
i get the error below
config.h:850:33: error: 'Serial' was not declared in this scope; did you mean 'Serial3'? 850 | #define log Serial // USB / Serial | ^~~~~~
could you help me to solve it?