That seems like a consequence of not calling cleanup at the end of your program. Possibly iy was not restored on exit?
elfprince13 wrote:
That seems like a consequence of not calling cleanup at the end of your program. Possibly iy was not restored on exit?

IY is restored by the startup module. I'll need to look more, but I imagine it has something to do with me using data pointers from the OS Razz
Version 2 of the toolchain and libraries is here! This includes many bug fixes and usability updates. Please read the following closely to be sure you install correctly. Thanks! Smile

1) Reinstall the latest toolchain zip, available here: https://github.com/CE-Programming/toolchain/releases

2) Replace the library files inside the library_headers into the lib/ce directory into your toolchain setup, available here: https://github.com/CE-Programming/libraries (Just click on 'Download ZIP')

3) If you used the 'ti84pce.h' header file before, its name has been changed to 'tice.h', as this toolchain also includes the TI83PCE.

4) Replace your makefiles that you use for your programs with the makefile inside of the examples/template directory.

5) Now, compiling libs into your program is a little different. In order to do this, simply add a line such as:

Code:
# Include the graphics library
L := graphc

inside of your makefile. You can chain multiple ones together so you can use all the libraries. This is to make it so you can use the headers across multiple files.

6) Two new functions have been added, pgm_CleanUp and memset_fast. Please check the tice.h file for information on this, and the multitude of other functions that have also been added (see below)

7) If you have any issues, feel free to post here! Smile


Code:
// Parts from Matt "MateoConLechuga" Waltz and Jacob "jacobly" Young, in addtion to
// contributors of http://wikiti.brandonw.net/index.php?title=84PCE:OS:Include_File
// Latest as of March. 5, 2016

#ifndef TICE_H
#define TICE_H

#include <stdbool.h>
#include <stdint.h>

/* Defines for MMIO memory areas */

/* RTC defines */
/* There’s a whole slew of bootcode RTC functions, but a lot of them are kind of pointless when you could just use these defines from MMIO */
#define rtc_GetSeconds()        (*((uint8_t*)0xF30000))
#define rtc_GetMinutes()        (*((uint8_t*)0xF30004))
#define rtc_GetHours()          (*((uint8_t*)0xF30008))
#define rtc_GetDays()           (*((uint16_t*)0xF3000C))
#define rtc_GetControl()        (*((uint8_t*)0xF30020))
#define rtc_SetControl(c)       ((*((uint8_t*)0xF30020)) = (uint8_t)(c))
#define rtc_LoadSetTime()       ((*((uint8_t*)0xF30020)) = (*((uint8_t*)0xF30020))|64)
#define rtc_SetSeconds(s)       ((*((uint8_t*)0xF30024)) = (uint8_t)(s))
#define rtc_SetMinutes(m)       ((*((uint8_t*)0xF30028)) = (uint8_t)(m))
#define rtc_SetHours(h)         ((*((uint8_t*)0xF3002C)) = (uint8_t)(h))
#define rtc_SetDays(d)          ((*((uint16_t*)0xF3002C)) = (uint16_t)(d))
#define rtc_Time()              (*(volatile uint32_t*)0xF30044)

/* LCD defines */
#define lcd_GetBacklightLevel()  (*((uint8_t*)0xF60024))
#define lcd_SetBacklightLevel(b) ((*((uint8_t*)0xF60024)) = (uint8_t)(b);

/**
 * OS varaible type definitions
 */
typedef struct { int8_t sign, exp; uint8_t mant[7]; } real_t;
typedef struct { real_t real, imag; } cplx_t;
typedef struct { uint16_t dim; real_t *items; } list_t;
typedef struct { uint16_t dim; cplx_t *items; } cplx_list_t;
typedef struct { uint8_t cols, rows; real_t *items; } matrix_t;
typedef struct { uint16_t size; uint8_t *data; } var_t;

/**
 * Cleans up everything and gets ready to enter back to the OS
 * when you are ready to exit your program
 */
void pgrm_CleanUp(void);

/**
 * A faster implementation of memset
 */
void *memset_fast(void *ptr,int value,size_t num);

/**
 * Returns the Bootcode version major
 */
uint8_t boot_GetBootVerMajor(void);

