Skip to content

Commit

Permalink
tcl: add target XinChips XC610/XC620
Browse files Browse the repository at this point in the history
This is a cortex-M0, with bluetooth, found in some strip LED lighting
controllers. (HappyLighting) http://www.xinchip.com/39/10

https://github.com/nulllaborg/xinchip/ contains an arduino port from
which much information can be inferred.

This only provides a config file for debug, no flash support.

Change-Id: I9ba8f7dc41f6a098fcc991bab12be4bc56581804
Signed-off-by: Karl Palsson <karlp@tweak.au>
  • Loading branch information
karlp committed Aug 28, 2023
1 parent f0c72af commit db8923f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tcl/target/xc6x0.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: Apache-2.0 or GPL-2.0-or-later

source [find target/swj-dp.tcl]
source [find mem_helper.tcl]

if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME xc6x0
}

set _ENDIAN little

# 128KB of ram on all known parts, 8K should be safe
if { [info exists WORKAREASIZE] } {
set _WORKAREASIZE $WORKAREASIZE
} else {
set _WORKAREASIZE 0x2000
}

if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
# Arm, m0
set _CPUTAPID 0x0BB11477
}

swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap

$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0

#reset_config srst_nogate

0 comments on commit db8923f

Please sign in to comment.