hal_streams.h errors within _base_sequential_stream_methods

Discussions and support about ChibiOS/RT, the free embedded RTOS.
Post Reply
jcbless
Posts: 43
Joined: Wed Apr 16, 2025 2:29 pm
Has thanked: 7 times
Been thanked: 3 times

hal_streams.h errors within _base_sequential_stream_methods

Post by jcbless »

I am getting errors within the #define for _base_sequential_stream_methods within hal_streams.h

Here are the errors cut out:

Code: Select all

../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:51:3: error: '_base_object_methods' does not name a type
../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:55:11: error: expected identifier before '*' token
../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:55:47: error: 'size_t' has not been declared
../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:55:3: error: ISO C++ forbids declaration of 'size_t' with no type [-fpermissive]
../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:55:55: error: 'size_t' declared as function returning a function
../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:57:10: error: expected identifier before '*' token
../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:57:3: error: ISO C++ forbids declaration of 'msg_t' with no type [-fpermissive]
../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:57:41: error: 'msg_t' declared as function returning a function
../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:59:10: error: expected identifier before '*' token
../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:59:3: error: ISO C++ forbids declaration of 'msg_t' with no type [-fpermissive]
../../chibios_stable-21.11.x/os/hal/include/hal_streams.h:59:30: error: 'msg_t' declared as function returning a function


I haven't tried analyzing the whole thing, but to start with it seems that _base_object_methods is not defined anywhere. I see that hal_objects.h has a #define for it, but that must not be getting included. Since this is part of the os code, I would expect the #includes to be bringing in the hal_objects.h code. Could you please give some help about what is going on here?

Thanks,
John
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: hal_streams.h errors within _base_sequential_stream_methods

Post by Giovanni »

Hi,

What are you compiling?

Giovanni
jcbless
Posts: 43
Joined: Wed Apr 16, 2025 2:29 pm
Has thanked: 7 times
Been thanked: 3 times

Re: hal_streams.h errors within _base_sequential_stream_methods

Post by jcbless »

I'm compiling a project that was based on a demo project from ChibiStudio. I've added code from an old project of mine.

John
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: hal_streams.h errors within _base_sequential_stream_methods

Post by Giovanni »

The error does not occur in demos, make sure that you have everything is needed in your makefile, it could be a missing path.

You could zip a minimal project with the failure so I can verify it.

Giovanni
jcbless
Posts: 43
Joined: Wed Apr 16, 2025 2:29 pm
Has thanked: 7 times
Been thanked: 3 times

Re: hal_streams.h errors within _base_sequential_stream_methods

Post by jcbless »

By backing up I was able to rework things and get past this error. Thanks
Post Reply