Error with Piconim 0.3.1 on old projects
Opened this issue · 1 comments
Hi Jason,
Today (back from holidays) I updated Piconim 0.3.0 -> 0.3.1.
If I create a new project everything works well and is completed, while those created first by an error (which I put below). I also tried the "Piconim Setup--Sdk:/Home/Andrea/ProgPiconim/Pico-Sdk" command, but it did not give results.
what should I do ? Recreate the projects or is there another solution?
the error in the old progects:
make[2]: Leaving directory '/home/andrea/ProgPicoNim/scannerI2c/csource/build'
make[2]: Entering directory '/home/andrea/ProgPicoNim/scannerI2c/csource/build'
[ 14%] Building C object CMakeFiles/scannerI2c.dir/nimcache/@m..@s..@s..@s.nimble@spkgs@spicostdlib-0.3.1@spicostdlib@sstdio.nim.c.obj
In file included from /home/andrea/ProgPicoNim/scannerI2c/csource/build/nimcache/@m..@s..@s..@s.nimble@spkgs@spicostdlib-0.3.1@spicostdlib@sstdio.nim.c:5:
/home/andrea/ProgPicoNim/scannerI2c/csource/nimbase.h:276:35: error: static assertion failed: ""
276 | #define NIM_STATIC_ASSERT(x, msg) _Static_assert((x), msg)
| ^~~~~~~~~~~~~~
/home/andrea/ProgPicoNim/scannerI2c/csource/nimbase.h:550:1: note: in expansion of macro 'NIM_STATIC_ASSERT'
550 | NIM_STATIC_ASSERT(sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8, "");
| ^~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/scannerI2c.dir/build.make:76: CMakeFiles/scannerI2c.dir/nimcache/@m..@s..@s..@s.nimble@spkgs@spicostdlib-0.3.1@spicostdlib@sstdio.nim.c.obj] Error 1
make[2]: Leaving directory '/home/andrea/ProgPicoNim/scannerI2c/csource/build'
make[1]: *** [CMakeFiles/Makefile2:1329: CMakeFiles/scannerI2c.dir/all] Error 2
make[1]: Leaving directory '/home/andrea/ProgPicoNim/scannerI2c/csource/build'
make: *** [Makefile:91: all] Error 2
make: Leaving directory '/home/andrea/ProgPicoNim/scannerI2c/csource/build'
A solution, but not beautiful is to use:
piconim init scannerI2c -n:/home/andrea/bin/nim/lib/nimbase.h -s:/home/andrea/ProgPicoNim/pico-sdk --overwrite
(with overwrite).
Too bad that however delete the main file (Scanneneri2c.nim) and if not previously saved is lost! (dangerous solution). If there was a way to update the project without losing data it would be nice!
For the evening I disturbed too much :)