Page 1 of 1

Full SMP on RP2040

Posted: Sun Jul 11, 2021 1:52 pm
by szilveszter
Hi,

I try to set up full SMP support on an RP2040, but I have got confused. It is mentioned in the article about Full SMP in RT 7.0 that in Full SMP mode only one instance of OS is running across multiple cores. In the demo/example for the RP2040 the full SMP mode is enabled chconf.h

Code: Select all

#define CH_CFG_SMP_MODE    TRUE
and simultaneously called the

Code: Select all

chInstanceObjectInit(&ch1, &ch_core1_cfg);
in the c1_main. Maybe I am wrong, but I assume the chInstanceObjectInit creates a second OS instance. Could you please confirm that this is the right way to use full SMP mode, calling the chInstanceObjectInit in c1_main? If it isn't, then how could I instantiate the core 1, because without the chInstanceObjectInit any of the chThdCreateStatic or chThdCreateStatic throws an unhanded exception.

Regards,
Szilveszter

Re: Full SMP on RP2040

Posted: Sun Jul 11, 2021 4:00 pm
by Giovanni
Hi,

There are always one instance per core, coupled or decoupled, this is the only difference.

The article says there is one OS running on multiple cores, it does not say "instances", an instance is an object of the class "OS instance", the OS is the collection of all things.

Giovanni