This is the open source Pawn interpreter ported to mbed. See here: http://www.compuphase.com/pawn/pawn.htm and here: http://code.google.com/p/pawnscript/
Some instructions:
- Put the attached include folder next to your source, so when you compile you get all the proper definitions
- Use the attached main.p as a starting point if you wish
- Compile your main.p into main.amx - Put your main.amx on the mbed 'drive'
- Reset and be amazed.
Important Compile Notes:
- You should use the -S# option to define a smaller default stack size. Start with -S64 and go up from there if needed.
- To use on the Cortex-M0 version of the mbed (LPC11U24), you MUST include the TARGET=3 command-line option as well, so the pin names are properly defined. In the future this may be handled on the native code side.
Known Issues:
At the moment it appears the kbhit() function is not working right - at least on my mac. Will continue testing on Windows.Working fine.
Todo:
- Add more wrappers for the mbed peripherals
- Add Pawn overlay support, to allow much larger scripts to run (even on the LPC11U24)
amxtime.h@3:185fdbb7ccf0, 2013-05-24 (annotated)
- Committer:
- Lobo
- Date:
- Fri May 24 17:49:26 2013 +0000
- Revision:
- 3:185fdbb7ccf0
- Parent:
- 2:01588bd27169
Now includes AnalogIn and AnalogOut functions
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tylerwilson | 2:01588bd27169 | 1 | #ifndef AMXTIME_H_INCLUDED |
tylerwilson | 2:01588bd27169 | 2 | #define AMXTIME_H_INCLUDED |
tylerwilson | 2:01588bd27169 | 3 | |
tylerwilson | 2:01588bd27169 | 4 | // define the public interface to the amxtime module |
tylerwilson | 2:01588bd27169 | 5 | |
tylerwilson | 2:01588bd27169 | 6 | #ifdef __cplusplus |
tylerwilson | 2:01588bd27169 | 7 | extern "C" { |
tylerwilson | 2:01588bd27169 | 8 | #endif |
tylerwilson | 2:01588bd27169 | 9 | |
tylerwilson | 2:01588bd27169 | 10 | int AMXEXPORT AMXAPI amx_TimeInit(AMX *amx); |
tylerwilson | 2:01588bd27169 | 11 | int AMXEXPORT AMXAPI amx_TimeCleanup(AMX *amx); |
tylerwilson | 2:01588bd27169 | 12 | |
tylerwilson | 2:01588bd27169 | 13 | #ifdef __cplusplus |
tylerwilson | 2:01588bd27169 | 14 | } |
tylerwilson | 2:01588bd27169 | 15 | #endif |
tylerwilson | 2:01588bd27169 | 16 | |
tylerwilson | 2:01588bd27169 | 17 | #endif /* AMXTIME_H_INCLUDED */ |