Open adokitkat opened 3 months ago
@adokitkat:
I compiled the Nim code with https://ide.kaitai.io/# website.
This is actually significant - please use https://ide.kaitai.io/devel/ instead of https\://ide.kaitai.io/, at least for now. It seems you've run into the same situation as in https://github.com/kaitai-io/kaitai_struct_webide/issues/150#issuecomment-1307819199, which has been fixed at https://ide.kaitai.io/devel/ (as part of https://github.com/kaitai-io/kaitai_struct_webide/issues/165), but not in the "stable" version of the Web IDE yet.
The error message value out of range [RangeDefect]
looks like it boils down to this exact problem - check the main.nim
file you generated:
Nvs_EntryState* = enum
entry_state_empty = 0
Nvs_NvsType* = enum
this.io.readBitsIntLe(2)
apparently reads something other than 0
, which Nim doesn't know how to convert into the Nvs_EntryState
type.
You may also be interested in other recent improvements to the Web IDE: https://kaitai.io/news/2024/02/21/web-ide-improvements.html
Hi, I get this error message using both Nim v1.6 and v2 (I also got more smaller errors but I fixed them fairly easy, mostly syntax errors or arithmetics on variables with different types):
Caused by this generated Nim code:
The source
.ksy
file works withksv
visualizer. I compiled the Nim code with https://ide.kaitai.io/# website.Files to replicate this in zip below: kaitai_nim_doesnt_work.zip