# \[Solved\]Typedef uint16\_t on ARM

**URL:** <https://forum.embeetle.com/t/solved-typedef-uint16-t-on-arm/883>\
**Category:** Uncategorized\
**Created:** [February 8, 2024, 8:54pm UTC](https://forum.embeetle.com/t/solved-typedef-uint16-t-on-arm/883 "2024-02-08T20:54:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adventurer](https://forum.embeetle.com/letter_avatar_proxy/v4/letter/a/f05b48/32.png) [@Adventurer](https://forum.embeetle.com/u/Adventurer)\
**Post date:** [February 8, 2024, 8:54pm UTC](https://forum.embeetle.com/t/solved-typedef-uint16-t-on-arm/883/1 "2024-02-08T20:54:29Z")

</div>

Hi,

I just came across Embeetle. I created a new project for my RPi Pico and then copied the code of one of my favorite projects into it. This project uses a library that uses the C++ typedefs **uint16\_t** and **uint8\_t**. Which immediately caused type name compiler errors. This project is currently maintained using the Arduino IDE. I did not import it because the Arduino importer only supports Arduino boards.

What would be the way forward on the compiler errors?

Compiler Toolchain : gnu\_arm\_toolchain\_10.3.1\_20210824\_32b

---

<div class="post-metadata">

**Author:** ![ygramoel](https://forum.embeetle.com/user_avatar/forum.embeetle.com/ygramoel/32/6_2.png) [@ygramoel](https://forum.embeetle.com/u/ygramoel)\
**Post date:** [February 9, 2024, 9:08am UTC](https://forum.embeetle.com/t/solved-typedef-uint16-t-on-arm/883/2 "2024-02-09T09:08:57Z")

</div>

Hi Adventurer, thanks for reporting this.

I will need some more details to understand what is going on.

The easiest way - if possible - would be for you to share the project. That way, I can reproduce the problem here and check all the details. It doesn’t need to be the full project. You can remove any confidential code, as long as the type name errors occur.

Alternatively, I will need to ask for more details. Let’s start with the basics.

- what exactly are the errors you get?
- are these errors in the Embeetle diagnostic window, or during compilation, or both?
- is the compiler toolchain you mention the one that is used in Embeetle? If so, then which toolchain was used to compile this code in Arduino?

Here is some background. I am just guessing here as to what might be relevant for your issue; I will only be able to judge when I know the details.

**uint16\_t** and **uint8\_t** are normally defined in `stdint.h`, included using `#include <stdint.h>`. This header file usually comes together with the compiler toolchain. When you switch to a different compiler, this might cause issues with improperly written C code.

Sometimes, C code will give its own definition for these types, which is strictly speaking not allowed by the different C standards, but is fine as long it doesn’t conflict with the definition in `stdint.h`. Such code might compile with one compiler and not with another.

---

<div class="post-metadata">

**Author:** ![Adventurer](https://forum.embeetle.com/letter_avatar_proxy/v4/letter/a/f05b48/32.png) [@Adventurer](https://forum.embeetle.com/u/Adventurer)\
**Post date:** [February 9, 2024, 7:41pm UTC](https://forum.embeetle.com/t/solved-typedef-uint16-t-on-arm/883/3 "2024-02-09T19:41:35Z")

</div>

Hi,

This particular problem was fixed by using `#include <stdint.h>`. Thank you.

However, two new problems have emerged. I’ll document those in their own topics.
