Compiling RTK Firmaware

Hi,

I’m new in this community.
Ham Radio (F6DNH) and retired IT Eng. I’m interested in RTK.

I just wanted to compile SparkFun_RTK_Firmware-main as this seems to be the single reference for all Sparkfun RTK products. Probably up-to-date.
And enough, for me, to understand ESP32 C++ software, and RTK Rover or Base.

I don’t know how long this journey will be. Seems to be hard to complete after a couple of days…

I’m using Arduino IDE (2.3.6) and I’ve installed Arduino CLI.

My first remark is the fact that the required libraries, as described either in the official document or reading yaml is not accurate to do the job.
Arduino IDE and libraries, or github repository are many releases behind.

In order to reduce the amount of errors when compiling and in order to go step by step, I’ve reduced the capabilities to a minimum

#define COMPILE_ETHERNET // Comment out to remove Ethernet (W5500) support
#define COMPILE_WIFI     // Comment out to remove WiFi functionality
#define COMPILE_BT       // Comment out to remove Bluetooth functionality
#define COMPILE_L_BAND   // Comment out to remove L-Band functionality
#define COMPILE_SD_MMC   // Comment out to remove REFERENCE_STATION microSD SD_MMC support

That’s fine, I’ve errors which should not exists. Not too much and easy to understand:

D:\@Informatique\RTK\Sparkfun\SparkFun_RTK_Firmware-main\Firmware\RTK_Surveyor\Begin.ino: In function 'void beginBoard()':
D:\@Informatique\RTK\Sparkfun\SparkFun_RTK_Firmware-main\Firmware\RTK_Surveyor\Begin.ino:293:34: error: 'ESP_MAC_WIFI_STA' was not declared in this scope
D:\@Informatique\RTK\Sparkfun\SparkFun_RTK_Firmware-main\Firmware\RTK_Surveyor\Begin.ino:293:5: error: 'esp_read_mac' was not declared in this scope
D:\@Informatique\RTK\Sparkfun\SparkFun_RTK_Firmware-main\Firmware\RTK_Surveyor\Begin.ino: In function 'void pinUART2Task(void*)':
D:\@Informatique\RTK\Sparkfun\SparkFun_RTK_Firmware-main\Firmware\RTK_Surveyor\Begin.ino:668:36: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
C:\Users\Personnel\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.5-b66b5448-v1\esp32/include/esp_driver_uart/include/driver/uart.h:732:50: note:   initializing argument 1 of 'esp_err_t uart_set_rx_full_threshold(uart_port_t, int)'
D:\@Informatique\RTK\Sparkfun\SparkFun_RTK_Firmware-main\Firmware\RTK_Surveyor\Begin.ino: In function 'void beginLEDs()':
D:\@Informatique\RTK\Sparkfun\SparkFun_RTK_Firmware-main\Firmware\RTK_Surveyor\Begin.ino:993:9: error: 'ledcSetup' was not declared in this scope
D:\@Informatique\RTK\Sparkfun\SparkFun_RTK_Firmware-main\Firmware\RTK_Surveyor\Begin.ino:997:9: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?``

However, before to continue, I would ask some questions to the community:

  • was someone successful in (today) compiling the firmware ?
  • If not, what advice can you give me?

Thanks,

Marc

Welcome @F6DNH! And congrats for attempting to compile the firmware from scratch. It is not for the faint of heart.

All current development is on the ‘RTK Everywhere Firmware’ here. We made a breaking change a few years ago when we switched our modern RTK products to ESP32 variants that include PSRAM. So RTK Everywhere = newest, all the bells and whistles that require more RAM, RTK Firmware = older firmware, still works great, runs on all our RTK Facets, Surveyors, Express, products but not where the new work is being done.

You do not list your ESP32 Arduino core version. The yaml shows the ESP32 core version is 2.0.2 which is pretty far behind the current 3.3.0. There are a few bug fixes between those versions sure, but mostly it’s big breaking changes that will cause our firmware not to compile. So be sure to use 2.0.2 when you’re compiling.

Let us know what other blockers you hit and we’ll try to get you through.

Thank you for your help.
I was confused about the real “Up to date “ firmware.
I’ll restart with the right one.

Hope to be successful!

Regards
Marc