From: openocd-gerrit <ope...@us...> - 2023-01-15 14:47:58
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 0c28006cf2cf2d98ba2d73a73bf629e781f4ffb8 (commit) from 95603fae18f81eebdafc5b318e70f9e2cdefab9e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0c28006cf2cf2d98ba2d73a73bf629e781f4ffb8 Author: Kyle Schwarz <ze...@gm...> Date: Sun Jul 10 15:58:14 2022 -0400 flash/nor/avrf: add ATmega32U4 support Add new chip info and tcl target Change-Id: Ib9d33d1b145a8659857b7a6cc9c5acba047f41d1 Signed-off-by: Kyle Schwarz <ze...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/7081 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/avrf.c b/src/flash/nor/avrf.c index 0e2e263ce..1d317a10c 100644 --- a/src/flash/nor/avrf.c +++ b/src/flash/nor/avrf.c @@ -64,6 +64,7 @@ static const struct avrf_type avft_chips_info[] = { {"atmega324pa", 0x9511, 128, 256, 4, 256}, {"atmega644p", 0x960a, 256, 256, 8, 256}, {"atmega1284p", 0x9705, 256, 512, 8, 512}, + {"atmega32u4", 0x9587, 128, 256, 4, 256}, }; /* avr program functions */ diff --git a/tcl/target/atmega32u4.cfg b/tcl/target/atmega32u4.cfg new file mode 100644 index 000000000..9199c741e --- /dev/null +++ b/tcl/target/atmega32u4.cfg @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# ATmega32U4 + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME avr +} + +if { [info exists ENDIAN] } { + set _ENDIAN $ENDIAN +} else { + set _ENDIAN little +} + +if { [info exists CPUTAPID] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x4958703f +} + +adapter speed 4500 + +jtag newtap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID + +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME avr -endian $_ENDIAN -chain-position $_TARGETNAME + +set _FLASHNAME $_CHIPNAME.flash +flash bank $_FLASHNAME avr 0 0 0 0 $_TARGETNAME ----------------------------------------------------------------------- Summary of changes: src/flash/nor/avrf.c | 1 + tcl/target/{atmega128rfa1.cfg => atmega32u4.cfg} | 26 +++++++++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) copy tcl/target/{atmega128rfa1.cfg => atmega32u4.cfg} (53%) hooks/post-receive -- Main OpenOCD repository |