create a custom cpp class for various peripherals example gpio

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

k_vijay
Posts: 20
Joined: Mon Apr 04, 2022 7:06 am

create a custom cpp class for various peripherals example gpio

Postby k_vijay » Thu Jun 09, 2022 6:37 am

Hello Team,

I want to create a custom class for various peripherals like gpio,i2c,spi.
What should be the steps need to follow.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: create a custom cpp class for various peripherals example gpio

Postby Giovanni » Thu Jun 09, 2022 8:06 am

Hi,

Hard to answer, it depends on what you want to achieve.

You could use the RT wrapper as an example, see under /os/various/cpp_wrappers

Giovanni

k_vijay
Posts: 20
Joined: Mon Apr 04, 2022 7:06 am

Re: create a custom cpp class for various peripherals example gpio

Postby k_vijay » Thu Jun 09, 2022 12:52 pm

Dear Giovanni,

I have tried to make a sample cpp class and added its path into makefile in the section of CPPSRC value.
I got the error "undefined reference __dso_handle ". My code has compiled but this error came out.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: create a custom cpp class for various peripherals example gpio

Postby Giovanni » Thu Jun 09, 2022 3:32 pm

Hi,

Google it, you are using some C++ feature requiring it:

https://stackoverflow.com/questions/343 ... le-defined

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 10 guests