qn908x.cfg 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # NXP QN908x Cortex-M4F with 128 KiB SRAM
  3. source [find target/swj-dp.tcl]
  4. set CHIPNAME qn908x
  5. set CHIPSERIES qn9080
  6. if { ![info exists WORKAREASIZE] } {
  7. set WORKAREASIZE 0x20000
  8. }
  9. # SWD IDCODE (Cortex M4).
  10. set CPUTAPID 0x2ba01477
  11. swj_newdap $CHIPNAME cpu -irlen 4 -expected-id $CPUTAPID
  12. dap create $CHIPNAME.dap -chain-position $CHIPNAME.cpu
  13. set TARGETNAME $CHIPNAME.cpu
  14. target create $TARGETNAME cortex_m -dap $CHIPNAME.dap
  15. # SRAM is mapped at 0x04000000.
  16. $TARGETNAME configure -work-area-phys 0x04000000 -work-area-size $WORKAREASIZE
  17. # flash bank <name> qn908x <base> <size> 0 0 <target#> [calc_checksum]
  18. # The base must be set as 0x01000000, and the size parameter is unused.
  19. set FLASHNAME $CHIPNAME.flash
  20. flash bank $FLASHNAME qn908x 0x01000000 0 0 0 $TARGETNAME calc_checksum
  21. # We write directly to flash memory over this adapter interface. For debugging
  22. # this could in theory be faster (the Core clock on reset is normally at 32MHz),
  23. # but for flashing 1MHz is more reliable.
  24. adapter speed 1000
  25. # Delay on reset line.
  26. adapter srst delay 200
  27. cortex_m reset_config sysresetreq