Page 1 of 1

help ndless sdk

Unread postPosted: 03 May 2018, 01:19
by BackStage
bsr a tous
je lance avec le sdk ndless

Code: Select all
# nspire-tools new test
Makefile created.


voici le code de mon test.c

Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <os.h>
int main()
{
  printf("test");
  return 0;
}


Code: Select all
# make
nspire-gcc -Wall -W -marm -Os -c test.c -o test.o
mkdir -p .
nspire-ld test.o -o test.elf
genzehn --input test.elf --output test.tns.zehn --name "test"
Warning: Using neither old (SCREEN_BASE_ADDRESS) nor new (lcd_blit) API!
Assuming '--uses-lcd-blit false'!
Warning: Your application does not appear to support 240x320px displays!
If it does, override with '--240x320-support true'.
make-prg test.tns.zehn test.tns
rm test.tns.zehn


Quand j'execute test.tns sur la calculatrice rien ne se passe
ma calculatrice est une CAS touchpad monochrome os 3.6 ndless idem

A l'aide :)

Re: help ndless sdk

Unread postPosted: 03 May 2018, 03:07
by parrotgeek1
printf prints on the RS232 port of the dock connector. To show a dialog box do show_msgbox("title", "msg");

EDIT: thanks to whoever fixed my formatting lol

Re: help ndless sdk

Unread postPosted: 03 May 2018, 07:53
by Vogtinator
If you want to use text IO on the screen with printf, you can use "LDFLAGS = -Wl,--nspireio" in the Makefile.

Re: help ndless sdk

Unread postPosted: 03 May 2018, 10:21
by Ti64CLi++
Oh, we can use printf as an IO function which will print directly on the screen?
I didn't know that.
It's a good news :)

Re: help ndless sdk

Unread postPosted: 04 May 2018, 02:21
by BackStage
parrotgeek1 and Vogtinator tanks :)