/**
 * Returns the Bootcode version minor
 */
uint8_t boot_GetBootVerMinor(void);

/**
 * Returns the Harware version
 */
uint8_t boot_GetHardwareVers(void);

/**
 * Turns all of VRAM into 0xFF (white)
 */
void boot_ClearVRAM(void);

/**
 * Checks if the [on] key was pressed
 */
bool boot_CheckOnPressed(void);

/**
 * Returns extended keys as 16-bits
 */
int os_GetKey(void);

/**
 * Performs an OS call to get the keypad scan code
 */
int os_GetCSC(void);

/**
 * Disables the OS cursor
 */
void os_DisableCursor(void);

/**
 * Enables the OS cursor
 */
void os_EnableCursor(void);

/**
 * Set/Get the foreground color used to draw text on the graphscreen
 */
void os_SetDrawFGColor(int color);
int os_GetDrawFGColor(void);

/**
 * Set/Get the backgroundground color used to draw text on the graphscreen
 * os_GetDrawBGColor is broken; use at your own risk
 */
void os_SetDrawBGColor(int color);
void os_GetDrawBGColor_BROKEN(int color);

/**
 * Set/Get the cursor posistion used on the homescreen
 */
void os_SetCursorPos(uint8_t curRow, uint8_t curCol);
void os_GetCursorPos(unsigned int *curRow, unsigned int *curCol);

/**
 * Selects/Gets the font to use when drawing on the graphscreen
 * 0: small font
 * 1: large monospace font
 */
void os_FontSelect(char id);
int os_FontGetID(void);

/**
 * Returns the width of a string in the varaible-width format
 * Second function is used to get the height of the characters
 */
int os_FontGetWidth(const char *string);
int os_FontGetHeight(void);

/**
 * Draws a text using the small font to the screen
 * Returns the end column
 */
int os_FontDrawText(const char *string, uint16_t col, uint8_t row);
int os_FontDrawTransText(const char *string, uint16_t col, uint8_t row);

/**
 * Puts some text at the current homescreen cursor location
 * Returns 1 if string fits on screen, 0 otherwise
 */
int os_PutStrFull(const char *string);

/**
 * Puts some text at the current homescreen cursor location
 * Returns 1 if string fits on line, 0 otherwise
 */
int os_PutStrLine(const char *string);

/**
 * Set/Get a particular flag variable
 */
void os_SetFlagByte(int offset, uint8_t set);
uint8_t os_GetFlagByte(int offset);

/**
 * Returns amount of free ram, free set to start of free ram
 */
size_t os_MemChk(void **free);

/**
 * Throws an OS error
 */
void os_ThrowError(uint8_t error);

/**
 * Returns a pointer to symtable of the OS
 */
void *os_GetSymTablePtr(void);

/**
 * Creates an appvar; and returns a pointer to the structure
 * Returns NULL if creation failed for some reason, otherwise a pointer to the size bytes
 */
var_t *os_CreateAppVar(const char *name, uint16_t size);

/**
 * Returns next entry or NULL if no more entries, pass os_GetSymTablePtr() as first entry
 */
void *os_NextSymEntry(void *entry, uint24_t *type, uint24_t *nameLength, char *name, void **data);

/**
 * If file exists, returns 1 and sets entry and data, otherwise returns 0.
 * entry and/or data can be NULL if you don't care
 */
int os_ChkFindSym(uint8_t type, const char *name, void **entry, void **data);

/**
 * type is set to the current varaible type in ANS, and a pointer to the data is returned
 * Returns NULL if Ans doesn't exist or type is NULL
 */
void *os_RclAns(uint8_t *type);

/**
 * Copies a real_t type to another location
 * Returns dest
 */
real_t *os_RealCopy(real_t *dest, const real_t *src);

/**
 * Urnary operations used to interact with the OS math functions
 * All return result
 */
