ndless-nspire / Ndless

The TI-Nspire calculator extension for native applications
http://ndless.me
827 stars 103 forks source link

Creating CMake-compatible toolchain? #315

Open wale opened 2 years ago

wale commented 2 years ago

Hello, I would like to propose that the Ndless SDK should at least be supported as a CMake-compatible toolchain.

A benefit of this is that it'd make porting more modern programs that don't already support the Ti-Nspire much easier, rather than being confined to one build tool. It can be extended to easily support custom commands & macros, such as what we would need with the genzehn and make-prg tools, which can make building full Ndless programs much easier with CMake. Examples of this can be seen in the PS-Vita toolchain.

Related issues: #280

Vogtinator commented 2 years ago

Sounds like a good idea.

So far I haven't had many issues with cross compiling, usually just specifying arch-none-eabi- as host triple and using genzehn on the final .elf file is enough, sometimes a custom prefix/sysroot for finding other libs and includes is necessary.

wale commented 2 years ago

That's fair, though we would need to standardise certain variables (e.g. NDLESS_SDK_HOME) to get things to work in CMake properly, given that there's no single dedicated path for Ndless to install in.

wale commented 2 years ago

Also, would this be good enough of a feature request to make a PR for? IMO it'd be worth working on expanding Ndless' compability with other build systems. We could also extend the nspire-tools command to support generating CMake projects if desired.