How can I debug my own application using the IDE’S simulation debugger?
Generally:
Is it possible to get the source code of MIOS?
Another question:
In the old software version there were different kind of display modi and cursor button functionality. Have I to program my own behaviour from the scratch or is there a kind of framework, example?
I will publish the source code of MIOS over an official channel (sourceforge.net) when I feel pleasant with the implementation… however, you don’t need the source for debugging, and if any function or relation is unclear, please ask here so that I can documentate it. I’m planning to collect all the questions&answers for the programmers guide.
Debugging - the simplest way: add a “org 0x00000” at the end of main.asm and call the function which should be simulated. Following example helps you to simulate a button event:
org 0x00000
;; (Input parameters: see documentation of the USER_DIN_NotifyToggle function)
movlw 0x00 ;; 0 == button pressed
movwf MIOS_PARAMETER2
movlw 7 ;; button #7
movwf MIOS_PARAMETER1
call USER_DIN_NotifyToggle
EndlessLoop
goto EndlessLoop
END
Since the Input/Output parameters of the hooks are clearly defined in the functions reference, it shouldn’t be a problem to debug in this way.
Framework for menu/cursor buttons: the most enhanced handler can be found in the SID application, the MIOS implementation of the old handler known from the PIC16F based firmware can be found here: http://www.ucapps.de/tmp/mb64seq_snapshot.zip