real_t *os_RealAcosRad(real_t *result, const real_t *arg);
real_t *os_RealAsinRad(real_t *result, const real_t *arg);
real_t *os_RealAtanRad(real_t *result, const real_t *arg);
real_t *os_RealCosRad(real_t *result, const real_t *arg);
real_t *os_RealRadToDeg(real_t *result, const real_t *arg);
real_t *os_RealExp(real_t *result, const real_t *arg);
real_t *os_RealFloor(real_t *result, const real_t *arg);
real_t *os_RealFrac(real_t *result, const real_t *arg);
real_t *os_RealRoundInt(real_t *result, const real_t *arg);
real_t *os_RealLog(real_t *result, const real_t *arg);
real_t *os_RealNeg(real_t *result, const real_t *arg);
real_t *os_RealDegToRad(real_t *result, const real_t *arg);
real_t *os_RealInv(real_t *result, const real_t *arg);
real_t *os_RealSinRad(real_t *result, const real_t *arg);
real_t *os_RealSqrt(real_t *result, const real_t *arg);
real_t *os_RealTanRad(real_t *result, const real_t *arg);
real_t *os_RealInt(real_t *result, const real_t *arg);
cplx_t *os_CplxSquare(cplx_t *result, const cplx_t *arg);

/**
 * Binary operations used to interact with the OS math functions
 * All return result
 */
real_t *os_RealAdd(real_t *result, const real_t *arg1, const real_t *arg2);
real_t *os_RealDiv(real_t *result, const real_t *arg1, const real_t *arg2);
real_t *os_RealGcd(real_t *result, const real_t *arg1, const real_t *arg2);
real_t *os_RealLcm(real_t *result, const real_t *arg1, const real_t *arg2);
real_t *os_RealMax(real_t *result, const real_t *arg1, const real_t *arg2);
real_t *os_RealMin(real_t *result, const real_t *arg1, const real_t *arg2);
real_t *os_RealMul(real_t *result, const real_t *arg1, const real_t *arg2);
real_t *os_RealNcr(real_t *result, const real_t *total, const real_t *num);
real_t *os_RealNpr(real_t *result, const real_t *total, const real_t *num);
real_t *os_RealPow(real_t *result, const real_t *base, const real_t *exp);
real_t *os_RealRandInt(real_t *result, const real_t *min, const real_t *max);
real_t *os_RealMod(real_t *result, const real_t *arg1, const real_t *arg2);
real_t *os_RealSub(real_t *result, const real_t *arg1, const real_t *arg2);
/**
 * digits must be in the range 0 - 9
 */
real_t *os_RealRound(real_t *result, const real_t *arg, char digits);

/**
 * Returns -1, 0, or 1 depending on the comparison
 */
int os_RealCompare(const real_t *arg1, const real_t *arg2);

/** os_RealToStr:
  *  This converts a ti-float to a ti-ascii string.
  *  result: zero terminated string copied to this address
  *  arg: real to convert
  * maxLength:
  *  <=0: use default max length (14)
  *  >0:  max length of result, minimum of 6
  * mode:
  *  0: Use current mode for everything (digits ignored)
  *  1: Normal mode
  *  2: Sci mode
  *  3: Eng mode
  *  >4: Use current Normal/Sci/Eng mode (digits still used)
  * digits:
  *  -1:  Float mode
  *  0-9: Fix # mode
  *  returns length of result
  */
int os_RealToStr(char *result, const real_t *arg, char maxLength, char mode, char digits);

/** os_StrToReal:
  *  This converts a ti-ascii string to a ti-float.
  *  String format regexp: / *[-\032+]?[0-9]*(\.[0-9]*)?([eE\033][-\032+]?[0-9]*)?/
  *  result: resulting ti-float stored here, on exponent overflow this is +-9.9999999999999e99
  *  string: ti-ascii string to convert
  *  end: if non-null, pointer to end of parsed number is stored here
  *  returns result
  */
real_t *os_StrToReal(real_t *result, const char *string, char **end);

/**
 * Basically a reimplemented form of printf that prints to some debugging device
 */
void boot_DebugPrintf(const char *string);

/**
 * Turns off the calculator (probably not a good idea to use)
 */
void boot_TurnOff(void);

/**
 * Inserts a new line at the current cursor posistion on the homescreen
 */
void boot_NewLine(void);

/**
 * Prints the boot version at a really silly place on the homescreen
 */
void boot_PrintBootVersion(void);

