Skip to content

filesystem error #5

@Martinix75

Description

@Martinix75

Hi Daniel, I was trying to play with the "FileSystem".
I only wrote the departure but it already gives me mistakes:

import picostdlib
import picostdlib/pico/[filesystem, stdio]

stdioInitAll()


var fs = filesystemFatCreate()

The lerror returns to me: (it seems that the EE Nim bookshop do not go to accord on backend & Nim disagree on size for: clong{int}).

[ 26%] Building C object CMakeFiles/fs_test.dir/home/andrea/Programmazione/Pico/pico-sdk/src/common/hardware_claim/claim.c.o
[ 27%] Building C object CMakeFiles/fs_test.dir/home/andrea/Programmazione/Pico/pico-sdk/src/rp2040/pico_platform/platform.c.o
In file included from /home/andrea/Programmazione/Pico/fs_test/build/fs_test/fs_test/nimcache/@mfs_test.nim.c:5:
/home/andrea/bin/nim/lib/nimbase.h:273:35: error: static assertion failed: "backend & Nim disagree on size for: clong{int} [type declared in /home/andrea/bin/nim/lib/system/ctypes.nim(28, 5)]"
  273 | #define NIM_STATIC_ASSERT(x, msg) _Static_assert((x), msg)
      |                                   ^~~~~~~~~~~~~~
/home/andrea/Programmazione/Pico/fs_test/build/fs_test/fs_test/nimcache/@mfs_test.nim.c:109:1: note: in expansion of macro 'NIM_STATIC_ASSERT'
  109 | NIM_STATIC_ASSERT(sizeof(time_t) == 4, "backend & Nim disagree on size for: clong{int} [type declared in /home/andrea/bin/nim/lib/system/ctypes.nim(28, 5)]");
      | ^~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/fs_test.dir/build.make:401: CMakeFiles/fs_test.dir/fs_test/nimcache/@mfs_test.nim.c.o] Error 1
gmake[2]: *** Attesa per i processi non terminati....
[ 27%] Building C object CMakeFiles/fs_test.dir/home/andrea/Programmazione/Pico/pico-sdk/src/rp2_common/pico_platform_panic/panic.c.o
gmake[1]: *** [CMakeFiles/Makefile2:2257: CMakeFiles/fs_test.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
stack trace: (most recent call last)
/tmp/nimblecache-2166255073401123403/nimscriptapi_5638658164521267257.nim(240, 28)
/home/andrea/.nimble/pkgs2/picostdlib-0.4.0-a7ce0e30b6df17ccfccecc051841b9f5aa2bdfbc/picostdlib/build_utils/tasks.nim(124, 7) buildAfter
/home/andrea/bin/nim/lib/system/nimscript.nim(264, 7) exec
       Tip: 15 messages have been suppressed, use --verbose to show them.
nimscriptwrapper.nim(166) execScript

    Error:  Exception raised during nimble script execution
stack trace: (most recent call last)
/tmp/nimblecache-2166255073401123403/nimscriptapi_5638658164521267257.nim(216, 16)
/home/andrea/.nimble/pkgs2/picostdlib-0.4.0-a7ce0e30b6df17ccfccecc051841b9f5aa2bdfbc/picostdlib/build_utils/tasks.nim(135, 7) buildcleanTask
/home/andrea/bin/nim/lib/system/nimscript.nim(264, 7) exec
       Tip: 11 messages have been suppressed, use --verbose to show them.
nimscriptwrapper.nim(166) execScript

    Error:  Exception raised during nimble script execution
andrea@tec-martin:~/Programmazione/Pico/fs_test> 

Can you understand what there is wrong and how to solve? Hello from Andrea

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions