Kucky
Posts: 2
Joined: Wed Jun 08, 2022 12:15 pm

Pico problem with EEPROM Lib

Wed Jun 08, 2022 12:24 pm

Hey,
i'm new in this forum. I´am 66 year old and pensioner. I've done a few small Arduino projects. This is my first Pico Project. I want to use the EEPROM Lib from "earlephilhower". If i compile the example "eeprom_write" i get this message
"lib\EEPROM\EEPROM.cpp:121:5: error: 'rp2040' was not declared in this scope"
in line
" rp2040.idleOtherCore();"

Can anyone help me?

I using PlatformIO with C++

Best regards
Willi

JohnStabler
Posts: 8
Joined: Sat Jun 09, 2012 4:27 pm

Re: Pico problem with EEPROM Lib

Thu Jun 23, 2022 12:31 pm

I've got exactly the same problem.
John Stabler MBCS - Veteran Computer Programmer

hippy
Posts: 12327
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Pico problem with EEPROM Lib

Thu Jun 23, 2022 12:51 pm

Maybe contact the author, raise an issue ...

https://github.com/earlephilhower/ardui ... EEPROM.cpp

I have never used C++ but would guess 'rp2040' is some kind of global reference, object or namespace, and something needs to be done to provide that. I have no idea what.

User avatar
neilgl
Posts: 4469
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Pico problem with EEPROM Lib

Thu Jun 23, 2022 1:03 pm

What are you trying to use that library for? If it is to erase flash there is a Raspberry Pi created flash_nuke.uf2 file for that (and on github)

earlephilhower
Posts: 8
Joined: Sun Mar 21, 2021 7:04 pm

Re: Pico problem with EEPROM Lib

Fri Jun 24, 2022 9:33 am

The EEPROM library from the community Arduino code can not be run in MBED Arduino. I think that is your problem. You have to use the full install from https://github.com/earlephilhower/arduino-pico

I've built in synthetic EEPROM (uses 4K of flash instead) and because the RP2040 can't write to flash while executing from it, the other core needs to be halted. My code has this `rp2040` class which handles this and other RP2040-specific things. The examples are also built as part of every pull request and release, so I'm quite sure they do build (again, only with the community core).

Also, @hippy is right. The best place to ask for help w/the code is the GitHub pages, not a general Raspberry Pi forum. I don't often check here, sorry.

Kucky
Posts: 2
Joined: Wed Jun 08, 2022 12:15 pm

Re: Pico problem with EEPROM Lib

Fri Jun 24, 2022 7:53 pm

Thanks at all.
I will post in the recommended forum.

Best regards Willy

Return to “SDK”