/**
 * Sets the calculator into 6MHz mode and 48MHz modes. Note that the ones
 * suffix with I perserve the interrupt vectors
 */
void boot_Set6MHzMode(void);
void boot_Set48MHzMode(void);
void boot_Set6MHzModeI(void);
void boot_Set48MHzModeI(void);

/**
 * Returns the current battery status
 */
uint8_t boot_GetBatteryStatus(void);

/**
 * Waits for just a bit
 * Someone should really look at this to see how long it actually is
 */
void boot_WaitShort(void);

/**
 * Checks if the calculator is being powered via USB
 */
bool boot_USBPowered(void);

/**
 * Checks if there is not a USB plug of A type in the USB port
 */
bool boot_NotPlugTypeA(void);

/**
 * Set the time of the calculator
 */
void boot_SetTime(uint8_t seconds, uint8_t minutes, uint8_t hours);

/**
 * High 8 is unsigned offset, low 8 is bits to test
 * os_TestFlagBits will return a 0 or 1
 */
int os_TestFlagBits(uint16_t offset_pattern);
void os_SetFlagBits(int16_t offset_pattern);
void os_ResetFlagBits(int16_t offset_pattern);

/**
 * Whole bunch of possibly useful timer functions
 */
void boot_SetTimersControlRegister(uint16_t value);
uint16_t boot_GetTimersControlRegister(void);
void boot_SetTimersInterruptStatus(uint16_t value);
uint16_t boot_GetTimersInterruptStatus(void);
void boot_SetTimersInterruptMask(uint16_t value);
uint16_t boot_GetTimersInterruptMask(void);
void boot_SetTimer1Counter(uint32_t count);
uint32_t boot_GetTimer1Counter(void);
void boot_SetTimer1ReloadValue(uint32_t value);
uint32_t boot_GetTimer1ReloadValue(void);
void boot_SetTimer1MatchValue1(uint32_t value);
uint32_t boot_GetTimer1MatchValue1(void);
void boot_SetTimer1MatchValue2(uint32_t value);
uint32_t boot_GetTimer1MatchValue2(void);
void boot_SetTimer2Counter(uint32_t count);
uint32_t boot_GetTimer2Counter(void);
void boot_SetTimer2ReloadValue(uint32_t value);
uint32_t boot_GetTimer2ReloadValue(void);
void boot_SetTimer2MatchValue1(uint32_t value);
uint32_t boot_GetTimer2MatchValue1(void);
void boot_SetTimer2MatchValue2(uint32_t value);
uint32_t boot_GetTimer2MatchValue2(void);

/**
 * Things you shouldn't use unless you know what you are doing:
 */
void os_ForceCmdNoChar(void);
/* ============================================ */

/* === OS and Bootcode Funtion Wrapper ======== */
#pragma asm "xref __saveIY"
#define _OS(FUNC) \
    do { \
      asm("   LD   (__saveIY),IY"); \
      asm("   LD   IY, 13631616"); \
      FUNC ; \
      asm("   LD   IY,(__saveIY)"); \
    } while (0)
/* ============================================ */

#endif


Also, here's some nice things:

Code:
srand(rtc_Time());

Will seed the random numbers for you so it doesn't look as bad as it did. Smile

memset_fast is also a ton faster than the implementation in the bootcode, which will be helpful to elfprince, I believe Smile
This is what I get from cmd when I try to compile things with the libraries (even the examples on github):


