|Re: [OT?] SDK Capabilities?|
Message #6 Posted by hugh steers on 2 Aug 2010, 10:04 a.m.,
in response to message #5 by Katie Wasserman
further to Katie's description; yes, there appears only limited interface to casio's built in functionality. basically you get the screen & keyboard basics, even then it's a bit limited. For example, i wound up doing my own low-level keymatrix decoding (source of my version bugs) because i wanted to detect low level key down and up and also the shift and alpha keys. Further, for the screen, it's easier to hit the screen memory directly.
however, you might find interesting the way it works: Everything is an app - even the calculator itself. They share a limited amount of data (eg equations for the graphing etc.). So the graphing app is a separate app (ie separate binary). Presumably casio use a common set of libraries for all their apps (eg for calculation) and just link them to each app.
To be clear, im not a big fan of this "modular" approach. it works well when you're following an education curriculum where you're either doing complex numbers, matrices, graphing, but never combinations thereof.
However, there's one really cool aspect of this architecture; each app gets the whole machine! Since you can run only one app at a time, each app can use all the RAM (only 64k). Furthermore, the app executable runs directly from flash and is not copied into RAM nor is it position independent code. I think the Hitachi chip has a built-in simplified MMU that essentially supports a few base registers for code and data (rather than a page table). This approach is also used on the Microchip 32 bit PICs.
It's possible for apps to read and write "files" to flash, so you can save/load programs or data like this. The flash memory is quite generous 1.5MB (i think), so there's lots of space for apps and their code size is not super-critical.
[As an aside here, i think your 30b architecture has the same feature. ie can self-flash. i was toying with the idea of writing a repurposed programmable that saves (and runs) its program from a portion of set-aside flash rather than the built-in RAM. as you know, this might be a way to have much bigger programs than the 2-6k built in, whilst using the true RAM for workspace (arrays, strings etc.). would be interested in your view on this]
regarding the SDK, this is really quite good. casio give away a free version of the Hitachi Renesas tool chain (superH) which is a C++ compiler, IDE, debugger and simulator (on the PC). the C++ works well. i've had no problems with it, although i haven't tried giving it template hell :-)
1. No, they're just new apps
2. only screen, keyboard, some IO
3. most of Clib, plus a few extra bits.
4. Yes, when you run you're the OS! when you "exit" it causes a trap which soft-resets the machine back to the main menu.