Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: 'LocoNetStreamPico' does not name a type; #10

Closed
Neleird opened this issue Nov 14, 2023 · 3 comments
Closed

error: 'LocoNetStreamPico' does not name a type; #10

Neleird opened this issue Nov 14, 2023 · 3 comments

Comments

@Neleird
Copy link

Neleird commented Nov 14, 2023

Hi,

I'm trying to compile the 'Basic-Listener-Pico.ino' but this gives the error: 'LocoNetStreamPico' does not name a type;
I also get a WARNING: library LocoNet2 claims to run on esp32 architecture(s) and may be incompatible with your current board which runs on rp2040 architecture(s).

Like to use LocoNet2 on a RPi Pico W as a router to MQTT.

@alex-shepherd-nv
Copy link

Hmmm.... try now... ;)

I've fixed those two errors and added the rp2040 architecture.

It looks like the newer 2.X IDE doesn't let me edit an example and save it into the library folder like the old 1.8.X IDe used to do when you created a ".development" flag file in the root dir of the library. Bit of a gotcha or at least different behaviour I need to check into

@Neleird
Copy link
Author

Neleird commented Nov 15, 2023

Hi Alex
Thank you very much. Quick response! Still the warning but compilation and upload succeeded. Lets start playing with LocoNet on the RPi Pico W...

Output result in IDE 2.2.1:
WARNING: library LocoNet2 claims to run on esp32 architecture(s) and may be incompatible with your current board which runs on rp2040 architecture(s).
Sketch uses 324436 bytes (15%) of program storage space. Maximum is 2093056 bytes.
Global variables use 71400 bytes (27%) of dynamic memory, leaving 190744 bytes for local variables. Maximum is 262144 bytes.
Resetting COM6
Converting to uf2, output size: 685568, start address: 0x2000
Scanning for RP2040 devices
Flashing F: (RPI-RP2)
Wrote 685568 bytes to F:/NEW.UF2

@Neleird Neleird closed this as completed Nov 15, 2023
@alex-shepherd-nv
Copy link

alex-shepherd-nv commented Nov 15, 2023

Hmmm... that is weird as I don't see that error. Can you check the contents of the library.properties file to make sure it has the line:

architectures=esp32,rp2040

As, I believe that is what should make the error go away. If I remove the rp2040 from the above line, I don't see the library in the list of File->Examples/LocoNet2, so I think it is working.

This is the full output I get when I compile in IDE 2.2.1:

`
FQBN: rp2040:rp2040:rpipico
Using board 'rpipico' from platform in folder: /Users/alexs/Library/Arduino15/packages/rp2040/hardware/rp2040/3.6.0
Using core 'rp2040' from platform in folder: /Users/alexs/Library/Arduino15/packages/rp2040/hardware/rp2040/3.6.0

Detecting libraries used...
`
So I'm unsure what to do next to debug this. Perhaps may sure you don't have two copies of the LocoNet2 library folder in the search path somewhere or one inside the other if you dragged the folder into the libraries folder, as I've done that before.
[snip a big chunk...]

Alternatives for LocoNetStreamRP2040.h: [LocoNet2@2.2.0] ResolveLibrary(LocoNetStreamRP2040.h) -> candidates: [LocoNet2@2.2.0] /Users/alexs/Library/Arduino15/packages/rp2040/tools/pqt-gcc/2.1.0-a-d3d2e6b/bin/arm-none-eabi-g++ -I /private/var/folders/3g/zjdzn3nj4nl2j7dmqpk97v280000gn/T/arduino/sketches/3FE3C104C0F70437EFE6C760D9C322C4/core -c -Werror=return-type -Wno-psabi -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSBD_PID=0x000a -DUSBD_VID=0x2e8a -DUSBD_MAX_POWER_MA=250 -DUSB_MANUFACTURER="Raspberry Pi" -DUSB_PRODUCT="Pico" -DPICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 -DCYW43_LWIP=1 -DLWIP_IPV6=0 -DLWIP_IPV4=1 -DLWIP_IGMP=1 -DLWIP_CHECKSUM_CTRL_PER_NETIF=1 -DARDUINO_VARIANT="rpipico" -DTARGET_RP2040 -DPICO_FLASH_SIZE_BYTES=2097152 -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -DARM_MATH_CM0_FAMILY -DARM_MATH_CM0_PLUS -iprefix/Users/alexs/Library/Arduino15/packages/rp2040/hardware/rp2040/3.6.0/ @/Users/alexs/Library/Arduino15/packages/rp2040/hardware/rp2040/3.6.0/lib/platform_inc.txt -I/Users/alexs/Library/Arduino15/packages/rp2040/hardware/rp2040/3.6.0/include -fno-rtti -std=gnu++17 -g -pipe -w -x c++ -E -CC -DF_CPU=133000000L -DARDUINO=10607 -DARDUINO_RASPBERRY_PI_PICO -DBOARD_NAME="RASPBERRY_PI_PICO" -DARDUINO_ARCH_RP2040 -Os -DWIFICC=CYW43_COUNTRY_WORLDWIDE -I/Users/alexs/Library/Arduino15/packages/rp2040/hardware/rp2040/3.6.0/cores/rp2040 -I/Users/alexs/Library/Arduino15/packages/rp2040/hardware/rp2040/3.6.0/variants/rpipico -I/Users/alexs/Documents/_Hobby/_mrrwa/libraries/LocoNet2/src /private/var/folders/3g/zjdzn3nj4nl2j7dmqpk97v280000gn/T/arduino/sketches/3FE3C104C0F70437EFE6C760D9C322C4/sketch/Basic-Listener-Pico.ino.cpp -o /dev/null

[snip a big chunk...]

Using library LocoNet2 at version 2.2.0 in folder: /Users/alexs/Documents/_Hobby/_mrrwa/libraries/LocoNet2 Using library Embedded Template Library ETL at version 20.22.0 in folder: /Users/alexs/Documents/_Hobby/_mrrwa/libraries/Embedded_Template_Library_ETL Using library Bounce2 at version 2.71 in folder: /Users/alexs/Documents/_Hobby/_mrrwa/libraries/Bounce2 /Users/alexs/Library/Arduino15/packages/rp2040/tools/pqt-gcc/2.1.0-a-d3d2e6b/bin/arm-none-eabi-size -A /private/var/folders/3g/zjdzn3nj4nl2j7dmqpk97v280000gn/T/arduino/sketches/3FE3C104C0F70437EFE6C760D9C322C4/Basic-Listener-Pico.ino.elf Sketch uses 64300 bytes (3%) of program storage space. Maximum is 2093056 bytes. Global variables use 10784 bytes (4%) of dynamic memory, leaving 251360 bytes for local variables. Maximum is 262144 bytes.
So I'm unsure what to do next to debug this as it "works for me". Perhaps check that you don't have 2 copies of the LocoNet2 library in the search path or one inside another if you dragged the LocoNet2 folder into the libraries folder - done that before...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants