raspberry-pi-pico

I am having a very long and strange error when building Picotool 2.0.0


I am trying to build picotool 2.0.0, but I am running into a strange error. I have had to remove some of the error output as well as some of the build output as it is to long for this post:(.

PS C:\Users\Matthew\Desktop\Pico\pico-rvd\build> git clone https://github.com/raspberrypi/picotool
Cloning into 'picotool'...
remote: Enumerating objects: 530, done.
remote: Counting objects: 100% (467/467), done.
remote: Compressing objects: 100% (236/236), done.

Receiving objects: 100% (530/530), 773.48 KiB | 5.02 MiB/s, done.
Resolving deltas: 100% (291/291), done.
PS C:\Users\Matthew\Desktop\Pico\pico-rvd\build> cd picotool
PS C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool> mkdir build


    Directory: C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         11/3/2024   5:48 PM                build


PS C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool> cd build
PS C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\build> cmake -G "MinGW Makefiles" ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/VSARM/mingw/mingw32/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/VSARM/mingw/mingw32/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Using PICO_SDK_PATH from environment ('C:\Users\Matthew\Desktop\Pico\pico-sdk')
./C:/Program Files (x86)/picotool/share/picotool/
-- Using the single-header code from C:/Users/Matthew/Desktop/Pico/pico-rvd/build/picotool/lib/nlohmann_json/single_include/
-- Found Python3: C:/Program Files/Python311/python.exe (found version "3.11.2") found components: Interpreter
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found LIBUSB: C:/libusb-1.0.27/MinGW32/static/libusb-1.0.dll.a
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Matthew/Desktop/Pico/pico-rvd/build/picotool/build
PS C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\build> make

C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\build>mingw32-make
[  1%] Creating directories for 'xip_ram_perms'
[  2%] No download step for 'xip_ram_perms'
[  3%] No update step for 'xip_ram_perms'
[  4%] No patch step for 'xip_ram_perms'
[  5%] Performing configure step for 'xip_ram_perms'
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/VSARM/mingw/mingw32/bin/gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/VSARM/mingw/mingw32/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/VSARM/mingw/mingw32/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Using precompiled xip_ram_perms.elf
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Matthew/Desktop/Pico/pico-rvd/build/picotool/build/xip_ram_perms
[  5%] Performing build step for 'xip_ram_perms'
[  5%] No install step for 'xip_ram_perms'
[  6%] Completed 'xip_ram_perms'
[  6%] Built target xip_ram_perms
[  7%] Creating directories for 'otp_header_parser'
[  8%] No download step for 'otp_header_parser'
[  8%] No update step for 'otp_header_parser'
[  9%] No patch step for 'otp_header_parser'
[ 10%] Performing configure step for 'otp_header_parser'
-- The CXX compiler identification is GNU 5.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/VSARM/mingw/mingw32/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using the single-header code from C:/Users/Matthew/Desktop/Pico/pico-rvd/build/picotool/lib/nlohmann_json/single_include/
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Matthew/Desktop/Pico/pico-rvd/build/picotool/build/otp_header_parser
[ 11%] Performing build step for 'otp_header_parser'
[ 50%] Building CXX object CMakeFiles/otp_header_parse.dir/otp_header_parse.cpp.obj
[100%] Linking CXX executable otp_header_parse.exe
[100%] Built target otp_header_parse
[ 11%] No install step for 'otp_header_parser'
[ 11%] Completed 'otp_header_parser'
[ 11%] Built target otp_header_parser


[ 75%] Linking C static library libmbedx509.a
[ 75%] Built target mbedx509
[ 76%] Generating C:/Users/Matthew/Desktop/Pico/pico-rvd/build/picotool/build/rp2350_otp_contents.json
[ 77%] Configuring rp2350.json.h
[ 77%] Built target generate_otp_header
[ 77%] Configuring rp2350.rom.h
[ 78%] Configuring xip_ram_perms_elf.h
[ 78%] Built target binary_data
[ 79%] Building CXX object errors/CMakeFiles/errors.dir/errors.cpp.obj
[ 79%] Linking CXX static library liberrors.a
[ 79%] Built target errors
[ 80%] Building CXX object elf/CMakeFiles/elf.dir/elf_file.cpp.obj
In file included from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.h:20:0,
                 from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.cpp:21:
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:52:65: error: invalid use of non-static data member 'address_range::type'
     address_range(FLASH_START, FLASH_END_RP2040, address_range::type::CONTENTS),
                                                                 ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:53:63: error: invalid use of non-static data member 'address_range::type'
     address_range(SRAM_START, SRAM_END_RP2040, address_range::type::NO_CONTENTS),
                                                               ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:54:78: error: invalid use of non-static data member 'address_range::type'
     address_range(MAIN_RAM_BANKED_START, MAIN_RAM_BANKED_END, address_range::type::NO_CONTENTS)
                                                                              ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:55:1: error: no matching function for call to 'std::vector<address_range>::vector(<brace-enclosed initializer list>)'
 };
 ^
In file included from C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/vector:64:0,
                 from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.cpp:17:
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:401:9: note: candidate: template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&)
         vector(_InputIterator __first, _InputIterator __last,
         ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:401:9: note:   template argument deduction/substitution failed:
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:373:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(initializer_list<value_type> __l,
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:373:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:348:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(vector&& __rv, const allocator_type& __m)
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:348:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:339:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(const vector& __x, const allocator_type& __a)
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:339:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:335:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = address_range; _Alloc = std::allocator<address_range>]
       vector(vector&& __x) noexcept
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:335:7: note:   candidate expects 1 argument, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:318:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = address_range; _Alloc = std::allocator<address_range>]
       vector(const vector& __x)
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:318:7: note:   candidate expects 1 argument, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:289:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::value_type = address_range; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(size_type __n, const value_type& __value,
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:289:7: note:   conversion of argument 1 would be ill-formed:
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:277:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:277:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:264:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:264:7: note:   candidate expects 1 argument, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:253:7: note: candidate: std::vector<_Tp, _Alloc>::vector() [with _Tp = address_range; _Alloc = std::allocator<address_range>]
       vector()
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:253:7: note:   candidate expects 0 arguments, 3 provided
In file included from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.h:20:0,
                 from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.cpp:21:
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:58:63: error: invalid use of non-static data member 'address_range::type'
     address_range(SRAM_START, SRAM_END_RP2040, address_range::type::CONTENTS),
                                                               ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:59:78: error: invalid use of non-static data member 'address_range::type'
     address_range(XIP_SRAM_START_RP2040, XIP_SRAM_END_RP2040, address_range::type::CONTENTS),
                                                                              ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:60:61: error: invalid use of non-static data member 'address_range::type'
     address_range(ROM_START, ROM_END_RP2040, address_range::type::IGNORE) // for now we ignore the bootrom if present
                                                             ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:61:1: error: no matching function for call to 'std::vector<address_range>::vector(<brace-enclosed initializer list>)'
 };
 ^
In file included from C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/vector:64:0,
                 from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.cpp:17:
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:401:9: note: candidate: template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&)
         vector(_InputIterator __first, _InputIterator __last,
         ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:401:9: note:   template argument deduction/substitution failed:
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:373:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(initializer_list<value_type> __l,
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:373:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:348:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(vector&& __rv, const allocator_type& __m)
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:348:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:339:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(const vector& __x, const allocator_type& __a)
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:339:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:335:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = address_range; _Alloc = std::allocator<address_range>]
       vector(vector&& __x) noexcept
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:335:7: note:   candidate expects 1 argument, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:318:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = address_range; _Alloc = std::allocator<address_range>]
       vector(const vector& __x)
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:318:7: note:   candidate expects 1 argument, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:289:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::value_type = address_range; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(size_type __n, const value_type& __value,
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:289:7: note:   conversion of argument 1 would be ill-formed:
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:277:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:277:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:264:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:264:7: note:   candidate expects 1 argument, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:253:7: note: candidate: std::vector<_Tp, _Alloc>::vector() [with _Tp = address_range; _Alloc = std::allocator<address_range>]
       vector()
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:253:7: note:   candidate expects 0 arguments, 3 provided
In file included from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.h:20:0,
                 from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.cpp:21:
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:64:65: error: invalid use of non-static data member 'address_range::type'
     address_range(FLASH_START, FLASH_END_RP2350, address_range::type::CONTENTS),
                                                                 ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:65:63: error: invalid use of non-static data member 'address_range::type'
     address_range(SRAM_START, SRAM_END_RP2350, address_range::type::NO_CONTENTS),
                                                               ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:66:78: error: invalid use of non-static data member 'address_range::type'
     address_range(MAIN_RAM_BANKED_START, MAIN_RAM_BANKED_END, address_range::type::NO_CONTENTS)
                                                                              ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:67:1: error: no matching function for call to 'std::vector<address_range>::vector(<brace-enclosed initializer list>)'
 };
 ^
In file included from C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/vector:64:0,
                 from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.cpp:17:
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:401:9: note: candidate: template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&)
         vector(_InputIterator __first, _InputIterator __last,
         ^
C
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:253:7: note:   candidate expects 0 arguments, 3 provided
In file included from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.h:20:0,
                 from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.cpp:21:
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:70:63: error: invalid use of non-static data member 'address_range::type'
     address_range(SRAM_START, SRAM_END_RP2350, address_range::type::CONTENTS),
                                                               ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:71:78: error: invalid use of non-static data member 'address_range::type'
     address_range(XIP_SRAM_START_RP2350, XIP_SRAM_END_RP2350, address_range::type::CONTENTS),
                                                                              ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:72:61: error: invalid use of non-static data member 'address_range::type'
     address_range(ROM_START, ROM_END_RP2350, address_range::type::IGNORE) // for now we ignore the bootrom if present
                                                             ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:45:10: note: declared here
     type type;
          ^
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:73:1: error: no matching function for call to 'std::vector<address_range>::vector(<brace-enclosed initializer list>)'
 };
 ^
In file included from C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/vector:64:0,
                 from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.cpp:17:
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:401:9: note: candidate: template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&)
         vector(_InputIterator __first, _InputIterator __last,
         ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:401:9: note:   template argument deduction/substitution failed:
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:373:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(initializer_list<value_type> __l,
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:373:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:348:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(vector&& __rv, const allocator_type& __m)
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:348:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:339:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(const vector& __x, const allocator_type& __a)
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:339:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:335:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = address_range; _Alloc = std::allocator<address_range>]
       vector(vector&& __x) noexcept
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:335:7: note:   candidate expects 1 argument, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:318:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = address_range; _Alloc = std::allocator<address_range>]
       vector(const vector& __x)
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:318:7: note:   candidate expects 1 argument, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:289:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::value_type = address_range; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(size_type __n, const value_type& __value,
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:289:7: note:   conversion of argument 1 would be ill-formed:
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:277:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:277:7: note:   candidate expects 2 arguments, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:264:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = address_range; _Alloc = std::allocator<address_range>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<address_range>]
       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:264:7: note:   candidate expects 1 argument, 3 provided
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:253:7: note: candidate: std::vector<_Tp, _Alloc>::vector() [with _Tp = address_range; _Alloc = std::allocator<address_range>]
       vector()
       ^
C:/VSARM/mingw/mingw32/i686-w64-mingw32/include/c++/bits/stl_vector.h:253:7: note:   candidate expects 0 arguments, 3 provided
In file included from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.h:20:0,
                 from C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\elf_file.cpp:21:
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h: In function 'bool is_address_initialized(const address_ranges&, uint32_t)':
C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\elf\addresses.h:87:35: error: 'address_range::type' is not a class, namespace, or enumeration
             return address_range::type::CONTENTS == range.type;
                                   ^
elf\CMakeFiles\elf.dir\build.make:75: recipe for target 'elf/CMakeFiles/elf.dir/elf_file.cpp.obj' failed
mingw32-make[2]: *** [elf/CMakeFiles/elf.dir/elf_file.cpp.obj] Error 1
CMakeFiles\Makefile2:604: recipe for target 'elf/CMakeFiles/elf.dir/all' failed
mingw32-make[1]: *** [elf/CMakeFiles/elf.dir/all] Error 2
Makefile:134: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
PS C:\Users\Matthew\Desktop\Pico\pico-rvd\build\picotool\build>

The error occurs at the point were the percentages on the left stop. I am using a freshly updated version of the Pico SDK in case that matters. I also recloned the git repo several times to no avail. I need picotool for pico-rvd which tried to install it automatically, but failed with the same error. In other words I need to be able to use picotool. I am completely stumped and would appreciate any help I can get. If you need the full output I can see about getting that to you.


Solution

  • Your problem is your ancient MinGW compiler version. Notice "The C compiler identification is GNU 5.4.0" (released June 3, 2016). You need to update your MinGw install. I suggest removing your current MinGW and installing MSYS2 which will provide you with and updated MinGW providing gcc/g++ 14.2.0 (as of a couple weeks ago).

    For details on your error, see: Raspberry Pi install - error: invalid use of non-static data member ‘address_range::type

    Installing MSYS2 will also provide a very nice Linux shell and development environment. (which is what I use to build for the Pi and Pico boards on Windows). Though VSCode and VSCommunity are also very good IDEs if you prefer and they will happily use the new MinGW from MSYS2.