This removes the downloading / copying of the nimbase.h file when creating a project with piconim init. Instead, we add a CMake directive so that the nim/lib dir is passed as an include search path to gcc.
Why:
No need to mess around with downloading the correct nimbase file at project creation time, or asking the user to specify the path.
The nimbase file will always correspond to the nim compiler that is being used for the build. We do this by running nim at compile time and calling getCurrentCompilerExe. Should prevent issues with nimbase if version incompatibilities are introduced in future nim versions.
This is implemented by piggybacking onto the same cmake include file that is generated at runtime (for the pico-sdk includes). I moved and renamed stuff a bit in the piconim code in order to reflect this. The advantage is that existing projects keep working with new piconim, because we don't need to add a new include to the base CMakeLists file.
I bumped the min required Nim compiler to 1.6.0, for two reasons:
The -mm switch that was already included in the project template is not compatible with prior versions, that used -gc.
getCurrentCompilerExe() also doesn't exist in prior versions
This removes the downloading / copying of the
nimbase.h
file when creating a project withpiconim init
. Instead, we add a CMake directive so that thenim/lib
dir is passed as an include search path to gcc.Why:
getCurrentCompilerExe
. Should prevent issues with nimbase if version incompatibilities are introduced in future nim versions.This is implemented by piggybacking onto the same cmake include file that is generated at runtime (for the pico-sdk includes). I moved and renamed stuff a bit in the piconim code in order to reflect this. The advantage is that existing projects keep working with new piconim, because we don't need to add a new include to the base CMakeLists file.
I bumped the min required Nim compiler to 1.6.0, for two reasons:
-mm
switch that was already included in the project template is not compatible with prior versions, that used-gc
.getCurrentCompilerExe()
also doesn't exist in prior versionsFinally, bumped nimble patch version.