Is it possible to enable multicore support? (on RPI PICO) | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar
Please consider registering
guest
sp_LogInOut Log In sp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Is it possible to enable multicore support? (on RPI PICO)
July 28, 2022
2:49 am
Avatar
aliang
Member
Members
Forum Posts: 10
Member Since:
February 2, 2022
sp_UserOfflineSmall Offline

Dear all:

I have successfully deployed the compiled code to RPI PICO, which provide better performance compares to UNO.

I noticed PICO provides two core with it's MCU RP2040, I wonder if it is possible to access the second core?

The multi-core example in arduino is kinda simple, we only have to use such setup:

void setup() {
Serial.begin(115200);
delay(5000);
}

void loop() {
Serial.printf("C0: Blue leader standing by...
");

delay(1000);
}

// Running on core1
void setup1() {
delay(5000);
Serial.printf("C1: Red leader standing by...
");

}

void loop1() {
Serial.printf("C1: Stay on target...
");

delay(500);
}

 

But LVACC only generate one setup even if I put two parallel  loop in my main program, is there any thing I can do to enable setup1/loop1 function? 

 

I know there are many issues to deal with when it comes to dual-core, like resource locking or corss-core date accessing and so on, but I  need to communication with host, sensor reading, LCD drawing and digital input response. Most of these work are not performance hunger, but to maintain a reasonable display result I need some more process power for LCD drawing.

 

Many thanks!

July 28, 2022
5:09 pm
Avatar
geadmin
Admin
Forum Posts: 27
Member Since:
March 10, 2015
sp_UserOfflineSmall Offline

Unfortunately the Compiler does not support multi-threading or parallel loops.  It does not officially support targets with multi-cores.  Take a look at the "Parallel Loops and Multi Threading" description in the "Important Considerations" section of the manual.  Best thing to do would be to develop using the Arduino IDE if the second core is required.

July 29, 2022
12:18 pm
Avatar
aliang
Member
Members
Forum Posts: 10
Member Since:
February 2, 2022
sp_UserOfflineSmall Offline

Thank you for your reply.

I wish you guys can provide products for something like PlatformIO or MircoPython later, it would be amazing if we actually make G everywhere.

Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
5
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
miche91: 33
scottj: 28
scadao: 23
Member Stats:
Guest Posters: 5
Members: 202
Moderators: 0
Admins: 3
Forum Stats:
Groups: 1
Forums: 2
Topics: 266
Posts: 1222
Newest Members:
pujacontrol
Administrators: geadmin: 22, filipealtoe: 96, Steffan: 356