Compiler problem: error: unknown type name 'uint32_t'

Good morning

Well - I believe it is a compiler problem when compiling libraries included in the sketch file:


In file included from C:\Users\Steen\Documents\Arduino\libraries\WebSockets\src\libb64\cdecode.c:9:0:

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h:93:1: error: unknown type name 'uint32_t'

inline uint32_t esp_get_cycle_count() attribute((always_inline));

^

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h:94:1: error: unknown type name 'uint32_t'

inline uint32_t esp_get_cycle_count() {

^

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h: In function 'esp_get_cycle_count':

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h:95:3: error: unknown type name 'uint32_t'

uint32_t ccount;

^

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h: At top level:

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h:117:24: error: unknown type name 'uint32_t'

void precache(void *f, uint32_t bytes);

^

In file included from C:\Users\Steen\Documents\Arduino\libraries\WebSockets\src\libb64\cencode.c:9:0:

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h:93:1: error: unknown type name 'uint32_t'

inline uint32_t esp_get_cycle_count() attribute((always_inline));

^

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h:94:1: error: unknown type name 'uint32_t'

inline uint32_t esp_get_cycle_count() {

^

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h: In function 'esp_get_cycle_count':

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h:95:3: error: unknown type name 'uint32_t'

uint32_t ccount;

^

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h: At top level:

C:\Users\Steen\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/core_esp8266_features.h:117:24: error: unknown type name 'uint32_t'

void precache(void *f, uint32_t bytes);

^
Probably a missing link to a header file but have not been able to resolved it.

Your help much appreciated

//Steen

The smart money always bets that the compiler is right. But, it’s impossible to know without seeing your full code and knowing what board you’re compiling for, what version of Arduino IDC you’re using, and what version of the board package is installed.

Hi,

I got the same error.
Looks like it is a regression in the 2.6.0/2.6.1 cores for ESP8266 as soon as a lib includes the core_esp8266_features.h file (like ArduinoWebSockets does).
See issue 2.6.x - core_esp8266_features.h error: unknown type name 'uint32_t' · Issue #6791 · esp8266/Arduino · GitHub
It is fixed on trunc (so will be in the next release) but in the meantime I suggest you revert to ESP8266 cores pre 2.6.0
I reverted to 2.5.2 and code compiles again.
KR,

Vicne