Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - quadratic77

Pages: 1 [2]
16
Ndless / Re: Mathomatic Port to Ndless gives a memory error
« on: April 25, 2014, 09:22:31 pm »
Ok, I fixed the crashes by adding -mlong-calls to the example.c compile command line and by fixing an error in my code (duh, uncomment the exit call after the error reporting "not enough memory" else the code will go on and crash...I should have thought of that waay earlier)

Other than that the code still won't allocate the memory.

17
Ndless / Re: Mathomatic Port to Ndless gives a memory error
« on: April 25, 2014, 08:48:37 pm »
Ok. The calc still crashes (freezes up). May be my code, may not. I've checked mine as best I can. Here is the command line:

nspire-gcc  -O3  -Wall -Wshadow -Wno-char-subscripts -marm  -mlong-calls -fexceptions -DVERSION=\"`cat VERSION`\" -DLIBRARY -DSILENT=1 -DSECURE -DHANDHELD -DNO_COLOR     -c -o am.o am.c

The above for every library source code file, then the following for example.c:

nspire-gcc -Wall -marm -Os -c lib/example.c

Then I linked:

 nspire-ld-bflt am.o cmds.o complex.o complex_lib.o diff.o factor.o factor_int.o gcd.o globals.o help.o integrate.o lib/lib.o list.o parse.o poly.o simplify.o solve.o super.o unfactor.o lib/example.o -o lib/MathomaticNdless.tns

And transferred. Ran and the calc said "not enough memory" and froze. Any ideas? Should I post source code? Would rebuilding the code without ANY modifications to the code do anything?

Quadratic

(Still amazed at the quickness of replies...)

18
Ndless / Re: Mathomatic Port to Ndless gives a memory error
« on: April 25, 2014, 08:00:24 pm »
I am so amazed at the quick response time. Thank you.

#include <limits.h>
#include <float.h>
#include <math.h>
#include <setjmp.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
etc.

I'm guessing that is newlib. I never included <os.h> in any file in the code.

"insert a message": how? why? Like a debug message?

I used nspire-gcc and do not think I added the -mlong-calls to the command line (I ran the command a while ago and can't revive my history listing...)
As for modifications, I changed DEFAULT_N_TOKENS to 100 instead of whatever it was (in am.h), and I think whatever I needed to do to get rid of errors. And I changed example.c to fit the nspireio2's functions. (I'm using example.c for my testing purposes. Also I'm using the library and linking it to example.o.)

I'm going to re-compile everything now so I can get more precise information for you. Should I add the -mlong-calls to the command line? Should I not use nspire-gcc?

19
Ndless / Mathomatic Port to Ndless gives a memory error
« on: April 25, 2014, 06:50:00 pm »
Hello all,

I am trying to port Mathomatic, a computer cas system, to the Nspire CX using ndless. It says it doesn't have enough memory when I run it. I have told it HANDHELD=1 and SECURE=1 so it minimizes memory usage and have taken the number of equation spaces waaay down to the lowest the code says it can go. Also, somewhere in the readme's it says that it can run on a few MB's of RAM, so it should work on the Nspire. Sometimes it crashes the calculator and I have to reset. Frustrating process of resetting, installing ndless, etc....

I have made minimal modifications to the code, and it compiles and links without major warnings.

Any ideas? I can provide more information if you want I just don't know what else to say save telling my entire process (cmd lines, etc.).

Oh, and the code is C.

Quadratic

Pages: 1 [2]