Code:
keypadc.asm     (5) :   ERROR (401) Syntax error
keypadc.asm     (6) :   ERROR (401) Syntax error
keypadc.asm     (7) :   ERROR (401) Syntax error
keypadc.asm     (8) :   ERROR (401) Syntax error
keypadc.asm     (10) :  ERROR (401) Syntax error
keypadc.asm     (11) :  ERROR (401) Syntax error
keypadc.asm     (16) :  ERROR (401) Syntax error
keypadc.asm     (17) :  ERROR (401) Syntax error
keypadc.asm     (19) :  ERROR (401) Syntax error
keypadc.asm     (20) :  ERROR (401) Syntax error
keypadc.asm     (21) :  ERROR (401) Syntax error
keypadc.asm     (24) :  ERROR (401) Syntax error
keypadc.asm     (25) :  ERROR (401) Syntax error
keypadc.asm     (26) :  ERROR (401) Syntax error
keypadc.asm     (27) :  ERROR (401) Syntax error
keypadc.asm     (28) :  ERROR (401) Syntax error
keypadc.asm     (29) :  ERROR (401) Syntax error
keypadc.asm     (30) :  ERROR (401) Syntax error
keypadc.asm     (31) :  ERROR (401) Syntax error
keypadc.asm     (32) :  ERROR (401) Syntax error
keypadc.asm     (33) :  ERROR (401) Syntax error
keypadc.asm     (34) :  ERROR (401) Syntax error
keypadc.asm     (35) :  ERROR (401) Syntax error
keypadc.asm     (36) :  ERROR (401) Syntax error
keypadc.asm     (37) :  ERROR (401) Syntax error
keypadc.asm     (39) :  ERROR (401) Syntax error
keypadc.asm     (40) :  ERROR (401) Syntax error
keypadc.asm     (41) :  ERROR (401) Syntax error
keypadc.asm     (42) :  ERROR (401) Syntax error
keypadc.asm     (43) :  ERROR (401) Syntax error
keypadc.asm     (45) :  ERROR (401) Syntax error
keypadc.asm     (48) :  ERROR (401) Syntax error
keypadc.asm     (49) :  ERROR (401) Syntax error
keypadc.asm     (50) :  ERROR (401) Syntax error
keypadc.asm     (52) :  ERROR (401) Syntax error
keypadc.asm     (53) :  ERROR (401) Syntax error
keypadc.asm     (54) :  ERROR (401) Syntax error
keypadc.asm     (56) :  ERROR (401) Syntax error
keypadc.asm     (57) :  ERROR (401) Syntax error
keypadc.asm     (61) :  ERROR (401) Syntax error
keypadc.asm     (65) :  ERROR (401) Syntax error
keypadc.asm     (66) :  ERROR (401) Syntax error
keypadc.asm     (68) :  ERROR (401) Syntax error
keypadc.asm     (69) :  ERROR (401) Syntax error
keypadc.asm     (71) :  ERROR (401) Syntax error
keypadc.asm     (72) :  ERROR (401) Syntax error
keypadc.asm     (74) :  ERROR (401) Syntax error
keypadc.asm     (76) :  ERROR (401) Syntax error
keypadc.asm     (80) :  ERROR (401) Syntax error
keypadc.asm     (81) :  ERROR (401) Syntax error
keypadc.asm     (83) :  ERROR (401) Syntax error
keypadc.asm     (84) :  ERROR (401) Syntax error
keypadc.asm     (87) :  ERROR (401) Syntax error
keypadc.asm     (88) :  ERROR (401) Syntax error
keypadc.asm     (91) :  ERROR (401) Syntax error
keypadc.asm     (92) :  ERROR (401) Syntax error
keypadc.asm     (101) : ERROR (401) Syntax error
keypadc.asm     (102) : ERROR (401) Syntax error
keypadc.asm     (104) : ERROR (401) Syntax error
keypadc.asm     (105) : ERROR (401) Syntax error
keypadc.asm     (106) : ERROR (401) Syntax error
keypadc.asm     (108) : ERROR (401) Syntax error
keypadc.asm     (109) : ERROR (401) Syntax error
keypadc.asm     (110) : ERROR (401) Syntax error
keypadc.asm     (111) : ERROR (401) Syntax error
keypadc.asm     (113) : ERROR (401) Syntax error
A1: Internal Error(0xB2916E):
        Please contact Technical Support
