Author Topic: How to create a C program for Nspire CX CAS?  (Read 17924 times)

0 Members and 1 Guest are viewing this topic.

Offline APoloG13

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
How to create a C program for Nspire CX CAS?
« on: December 23, 2016, 03:20:23 pm »
Hi everyone,

I'm opening this post because i want some help to write a program in C for the TI Nspire (actually I have in mind a few programs... ) but first thing first... How it's done?

How do you do to write a C program for the Nspire? (I started trying to install the Ndless SDK but ended on a big failure and I don't know how to do it properly :banghead:)

Thanks omnimaga community

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #1 on: December 23, 2016, 03:43:22 pm »
Hello APoloG13,

You can find the tutorial here: https://github.com/ndless-nspire/Ndless/wiki/Ndless-SDK:-C-and-assembly-development-introduction

What failure do you get and at which step?



Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #2 on: December 23, 2016, 03:48:29 pm »
Also, what OS are you using?

Offline APoloG13

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #3 on: December 23, 2016, 03:58:47 pm »
i'm using Windows10 and the problem is when you have to Run the SDK's build_toolchain.sh script,

cd ndless-sdk/toolchain/
./build_toolchain.sh

look:

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #4 on: December 23, 2016, 04:09:27 pm »
https://hackspire.org/index.php/C_and_assembly_development_introduction#On_Windows

You have to install the dependencies listed:
Quote
php (5.6+), libboost-devel, libboost_program_options*, binutils, gcc-core, gcc-g++, git, mpfr, mpfr-devel, gmp, libgmp-devel, libmpc3, libmpc-devel, openssl-dev, make, texinfo, zlib-devel, wget

Offline APoloG13

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #5 on: December 23, 2016, 04:10:37 pm »
So now i have to re-install Cygwin ?  :banghead: :banghead:

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #6 on: December 23, 2016, 04:14:43 pm »
No, you just have to install the extra packages. To do that, you have to run the Cygwin installer again. But it won't get rid of your installation, it will just add whatever you tell it to add.

Offline APoloG13

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #7 on: December 23, 2016, 04:15:58 pm »
And what dependence are? Because i'm writing and didn't find it

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #8 on: December 23, 2016, 04:16:40 pm »
These ones:
php (5.6+), libboost-devel, libboost_program_options*, binutils, gcc-core, gcc-g++, git, mpfr, mpfr-devel, gmp, libgmp-devel, libmpc3, libmpc-devel, openssl-dev, make, texinfo, zlib-devel, wget

Offline APoloG13

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #9 on: December 23, 2016, 04:19:49 pm »
These ones:
php (5.6+), libboost-devel, libboost_program_options*, binutils, gcc-core, gcc-g++, git, mpfr, mpfr-devel, gmp, libgmp-devel, libmpc3, libmpc-devel, openssl-dev, make, texinfo, zlib-devel, wget

The missing ones... Sorry my question wasn't accurate enough  ;D

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #10 on: December 23, 2016, 04:22:42 pm »
I don't understand your question, those are the packages you have to install. What difficulties are you running into?

Offline APoloG13

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #11 on: December 23, 2016, 05:16:01 pm »
I'm reinstalling right now so I hope i don't miss any of them. Thanks for helping me i know it's not easy



Ok now it's a half success, I ended with this  ??? ???

Edit (Eeems): Merged double post
« Last Edit: January 02, 2017, 02:44:36 am by Eeems »

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #12 on: December 23, 2016, 06:01:10 pm »
If you run "ls -a" what do you get?

Offline APoloG13

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #13 on: December 23, 2016, 06:10:40 pm »
.                .downloaded    build               gcc-6.2.0  newlib-2.4.0
..               .gitignore     build_toolchain.sh  gdb-7.12
.built_binutils  binutils-2.27  download            install

that is what i get

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: How to create a C program for Nspire CX CAS?
« Reply #14 on: December 23, 2016, 06:13:52 pm »
OK, so it failed on GCC step 1. If you cd to build and run "make all-gcc" what is the output?