Don Wooton to disable wactdog timer, add to your code pragmas #pragma config 
WDT = OFF

El 28 de abril de 2016 11:06:03 GMT-05:00, 
sdcc-user-requ...@lists.sourceforge.net escribió:
>Send Sdcc-user mailing list submissions to
>       sdcc-user@lists.sourceforge.net
>
>To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.sourceforge.net/lists/listinfo/sdcc-user
>or, via email, send a message with subject or body 'help' to
>       sdcc-user-requ...@lists.sourceforge.net
>
>You can reach the person managing the list at
>       sdcc-user-ow...@lists.sourceforge.net
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Sdcc-user digest..."
>
>
>Today's Topics:
>
>   1. Re: disable watchdog (Don Wooton)
>   2. Re: [MASSMAIL]Re:  disable watchdog (Yordan)
>   3. Interrupts on Z80 and Z180 (Philipp Klaus Krause)
>   4. Re: Interrupts on Z80 and Z180 (Philipp Klaus Krause)
>   5. Re: Interrupts on Z80 and Z180 (Alan Cox)
>   6. Re: Interrupts on Z80 and Z180 (Philipp Klaus Krause)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Fri, 22 Apr 2016 17:12:17 -0400
>From: Don Wooton <dtwoo...@gmail.com>
>Subject: Re: [Sdcc-user] disable watchdog
>To: sdcc-user@lists.sourceforge.net
>Message-ID: <20160422211217.gc20...@snuggle.org>
>Content-Type: text/plain; charset=us-ascii
>
>Notice /usr/local/share/sdcc/non-free/include/pic14/pic16f818.h
>
>#include <pic16f818.h>
>
>
>sdcc -mpic14 -p16f818 --use-non-free foo.c
>
>    - Don
>
>On Apr 22, Yordan propounded certain bytes, to wit:
>> Subject: [Sdcc-user] disable watchdog
>>
>> hi, im new in microcontroller programming, so i need help to disable
>watchdog timer, can anybody tell me how to do it using sdcc?
>> i found this snippet 
>> __code uint16_t __at (_CONFIG1) __configword = _INTRC_OSC_NOCLKOUT &
>_WDTE_OFF & _LVP_OFF;
>> but it results in this error
>> error 20: Undefined identifier '_WDTE_OFF'
>> im working for a pic16f818 mcu and im using 
>> SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.2
># (Apr 19 2016) (Linux)
>> thanks
>> 
>>
>------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications
>Manager
>> Applications Manager provides deep performance insights into multiple
>tiers of
>> your business applications. It resolves application problems quickly
>and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> Sdcc-user mailing list
>> Sdcc-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>>-- End of excerpt from Yordan'
>
>
>
>------------------------------
>
>Message: 2
>Date: Mon, 25 Apr 2016 19:02:06 -0400
>From: Yordan <yattana...@uci.cu>
>Subject: Re: [Sdcc-user] [MASSMAIL]Re:  disable watchdog
>To: sdcc-user@lists.sourceforge.net
>Message-ID: <571ea1ee.7090...@uci.cu>
>Content-Type: text/plain; charset=windows-1252; format=flowed
>
>thanks!! i solve the problem, the other part of the solution was in
>sdcc 
>man in section 4.5.4 configuration bits
>
>On 04/22/2016 05:12 PM, Don Wooton wrote:
>> Notice /usr/local/share/sdcc/non-free/include/pic14/pic16f818.h
>>
>> #include <pic16f818.h>
>>
>>
>> sdcc -mpic14 -p16f818 --use-non-free foo.c
>>
>>      - Don
>>
>> On Apr 22, Yordan propounded certain bytes, to wit:
>>> Subject: [Sdcc-user] disable watchdog
>>>
>>> hi, im new in microcontroller programming, so i need help to disable
>watchdog timer, can anybody tell me how to do it using sdcc?
>>> i found this snippet
>>> __code uint16_t __at (_CONFIG1) __configword = _INTRC_OSC_NOCLKOUT &
>_WDTE_OFF & _LVP_OFF;
>>> but it results in this error
>>> error 20: Undefined identifier '_WDTE_OFF'
>>> im working for a pic16f818 mcu and im using
>>> SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.2
># (Apr 19 2016) (Linux)
>>> thanks
>>>
>>>
>------------------------------------------------------------------------------
>>> Find and fix application performance issues faster with Applications
>Manager
>>> Applications Manager provides deep performance insights into
>multiple tiers of
>>> your business applications. It resolves application problems quickly
>and
>>> reduces your MTTR. Get your free trial!
>>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>> _______________________________________________
>>> Sdcc-user mailing list
>>> Sdcc-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>>> -- End of excerpt from Yordan'
>>
>------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications
>Manager
>> Applications Manager provides deep performance insights into multiple
>tiers of
>> your business applications. It resolves application problems quickly
>and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> Sdcc-user mailing list
>> Sdcc-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
>La UCI presente este 1ro. de Mayo en la Plaza de la Revoluci??n
>junto a todo el pueblo.??Por Cuba: Unidad y Compromiso!
>
>
>
>------------------------------
>
>Message: 3
>Date: Thu, 28 Apr 2016 14:31:47 +0200
>From: Philipp Klaus Krause <p...@spth.de>
>Subject: [Sdcc-user] Interrupts on Z80 and Z180
>To: Sdcc-User <sdcc-user@lists.sourceforge.net>
>Message-ID: <572202b3.7050...@spth.de>
>Content-Type: text/plain; charset="utf-8"
>
>I had a look at bug reports https://sourceforge.net/p/sdcc/bugs/2131/
>and https://sourceforge.net/p/sdcc/bugs/2339/ and section "3.8.4 Z80
>Interrupt Service Routines" in the manual.
>
>According to the manual, we have:
>1) non-interruptible isr (can be interrupted by nmi only):
>void i1(void) __interrupt
>2) interruptible isr (can be interrupted by any interupt)
>void i2(void) __critical __interrupt(0)
>3) nmi handler (can be interrupted by nmi only)
>void i3(void) __critical __interrupt
>
>We generate code:
>1)
>save regs
>...
>restore regs
>reti
>2)
>di
>save regs
>...
>restore regs
>ei
>reti
>3)
>save regs
>...
>restore regs
>retn
>
>Out of these, 3) looks correct to me. But 1) fails to reenable
>interrupts at the end (I think there should be an ei before the reti).
>And 2) is completly wrong, I think it should be:
>ei
>save regs
>...
>restore regs
>reti
>
>Did I miss something?
>
>Philipp
>(who so far always wrote his interrupt handlers in asm instead of using
>the SDCC-provided facilities)
>
>
>-------------- next part --------------
>A non-text attachment was scrubbed...
>Name: signature.asc
>Type: application/pgp-signature
>Size: 181 bytes
>Desc: OpenPGP digital signature
>
>------------------------------
>
>Message: 4
>Date: Thu, 28 Apr 2016 14:55:45 +0200
>From: Philipp Klaus Krause <p...@spth.de>
>Subject: Re: [Sdcc-user] Interrupts on Z80 and Z180
>To: sdcc-user@lists.sourceforge.net
>Message-ID: <57220851.7050...@spth.de>
>Content-Type: text/plain; charset="windows-1252"
>
>On 28.04.2016 14:31, Philipp Klaus Krause wrote:
>> I had a look at bug reports https://sourceforge.net/p/sdcc/bugs/2131/
>> and https://sourceforge.net/p/sdcc/bugs/2339/ and section "3.8.4 Z80
>> Interrupt Service Routines" in the manual.
>> 
>> According to the manual, we have:
>> 1) non-interruptible isr (can be interrupted by nmi only):
>> void i1(void) __interrupt
>> 2) interruptible isr (can be interrupted by any interupt)
>> void i2(void) __critical __interrupt(0)
>> 3) nmi handler (can be interrupted by nmi only)
>> void i3(void) __critical __interrupt
>
>Also, I think that the syntax for 1) and 2) should be swapped. It seems
>vcounter-intuitive that the one with __critical can be interrupted, but
>not the one without.
>
>Philipp
>
>
>-------------- next part --------------
>A non-text attachment was scrubbed...
>Name: signature.asc
>Type: application/pgp-signature
>Size: 181 bytes
>Desc: OpenPGP digital signature
>
>------------------------------
>
>Message: 5
>Date: Thu, 28 Apr 2016 15:04:56 +0100
>From: Alan Cox <a...@lxorguk.ukuu.org.uk>
>Subject: Re: [Sdcc-user] Interrupts on Z80 and Z180
>To: Philipp Klaus Krause <p...@spth.de>
>Cc: Sdcc-User <sdcc-user@lists.sourceforge.net>
>Message-ID: <20160428150456.6d288...@www.etchedpixels.co.uk>
>Content-Type: text/plain; charset=US-ASCII
>
>> We generate code:
>> 1)
>> save regs
>> ...
>> restore regs
>> reti
>> 2)
>> di
>> save regs
>> ...
>> restore regs
>> ei
>> reti
>> 3)
>> save regs
>> ...
>> restore regs
>> retn
>> 
>> Out of these, 3) looks correct to me. But 1) fails to reenable
>> interrupts at the end (I think there should be an ei before the
>reti).
>> And 2) is completly wrong, I think it should be:
>> ei
>> save regs
>> ...
>> restore regs
>> reti
>> 
>> Did I miss something?
>
>When I looked at this ages ago I came to the same conclusion but never
>worried about it as I couldn't use those methods anyway because I
>needed
>to be able to save/restore interrupt state.
>
>Of the others
>
>Your changes to #1 are IMHO correct
>You can't implement #2 on a Z80 this way
>#3 appears to be correct (as far as it goes for Z80)
>
>For the #2 case you can't do the ei because on many platforms (eg MSX)
>you'll immediately take another interrupt and execute nothing but
>
>ei
>push af
>irq entry
>ei
>push af
>irq entry
>
>until you crash.
>
>The #1 case is only safe because the ei takes effect the instruction
>after (ie after the reti), a detail quite a few emulators get wrong
>
>The general case of a Z80 interrupt handler that can be re-entered is
>
>
>irq_entry:
>       push stuff
>       save state from interrupting device
>       ack interrupt source on priority aware controller
>       ei
>       process state from device
>       pop stuff
>       ret
>
>In some situations you even end up having to do stuff like
>
>irq_entry:
>       push stuff
>       save state from interrupting device
>       push dummy_ret
>       ei
>       reti            ; acks the IRQ returns to the next instr
>dummy_ret:
>       process state from device
>       pop stuff
>       ret
>
>Neither of those can be expressed in a function entry annotation
>
>
>Z180 is different again because you've got multiple IRQ sources and
>something resembling onboard interrupt controllers.
>
>Alan
>
>
>
>------------------------------
>
>Message: 6
>Date: Thu, 28 Apr 2016 18:05:43 +0200
>From: Philipp Klaus Krause <p...@spth.de>
>Subject: Re: [Sdcc-user] Interrupts on Z80 and Z180
>To: sdcc-user@lists.sourceforge.net
>Message-ID: <572234d7.2070...@spth.de>
>Content-Type: text/plain; charset="windows-1252"
>
>On 28.04.2016 16:04, Alan Cox wrote:
>> 
>> For the #2 case you can't do the ei because on many platforms (eg
>MSX)
>> you'll immediately take another interrupt and execute nothing but
>> 
>> ei
>> push af
>> irq entry
>> ei
>> push af
>> irq entry
>> 
>> until you crash.
>
>Ah, yes. Level-triggered interrupts. So I guess I'll just drop support
>for 2) for the z80 and z180 backends.
>We can keep it for the tlcs90, r2k and r3ka, which use edge-triggered
>interrupts. Anyone know about gbz80?
>
>Philipp
>
>
>-------------- next part --------------
>A non-text attachment was scrubbed...
>Name: signature.asc
>Type: application/pgp-signature
>Size: 181 bytes
>Desc: OpenPGP digital signature
>
>------------------------------
>
>------------------------------------------------------------------------------
>Find and fix application performance issues faster with Applications
>Manager
>Applications Manager provides deep performance insights into multiple
>tiers of
>your business applications. It resolves application problems quickly
>and
>reduces your MTTR. Get your free trial!
>https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>
>------------------------------
>
>_______________________________________________
>Sdcc-user mailing list
>Sdcc-user@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
>
>End of Sdcc-user Digest, Vol 116, Issue 9
>*****************************************

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to