compile-time import

2020-11-24 Thread alexiss
> PRs are welcome. ;) Could you give me some direction? Should it work without any syntax changes or we need to point such imports with somethink like `static import os` or `import os {.compileTime.}`? Some hints of where to look best whould be very useful

compile-time import

2020-11-24 Thread alexiss
> Another solution: Use staticExec to run helper programs at compile-time to > determine things like MCU-specific registers. I'm afraid this is not a solution in my case - I have a lot of checks in several places while compilation. For example - is register read-only or not, can we set this MCU

compile-time import

2020-11-24 Thread alexiss
@Araq thank you for fast reply! After changing `--os:standalone` to `--os:any` I have following error: Error: Port memory manager to your platform Run Not very informative for me. Here is my `nim.cfg` define: "EmbedTarget=stm32f334r8t6" arm.any.g

compile-time import

2020-11-24 Thread alexiss
Hi, guys! I'm writing a library that helps in embedded programming. The idea is to make a bunch of macros that expands into MCU-specific registers access. For example for STM32: mcu.RCC.AHBENR["IOPAEN"] = 1 Run I have a working sekelton now but I get a problem when t