main.c
C:\CEDEV\LIB\CE\GRAPHC.H        (5,2) : ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (6,11) :        ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (6,57) :        WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (7,4) : ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (8,18) :        ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (10,10) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (10,168) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (10,168) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (10,238) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (10,238) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (11,22) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (11,164) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (11,164) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (11,234) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (11,234) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (16,13) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (16,149) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (16,149) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (17,13) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (17,145) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (17,145) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (19,15) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (19,47) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (19,47) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (20,15) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (20,48) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (20,48) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (21,15) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (21,48) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (24,6) :        ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (25,14) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (25,73) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (25,73) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (25,107) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (26,6) :        ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (26,73) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (26,73) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (27,14) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (27,63) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (28,6) :        ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (28,52) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (28,52) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (29,14) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (29,52) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (29,52) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (30,14) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (30,52) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (30,52) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (31,14) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (31,52) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (31,52) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (32,14) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (32,54) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (32,54) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (33,14) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (33,54) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (33,54) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (34,14) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (34,54) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (34,54) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (35,14) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (35,54) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (35,54) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (36,14) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (36,54) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (36,54) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (37,19) :       ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (37,59) :       WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (39,8) :        ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (39,113) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (39,114) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (39,159) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (39,160) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (39,205) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (39,206) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (39,269) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (39,270) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (39,371) :      WARNING (221) Type defaults to int
C:\CEDEV\LIB\CE\GRAPHC.H        (39,372) :      ERROR (100) Syntax error
C:\CEDEV\LIB\CE\GRAPHC.H        (40,20) :       ERROR (100) Syntax error

P1: ***** Maximum error count exceeded *****
make: *** [main.obj] Error -1


It used to say something about GRAPHC.C not existing, but that's not on github. It's probably just a stupid mistake on my end, but I can seem to find a solution.
Did you reinstall the library assembly files and headers in step 2)? Also, if that doesn't work, you could just send me a zip of your current setup and I can tell you what is wrong Smile Also, don't forget that if you are using multiple libraries, you just need to do something like:


Code:
L := graphc fileioc keypadc


inside of your makefile. Please let me know what else appears to be broken. Thanks! Smile
MateoConLechuga wrote:
Did you reinstall the library assembly files and headers in step 2)? Also, if that doesn't work, you could just send me a zip of your current setup and I can tell you what is wrong Smile Also, don't forget that if you are using multiple libraries, you just need to do something like:


Code:
L := graphc fileioc keypadc


inside of your makefile. Please let me know what else appears to be broken. Thanks! Smile


Okay, here is my setup:
https://www.dropbox.com/s/7f8rlrr2v44yi0u/CEdev%20Setup.zip?dl=0

