platform-nordicnrf52: uint8_t and uint32_t get mapped wrong by Intellisense for Arduino Nano 33 BLE
If I create a new project for an “Arduino Nano 33 BLE” and create test variables of the “stdint” types, I get the following situation:

Hovering over the types gives the following results: int8_t: typedef __int8_t int8_t => OK
uint8_t:
<error-type> uint8_t
@brief Function for reading data from the SPI receiver register.
@param[in] p_reg Pointer to the peripheral registers structure.
@return RX data received.
variable "uint8_t" is not a type name
F12 takes me to line 228 “[…]/.platformio/packages/framework-arduino-nrf52-mbedos/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/hal/nrf_spi.h”
This does not make any sense, but it looks like Intellisense maps the definition of uint8_t to the return type of the macro defined in that line.
int16_t, uint16_t, int32_t: all OK
uint32_t:
typedef <error-type> uint32_t(<error-type>)
! The RND Generate vector function pointer type definition.
The prototype intendent for External and CRYS internal RND functions
pointers definitions.
Full description can be found in ::CRYS_RND_GenerateVector function API.
F12 takes me to line 206 of “[…]/.platformio/packages/framework-arduino-nrf52-mbedos/cores/arduino/mbed/features/cryptocell/FEATURE_CRYPTOCELL310/include/crys_rnd.h”
Also here, it looks like Intellisense maps the definition of uint32_t to the return type of the macro defined in that line.
Any help (can also be hacks or workarounds) would be highly appreciated. From past issues, it looks like @sean-mcmanus has been knowledgeable about these topics in the past…
I’m running the following configuration: PlatformIO Core: 4.3.4 PlatformIO Home: 3.2.3 ms-vscode.cpptools: 0.28.3 (also tried downgrading to 0.26.0 with same result) VS Code version info: Version: 1.46.1 Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d Date: 2020-06-17T21:17:14.222Z (2 wks ago) Electron: 7.3.1 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Darwin x64 19.5.0
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 22 (1 by maintainers)
Actually, using clang-arm doesn’t fix it (it could fix other issues though), but adding “__STATIC_INLINE” to the defines list appears to have fixed it. Not sure if the PlatformIO extension is supposed to add that automatically or if something else is causing that to not get defined.