Skip to main content
SKled.1
Senior
May 10, 2023
Solved

Core/Src/sysmem.c:38:1: error: unknown type name 'caddr_t'

Got a project that compiles on another computer (which I now cannot access to test whether it's still so), but now that I'm an another machine, same version of CubeIDE (1.12.1), I get the error quoted above. I'm not sure when I updated last & whether I tried to build then.

Why would the compiler not find a type within library stuff? I haven't touched those files.

Well, if, in sysmem.c, I add

#include <sys/types.h>

it compiles. I don't like messing with the vendor library files, though ;)

EDIT:

This was with toolchain GNU Tools for STM32 (11.3.rel1).

When I chose Fixed: 10.3, it compiles as before.

Why did I try that? Because, in a related project, I was suddenly also getting BS errors that prevented the build, e.g. about casting from a pointer type to a uint32 in a constexpr - this compiles just fine with 10.3, and it's essential, using unsigned values from a linker script, to address certain memory regions in the program.

Note to self: never let IDE select toolchain willy nilly, and not waste time with BS.

(I didn't even know it did that by default)

This topic has been closed for replies.
Pavel A.
Pavel A.Best answer
May 10, 2023

caddt_t is an obsolete typedef; recommended to replace to void*.

​

> Note to self: never let IDE select toolchain willy nilly, and not waste time with BS.

A great idea.

To make the toolchain choice persistent, you may want to enable per-project settings.

The project settings will be saved with the project, rather than in workspace.

Then whenever you create a new clean workspace, the project settings won't reset to CubeIDE defaults.

2 replies

Pavel A.
Pavel A.Best answer
May 10, 2023

caddt_t is an obsolete typedef; recommended to replace to void*.

​

> Note to self: never let IDE select toolchain willy nilly, and not waste time with BS.

A great idea.

To make the toolchain choice persistent, you may want to enable per-project settings.

The project settings will be saved with the project, rather than in workspace.

Then whenever you create a new clean workspace, the project settings won't reset to CubeIDE defaults.

TFern
Associate II
October 23, 2024

Hello,



@Pavel A. wrote:

To make the toolchain choice persistent, you may want to enable per-project settings.

The project settings will be saved with the project, rather than in workspace.

 



Could you please post a screen grab on where this option exists ? Google did not give me anything meaningful.
Regards
Thomas