simulat0r
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| simulat0r [2011/08/02 01:01] – [3. Try it out] mh | simulat0r [2011/12/25 02:15] (current) – ray | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Simulat0r ====== | ====== Simulat0r ====== | ||
| {{: | {{: | ||
| + | < | ||
| + | The simulat0r currently does not compile. We hope to push some fixes soon - up to then the easiest way possibly is to check out a git at camp-time... | ||
| + | </ | ||
| <note tip> | <note tip> | ||
| The simulat0r allows you to develop and test applications for the r0ket even without having the actual hardware | The simulat0r allows you to develop and test applications for the r0ket even without having the actual hardware | ||
| Line 10: | Line 13: | ||
| File-IO and possibly even some RF-API-stuff might be added in the future... | File-IO and possibly even some RF-API-stuff might be added in the future... | ||
| + | |||
| + | There are currently two different kinds of software for the r0ket - applications and l0dables. An application runs as main firmware on the r0ket while l0dables can be loaded from within the default firmware. It depends on your project what to choose, but for smaller stuff that many people are supposed to use a l0dable is the better way, for stand-alone stuff (like building the r0ket into your pedelec) an application would be the right thing. | ||
| + | |||
| + | L0dables can also be built as single applications using the " | ||
| ===== 2. Installation ===== | ===== 2. Installation ===== | ||
| Line 17: | Line 24: | ||
| ===== 3. Try it out ===== | ===== 3. Try it out ===== | ||
| - | After installation go to the simulat0r directory and build one of the sample | + | After installation go to the simulat0r directory and build one of the sample |
| < | < | ||
| r0ket/$ cd simulat0r | r0ket/$ cd simulat0r | ||
| - | simulat0r/$ make APP=spaceinvaders | + | simulat0r/$ make APP=l0dable LAPP=nick_plain |
| </ | </ | ||
| If all needed libs are installed, the build should succeed and result in an executable, start it: | If all needed libs are installed, the build should succeed and result in an executable, start it: | ||
| < | < | ||
| - | simulat0r/$ gui/ | + | simulat0r/ |
| </ | </ | ||
| and you should see an X window showing the display and the 4 LEDs in the corners. | and you should see an X window showing the display and the 4 LEDs in the corners. | ||
| + | |||
| + | As you have built the " | ||
| The 5-way button is emulated using the cursor keys+space or 84562 on your number pad. | The 5-way button is emulated using the cursor keys+space or 84562 on your number pad. | ||
| Line 33: | Line 42: | ||
| ===== 4. Start your own project ===== | ===== 4. Start your own project ===== | ||
| - | The easiest way to start your own application | + | The easiest way to start your own l0dable |
| < | < | ||
| - | r0ket/$ cp firmware/applications/spaceinvaders.c firmware/applications/coolapp.c | + | r0ket/$ cp firmware/l0dable/pwgen.c firmware/l0dable/coolapp.c |
| - | r0ket/$ simulat0r/ | + | |
| </ | </ | ||
| + | |||
| + | If you want to build an application instead, do the same in the applications directory. For an application, | ||
| + | |||
| + | < | ||
| + | r0ket/$ cp firmware/ | ||
| + | r0ket/$ vi firmware/ | ||
| + | </ | ||
| + | |||
| + | |||
| ===== 5. Developing ===== | ===== 5. Developing ===== | ||
| - | Now your normal cycle would be to edit the source in r0ket/ | + | Now your normal cycle would be to edit the source in r0ket/ |
| < | < | ||
| - | r0ket/$ cd firmware | + | r0ket/$ cd firmware/l0dable |
| - | firmware/$ make APP=coolapp | + | l0dable/$ make coolapp.c0d |
| </ | </ | ||
| - | to check if everything at least compiles. | + | to check if everything at least compiles. The resulting .c0d must be <2500 bytes to be able to be started in a normal firmware. |
| + | |||
| + | You also should try to build your l0dable as " | ||
| Please always keep in mind: the x86 platform of the simulat0r is much more powerful than the real target device. You have to be very strict in your memory usage and also don't have a full blown C library at your hands. Also not all types are available. | Please always keep in mind: the x86 platform of the simulat0r is much more powerful than the real target device. You have to be very strict in your memory usage and also don't have a full blown C library at your hands. Also not all types are available. | ||
| - | One advantage of this is that you can easily add debug output to stdout/err and even write logfiles from within your simulat0r application. Please put #ifdef SIMULATOR blocks around such code so it doesn' | + | One advantage of this is that you can easily add debug output to stdout/err and even write logfiles from within your simulat0r application. Please put #ifdef SIMULATOR blocks around such code so it doesn' |
| ===== 6. Ideas for projects ===== | ===== 6. Ideas for projects ===== | ||
simulat0r.1312239709.txt.gz · Last modified: by mh