I just did a clean install of the toolchain (since I didn't really have it installed before) and installed the libraries like it says.
Did you even look at the library header files before you put them in the folder? Wink Looks like you just copied the html code or something from github. All you have to do is go here: https://github.com/CE-Programming/libraries and click on 'Download ZIP'.

BTW, right click and 'Save Link As...' saves the html code, not the file Wink
MateoConLechuga wrote:
Did you even look at the library header files before you put them in the folder? Wink Looks like you just copied the html code or something from github. All you have to do is go here: https://github.com/CE-Programming/libraries and click on 'Download ZIP'.

BTW, right click and 'Save Link As...' saves the html code, not the file Wink


Okay, that was it. Like I said. Stupid mistake. From now on, I'll just download the zip instead of trying to download them individually. It works just fine now, thanks!
tice.h should include the headers it needs to compile. I had #include <tice.h> and I got errors in it, so I had to #include <stdbool.h> #include <stddef.h> #include <stdint.h>.
Can you tell us more about what's new with the new version of the SDK, Mateo? My question is to specifically determine in what way SC3's use of the SDK should be updated, since it has a custom Makeflle (and therefore wouldn't be affected by a change that is just an updated Makefile). I probably should also update to the new, better-encapsulated libraries for SC3's users.
KermMartian wrote:
Can you tell us more about what's new with the new version of the SDK, Mateo? My question is to specifically determine in what way SC3's use of the SDK should be updated, since it has a custom Makeflle (and therefore wouldn't be affected by a change that is just an updated Makefile). I probably should also update to the new, better-encapsulated libraries for SC3's users.

I believe I detailed the list of changes on the above forum post, and in the commit message here. The main thing is that libraries are now not includible just by having the header file present, but also need the 'L := graphc keypadc fileioc' inside of the makefile, or as a make option, in order to compile the libraries in. I believe Adriweb came up with a system to automatically scan the files for the included library headers, and then insert that into the makefile. Let me know if you have any more questions! Smile
Thanks for the explanation, Mateo! Is that code Adriweb open-sourced as part of the SDK, or is that separate? I'm sure I can figure that out with minimal effort myself; I just want to make sure I'm not accidentally wasting everyone's time by replicating open-source work. Smile Thank you so much for continuing to make it easier for people to write C programs for the TI-84 Plus CE.
KermMartian wrote:
Thanks for the explanation, Mateo! Is that code Adriweb open-sourced as part of the SDK, or is that separate? I'm sure I can figure that out with minimal effort myself; I just want to make sure I'm not accidentally wasting everyone's time by replicating open-source work. Smile Thank you so much for continuing to make it easier for people to write C programs for the TI-84 Plus CE.

The server-side part of TI-Planet's Project Builder isn't open-source just yet (it'll be on GitHub) as it still needs to go under some review (at least for security concerns in case I missed some things, for instance).
But what I added is basically just this (which indeed, any programmer can figure out quickly), run on the source files:

Code:
sed -n 's/^#include <lib\/ce\/\([a-zA-Z0-9_]\+\)\.h.*>/\1/p'

Which extracts which lib names are used in the source... Then I call `make` with that as the L parameter.

Edit: with this include way (<lib/ce/graphc.h> instead of just <graphc.h> for instance), it requires the makefile to have the CEDEV folder added to the include paths. But that's just to make it easier for the regexp to catch it. It's still possible to scan more "smartly" but isn't a one-line thing like I did yesterday Very Happy
But I think Mateo agreed having includes as <lib/ce/***.h> isn't a bad idea anyway, so that may be used for next lib versions
You should probably make it so you can have any whitespace after the #include, just be be more flexible.
merthsoft wrote:
You should probably make it so you can have any whitespace after the #include, just be be more flexible.

Sure, why not. \s+ should be good enough I suppose. Thanks for the suggestion.

Edit: actually, even \s* if we want to handle "#include<lib/ce/foobar.h>", even though that's not very good-looking.
Has anyone encountered the following issues with tice.h? The referenced lines seem fine to me:

Code:
TICE.H (51,45) : ERROR (100) Syntax error
TICE.H (51,50) : WARNING (221) Type defaults to int
TICE.H (160,17) : ERROR (100) Syntax error
From tice.h:
Code:
51: void *memset_fast(void *ptr,int value,size_t num);
160: size_t os_MemChk(void **free);
This is my fault; I forgot to include stdint.h, stddef.h, and stdbool.h in tice.h. Adding them in at the top should be fine for now while I tidy a few things up Smile
Thanks, Mateo! You're the best; I appreciate the fast, helpful response. Also, that reminds me that I should remove those includes from SC3's C program template, and list the available libraries as well.

Edit: It feels like there needs to be a version of ti84pce.inc included somewhere, and grepping the toolchain, I find no references to things like penRow:
Code:
main.src (278) : ERROR (405) Label "curCol" not defined
main.src (280) : ERROR (405) Label "curRow" not defined
main.src (281) : ERROR (405) Label "_PutS" not defined
main.src (317) : ERROR (405) Label "penCol" not defined
main.src (319) : ERROR (405) Label "penRow" not defined
main.src (320) : ERROR (405) Label "textFlags" not defined
main.src (320) : ERROR (405) Label "textInverse" not defined
main.src (321) : ERROR (405) Label "_VPutS" not defined
main.src (355) : ERROR (405) Label "_DelRes" not defined
main.src (356) : ERROR (405) Label "_ClrTxtShd" not defined
main.src (357) : ERROR (405) Label "_ClrScrn" not defined
main.src (358) : ERROR (405) Label "graphFlags" not defined
main.src (358) : ERROR (405) Label "graphDraw" not defined
main.src (359) : ERROR (405) Label "_HomeUp" not defined
main.src (360) : ERROR (405) Label "_DrawStatusBar" not defined
Thanks in advance for any thoughts. Smile
Oh, that's because that's an outdated example you are trying to compile. The new demo_0 should have what you need Smile
Hey Mateo, what would be the best way to save some settings? An AppVar? Or is writeback possible?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, 4, 5 ... 15, 16, 17  Next
» View previous topic :: View next topic  
Page 4 of 17
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement