RP2040 ram and rom usage?

For general Flowcode discussion that does not belong in the other sections.
chipfryer27
Valued Contributor
Posts: 1213
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 297 times
Been thanked: 429 times

Re: RP2040 ram and rom usage?

Post by chipfryer27 »

Thanks Leigh

I'll go searching. I'd read about ESP32 2nd core but don't recall offhand the Pico.

Regards

Chadb
Posts: 63
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 24 times

Re: RP2040 ram and rom usage?

Post by Chadb »

Hey, I have searched high and low and can't find any reference to this.

Thanks,

Chad

LeighM
Valued Contributor
Posts: 402
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 75 times
Been thanked: 220 times

Re: RP2040 ram and rom usage?

Post by LeighM »

No, neither can I :)
I did a demo (2 years ago, as Google Photos reminded me yesterday!) that I thought had gone onto either a forum or the WiKi.
A simple program that flashes an LED from each core.
I'm hoping I still have it on my PC, I'm not in a position to check for a few days.
But if not, it shouldn't be too difficult for me to re-create it, but it's likely next week before I get chance.

LeighM
Valued Contributor
Posts: 402
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 75 times
Been thanked: 220 times

Re: RP2040 ram and rom usage?

Post by LeighM »

I think I might have found something (cloud backup proved worthwhile)
I haven't access to Flowcode at the moment to check this, but please try attached.
Things to note are the supplementary header code and some C code in Main.
Hope it loads :D
Attachments
LED Flash 2 core.fcfx
(8.45 KiB) Downloaded 71 times

chipfryer27
Valued Contributor
Posts: 1213
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 297 times
Been thanked: 429 times

Re: RP2040 ram and rom usage?

Post by chipfryer27 »

Hi Leigh

Thanks for this. I won't be able to try until later in the week and I assume I'll need to grab multicore.h from GIT or such like?

Regards

Chadb
Posts: 63
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 24 times

Re: RP2040 ram and rom usage?

Post by Chadb »

Yeah the build failed. It looks like it choked on multicore.h. I am going to try to find it.

Chadb
Posts: 63
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 24 times

Re: RP2040 ram and rom usage?

Post by Chadb »

it's in C:\pico-sdk\src\rp2_common\pico_multicore\include\pico\multicore.h

and

C:\pico-sdk\src\host\pico_multicore\include\pico\multicore.h

Chadb
Posts: 63
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 24 times

Re: RP2040 ram and rom usage?

Post by Chadb »

So I pasted the location into the include and that got around the not found file.

Code: Select all

dir/C_/pico-sdk/src/rp2_common/hardware_i2c/i2c.c.obj
[ 88%] Linking CXX executable flowcode.elf
c:/progra~2/gnuarm~1/102020~1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: CMakeFiles\flowcode.dir\flowcode.c.obj: in function `main':
flowcode.c:(.text.startup.main+0xa): undefined reference to `multicore_launch_core1'
collect2.exe: error: ld returned 1 exit status
It doesn't like the launch core 1

LeighM
Valued Contributor
Posts: 402
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 75 times
Been thanked: 220 times

Re: RP2040 ram and rom usage?

Post by LeighM »

Ok. Thanks for trying. Looks like it might need to wait until I can test it. I can't recall if there's any config changes required.

Chadb
Posts: 63
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 24 times

Re: RP2040 ram and rom usage?

Post by Chadb »

Ok no problem. FYI this is what the .h has.

Code: Select all

void multicore_reset_core1(void);
void multicore_launch_core1(void (*entry)(void));

Post Reply