diff options
author | James Bowman <james.bowman@ftdichip.com> | 2017-09-29 01:01:52 +0000 |
---|---|---|
committer | James Bowman <jamesbowman@gcc.gnu.org> | 2017-09-29 01:01:52 +0000 |
commit | db6601d2b6e471598716ec7ab88a780bd4676933 (patch) | |
tree | 9e7b77c2ae304f82d9304a8aebd54139727e53a1 /libgcc | |
parent | 8da872d9cad373d8e74a75fddf79b36b8b924b38 (diff) | |
download | gcc-db6601d2b6e471598716ec7ab88a780bd4676933.zip gcc-db6601d2b6e471598716ec7ab88a780bd4676933.tar.gz gcc-db6601d2b6e471598716ec7ab88a780bd4676933.tar.bz2 |
crti-hw.S: Add watchdog vector, FT930 IRQ support.
libgcc/
* config/ft32/crti-hw.S: Add watchdog vector, FT930
IRQ support.
From-SVN: r253276
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 4 | ||||
-rw-r--r-- | libgcc/config/ft32/crti-hw.S | 28 |
2 files changed, 21 insertions, 11 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 6840147..7b1ffb1 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2017-09-28 James Bowman <james.bowman@ftdichip.com> + + * config/ft32/crti-hw.S: Add watchdog vector, FT930 IRQ support. + 2017-09-26 Joseph Myers <joseph@codesourcery.com> * config/microblaze/crti.S, config/microblaze/crtn.S, diff --git a/libgcc/config/ft32/crti-hw.S b/libgcc/config/ft32/crti-hw.S index c2951fc..8ee1d38 100644 --- a/libgcc/config/ft32/crti-hw.S +++ b/libgcc/config/ft32/crti-hw.S @@ -1,8 +1,8 @@ .global _start _start: # START Interrupt Vector Table [[ - jmp __PMSIZE-4 - jmp watchdog_init + jmp __PMSIZE-4 # RESET Vector + jmp interrupt_33 # Watchdog reset vector jmp interrupt_0 jmp interrupt_1 jmp interrupt_2 @@ -35,24 +35,29 @@ _start: jmp interrupt_29 jmp interrupt_30 jmp interrupt_31 - jmp __PMSIZE-8 + jmp __PMSIZE-8 # Interrupt vector 32 (NMI) # ]] END Interrupt Vector Table codestart: jmp init - + .global _exithook _exithook: # Debugger uses '_exithook' at 0x90 to catch program exit return - -watchdog_init: - ldk $r0,1 + init: ldk $sp,__RAMSIZE # Disable all interrupts - ldk $r4,0x80 - sta.b 0x100e3,$r4 - + lda $r1,0x10000 + lshr $r1,$r1,20 + cmp $r1,0x90 + ldk $r1,0x100e3 # FT900 IRQ Control Register + jmpc z,1f + ldk $r1,0x10123 # FT930 IRQ Control Register +1: + ldk $r4,0x80 + sti.b $r1,0,$r4 + # Initialize DATA by copying from program memory ldk.l $r4,__data_load_start ldk.l $r1,__data_load_end @@ -139,6 +144,7 @@ interrupt_\i: inth 30 inth 31 inth 32 + inth 33 # On entry: r0, already saved, holds the handler function interrupt_common: @@ -182,7 +188,7 @@ nullvector: .section .data .global vector_table vector_table: - .rept 33 + .rept 34 .long nullvector .endr |