User Tools

Site Tools


mios_c_simulator_-_debugger

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
mios_c_simulator_-_debugger [2007/01/17 12:55]
stryd_one
mios_c_simulator_-_debugger [2007/10/26 14:49]
audiocommander added note about SCM
Line 1: Line 1:
 AC-Sim: AudioCommander'​s Simulator for MIOS Applications. This has been named after it's creator but hopefully all MIDIBoxers will feel free to contribute to and share their code. AC-Sim: AudioCommander'​s Simulator for MIOS Applications. This has been named after it's creator but hopefully all MIDIBoxers will feel free to contribute to and share their code.
 +
 +Please see [[mios_c_simulator_-_debugger#​Release_and_Developer_Notes]] for version info.\\
 +If you add something make sure, you note it here, otherwise your submissions might get overwritten!
  
  
Line 18: Line 21:
  
 \\ \\
- 
- 
  
 ====== Overview ====== ====== Overview ======
Line 25: Line 26:
  
 ^ Source ^ Contents ^ Notes ^ ^ Source ^ Contents ^ Notes ^
-| **ACSim_console** | | Adaption required! |+| **ACSim_console** ​(Console based input, main runloop) | | Adaption required! |
 | [[acsim_console_h|ACSim_console.h]] | Hardware related defines | Change #defines to reflect your settings | | [[acsim_console_h|ACSim_console.h]] | Hardware related defines | Change #defines to reflect your settings |
 | [[acsim_console_c|ACSim_console.c]] | Main runloop | Add additional c. source-files here | | [[acsim_console_c|ACSim_console.c]] | Main runloop | Add additional c. source-files here |
-| **ACSim_toolbox** | | //No changes required//​ | +| **ACSim_mios** ​(MIOS Emulation) | | //No changes required//​ |
-| [[acsim_toolbox_h|ACSim_toolbox.h]] | Hexview config | //No changes required//​ | +
-| [[acsim_toolbox_c|ACSim_toolbox.c]] | Helpers like random generators and hex-view ​    | //No changes required//​ | +
-| **ACSim_mios** | | //No changes required//​ |+
 | [[acsim_mios_h|ACSim_mios.h]] | pic18f452.h typedefs and global vars | //No changes required//​ | | [[acsim_mios_h|ACSim_mios.h]] | pic18f452.h typedefs and global vars | //No changes required//​ |
 | [[acsim_mios_c|ACSim_mios.c]] | MIOS functions for simulation | //No changes required//​ | | [[acsim_mios_c|ACSim_mios.c]] | MIOS functions for simulation | //No changes required//​ |
 +| **ACSim_tools** (Tools & Helpers) | | //No changes required//​ |
 +| [[acsim_toolbox_h|ACSim_toolbox.h]] | Hexview config | //No changes required//​ |
 +| [[acsim_toolbox_c|ACSim_toolbox.c]] | Helpers like random generators and hex-view ​    | //No changes required//​ |
 +| [[acmididefines|ACMidiDefines.h]] ​ | Midi Defintion listing ​ | //No changes required// ​ |
  
 +You can download the files in a {{acsim.zip|.zip file here}}. If you make any updates, please send them to sstryd_one and he will update the zip for you.
 +
 +
 +<box 75% left bluelight|SCM Code News>I created a SCM page for ACSim, but as the current SCM-implementation of Xcode is quite lousy, I will wait for the Leopard version to complete this step. That means the next update 0.0.8 will follow in the near future and will contain some major changes. I am happy for anyone joining the dev team! 
 +http://​code.google.com/​p/​acsim/ ​
 +//​audiocommander 2007/10/26 09:39//
 +</​box>​
 +
 +----
 +\\
  
 To implement the ACSim files into your applicaton, you just have to follow the [[mios_c_simulator_-_debugger#​setup_guide|setup guide]] to: To implement the ACSim files into your applicaton, you just have to follow the [[mios_c_simulator_-_debugger#​setup_guide|setup guide]] to:
Line 51: Line 63:
   * MIOS_Init()   * MIOS_Init()
   * MIOS_LCD_Init()   * MIOS_LCD_Init()
-  * MIOS_Timer() is polled each runloop()+  ​* MIOS_Tick() is polled each runloop() 
 +  ​* MIOS_Timer() is polled each runloop() ​when a timer has been set
  
 For detailed step-by-step instructions see //Setup Guide// below! For detailed step-by-step instructions see //Setup Guide// below!
Line 68: Line 81:
     *(**e**)ncoder(**++**)/​(**- - -**)     *(**e**)ncoder(**++**)/​(**- - -**)
     *(**a**)(//​pin,​value//​)     *(**a**)(//​pin,​value//​)
 +    *(**b**)yte(//​system realtime number//)
     *(**j**)umper(//​pin//​)     *(**j**)umper(//​pin//​)
     *(**p**)rogramChange(//​PRG,​{store}//​)     *(**p**)rogramChange(//​PRG,​{store}//​)
Line 85: Line 99:
   * Type "​m176,​20,​100"​ to send a Midi Controller Change #20 on CH1 (176) with a value of 100 -> calls MPROC_NotifyReceivedEvent   * Type "​m176,​20,​100"​ to send a Midi Controller Change #20 on CH1 (176) with a value of 100 -> calls MPROC_NotifyReceivedEvent
   * Type "​m192,​10"​ to send a Program Change request for PRG 10 -> calls MPROC_NotifyReceivedEvent(..)   * Type "​m192,​10"​ to send a Program Change request for PRG 10 -> calls MPROC_NotifyReceivedEvent(..)
 +  * Type "​b248"​ to send a single System Realtime byte (248 is MIDI_CLOCK)
  
  
 \\ \\
 +
 +
  
  
Line 95: Line 112:
  
 [[how_to_use_xcode2_as_ide_on_a_mac|Setup Guide for XCode on Mac]]\\ [[how_to_use_xcode2_as_ide_on_a_mac|Setup Guide for XCode on Mac]]\\
-[[stryd_one_codeblocks|Setup Guide for Code::​Blocks ​on PC]]\\+[[windows_toolchain_codeblocks|Extend your toolchain with Code::​Blocks ​and GDB]] (Don't forget [[windows_toolchain_core|Part 1]][[windows_toolchain_asm_acsim| & 2]]!)\\
  
 [[application_development|General Development Info]] [[application_development|General Development Info]]
Line 102: Line 119:
 \\ \\
 \\ \\
-Then proceed by configuring your main.and main.files:+Then proceed by configuring your main.c, and .files:
  
-\\ 
-== main.h == 
-  * you need to add some lines at the bottom of your main.h (or, if you don't have one, main.c )  - this is because debug_mios.c calls "​DISPLAY_Init()"​ as MIOS would. Because of the #ifdef statement this does not change your syx-project code! 
- 
-<code c> 
-#ifdef _DEBUG_C 
-  // export functions that are called from within debug_mios.c ​ 
-  // (e.g. to trigger DISPLAY_Init after sending...) 
-  extern void DISPLAY_Init(void);​ 
-#endif 
-</​code>​ 
- 
-\\ 
 == main.c == == main.c ==
  
-Minor modifications are required to your MIOS Application'​s main.c ​and main.h files.+Minor modifications are required to your MIOS Application'​s main.c ​file.
  
-  * You need to add some lines at the top of your main.c - this is to avoid including headers for the PIC/MIOS Core module, when compiling a console app for debugging. Because of the #ifndef statement this does not change your syx-project code, so your app will compile as normal for the PIC!+  * You need to edit some lines at the top of your main.c - this is to avoid including headers for the PIC/MIOS Core module, when compiling a console app for debugging. Because of the #ifndef statement this does not change your syx-project code, so your app will compile as normal for the PIC!
  
 Before: Before:
Line 136: Line 140:
 #endif #endif
 </​code>​ </​code>​
 +
 +== main.h ==
 +
 +  * you need to add some lines at the bottom of your main.h, or, if you don't have one, main.c - this is because debug_mios.c calls "​DISPLAY_Init()"​ as MIOS would. Because of the #ifdef statement this does not change your syx-project code!
 +
 +<code c>
 +#ifdef _DEBUG_C
 +  // export functions that are called from within debug_mios.c ​
 +  // (e.g. to trigger DISPLAY_Init after sending...)
 +  extern void DISPLAY_Init(void);​
 +#endif
 +</​code>​
 +
 +\\
 +
  
 \\ \\
 == ACSim_console.h == == ACSim_console.h ==
  
-  * Choose your OS+  * Choose your OS by enusering that only one of these lines is remarked (the one you DON'T want!) 
 +    * //#define _DEBUG_OS_WIN 
 +    * //#define _DEBUG_OS_MAC 
 +    ​
   * Select the LCD-Size   * Select the LCD-Size
   * Set the number of AIN-Lines   * Set the number of AIN-Lines
Line 154: Line 176:
  
 \\ \\
-== ACSim_mios & ACSim_Toolbox ==+== ACSim_mios & ACSim_Toolbox ​incl. ACMidiDefines ​==
  
 These files don't need to be changed, just add them to your project. These files don't need to be changed, just add them to your project.
Line 172: Line 194:
  
 \\ \\
-Update: Updated to v0.0.4now works on MS Windows with GCC (and probably other compilers too) // stryd_one //+Update ​0.0.4now works on MS Windows with GCC (and probably other compilers too) // stryd_one ​// 
 + 
 +Update 0.0.5: splitted code to seperate wiki-documents,​ code cleanup, cleaned namespaces, added MIOS_ICC and MIOS_HLP functions // audiocommander // 
 + 
 +Update 0.0.5-r1: Splitted ACSim_toolbox into header and source // audiocommander ​//
  
-Update: Updated to v0.0.5, splitted code to seperate wiki-documents, code cleanup, cleaned namespaces, added MIOS_ICC and MIOS_HLP functions ​// audiocommander //+Update ​0.0.5-r2: 2007 January 17 improved MIOS_IIC for SpeakJet debugging ​// audiocommander //
  
-Update: ​Splitted ACSim_toolbox into header and source ​// audiocommander //+Update ​0.0.62007 January 21 added MIDI-Merger,​ INTCONbits (MIDI-Clock support) ​// audiocommander //
  
-Update: 2007 January ​17 improved ​MIOS_IIC for SpeakJet debugging ​// audiocommander //+Update ​0.0.7: 2007 January ​26 added MIDI-Debug Messages, ​improved ​Timer() calls, added Tick() calls // audiocommander //
  
 \\ \\
mios_c_simulator_-_debugger.txt · Last modified: 2008/05/21 02:13 by stryd_one