U-Blox MAX10 3v3 I2C Starter Qu

Hello all,

I am looking for help setting up a test for SPARKFUN #GPS-18037, that is supported by the library I installed as zip from

https://github.com/sparkfun/SparkFun_u-blox_GNSS_v3

I am using basic nmea example and trying to compile for an Uno selected, just compile, no GPS connected. I plan to use Pro Mini for 3v3 logic and size once working and SAM D21 long term, so all arduino and I generally find good compatibility between these controllers on I2C.

I use wire.h a lot and the new library looks like it is installed correctly. IDE restarted in case. See screenshot.

https://snipboard.io/OYvieR.jpg

Below is version with verbose output. Can anyone with more experience, see what I a missing to compile?

Thanks! Bw,

Ben

Detecting libraries used…

“C:\Users\bench\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\sketch\Example1_BasicNMEARead.ino.cpp” -o nul

Alternatives for Wire.h: [Wire@1.0]

ResolveLibrary(Wire.h)

→ candidates: [Wire@1.0]

“C:\Users\bench\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\sketch\Example1_BasicNMEARead.ino.cpp” -o nul

Alternatives for SparkFun_u-blox_GNSS_v3.h: [SparkFun u-blox GNSS v3@3.0.12]

ResolveLibrary(SparkFun_u-blox_GNSS_v3.h)

→ candidates: [SparkFun u-blox GNSS v3@3.0.12]

“C:\Users\bench\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src” “C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\sketch\Example1_BasicNMEARead.ino.cpp” -o nul

Alternatives for SPI.h: [SPI@1.0]

ResolveLibrary(SPI.h)

→ candidates: [SPI@1.0]

“C:\Users\bench\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\sketch\Example1_BasicNMEARead.ino.cpp” -o nul

Using cached library dependencies for file: C:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\Wire.cpp

Using cached library dependencies for file: C:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\utility\twi.c

Using cached library dependencies for file: c:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src\sfe_bus.cpp

“C:\Users\bench\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “c:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src\u-blox_GNSS.cpp” -o nul

“C:\Users\bench\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “C:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src\SPI.cpp” -o nul

Generating function prototypes…

“C:\Users\bench\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\sketch\Example1_BasicNMEARead.ino.cpp” -o “C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\preproc\ctags_target_for_gcc_minus_e.cpp”

“C:\Users\bench\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\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\preproc\ctags_target_for_gcc_minus_e.cpp”

Compiling sketch…

“C:\Users\bench\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\sketch\Example1_BasicNMEARead.ino.cpp” -o “C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\sketch\Example1_BasicNMEARead.ino.cpp.o”

Compiling libraries…

Compiling library “Wire”

Using previously compiled file: C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\libraries\Wire\utility\twi.c.o

Using previously compiled file: C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\libraries\Wire\Wire.cpp.o

Compiling library “SparkFun u-blox GNSS v3”

“C:\Users\bench\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “c:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src\u-blox_GNSS.cpp” -o “C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\libraries\SparkFun_u-blox_GNSS_v3\u-blox_GNSS.cpp.o”

“C:\Users\bench\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src” “-IC:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “c:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src\sfe_bus.cpp” -o “C:\Users\bench\AppData\Local\Temp\arduino\sketches\2F98111DFBA1E6C28904AC8DCA6A0C04\libraries\SparkFun_u-blox_GNSS_v3\sfe_bus.cpp.o”

c:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src\u-blox_GNSS.cpp: In member function ‘void DevUBLOXGNSS::checkCallbacks()’:

c:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src\u-blox_GNSS.cpp:6051:7: error: ‘rtcmInputStorage’ was not declared in this scope

if (rtcmInputStorage.rtcm1005CallbackPointer != nullptr) // If the pointer to the callback has been defined

^~~~~~~~~~~~~~~~

c:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3\src\u-blox_GNSS.cpp:6059:7: error: ‘rtcmInputStorage’ was not declared in this scope

if (rtcmInputStorage.rtcm1006CallbackPointer != nullptr) // If the pointer to the callback has been defined

^~~~~~~~~~~~~~~~

Using library Wire at version 1.0 in folder: C:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire

Using library SparkFun u-blox GNSS v3 at version 3.0.12 in folder: C:\Users\bench\OneDrive\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_v3

Using library SPI at version 1.0 in folder: C:\Users\bench\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI

exit status 1

Compilation error: exit status 1

Hi Ben,

Thanks for reporting this issue.

I recently added better support for the parsing and logging of RTCM messages from the u-blox module. The issue is that the Uno (ATmega328P) does not have enough RAM to hold the storage buffer rtcmInputStorage. I added compiler guards to disable that part of the library if it detected the code was being compiled for the Uno. It looks like I didn’t get that quite right. The rtcmInputStorage has not been declared - thanks to the compiler guards - but a small part of the library is attempting to use it regardless, causing the errors you are seeing.

Short term fix: please select a different board and the code should compile as normal. The Arduino Mega 2560 should work fine - that does have enough RAM for the buffer and the guards don’t apply. Or maybe the SAMD21 board you want to use longer term.

The proper fix is for me to go bug hunting - fix it - and up-issue the library…

Thanks again,

Paul

Hi Ben,

This is fixed. Please download v3.0.13 of the u-blox library when you have time.

Best wishes,

Paul

Hi Paul,

Many thanks for the quick fix advice and thorough follow up. I am up and running!

My only last question is if you can point me in the direction of an example that would help me understand how we could include the following MAX10 feature from their marketing?

it detects jamming and spoofing attempts and reports them to the host so that the system can react to such events

Any advanced warning of an indicent that we can use to generate alerts is super interesting to us.

No worries and no need to reply if you haven’t come accross it. Please consider original query resolved! Have a good day.

Bw,

Ben.

Hi Ben,

Glad that’s working for you.

For the jamming indication (hardware status), please see:

https://github.com/sparkfun/SparkFun_u- … mation.ino

I hope this helps,

Paul

Looks perfect!!