diff options
| author | Ha Thach <[email protected]> | 2026-08-29 02:41:13 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-08-29 02:41:13 +0700 |
| commit | 84dcec43c709643f8a1b1ebbab6d08fbbc605a6d (patch) | |
| tree | 05565867d9879316cc6127c092e439f018ecbdaf /hw/bsp/rp2040/boards/raspberry_pi_pico2 | |
| parent | 64d952c027df194ea8b107b3d5d0b6c4cb9a994b (diff) | |
| parent | f7eb812679598aecc1d7702264ba48e6c178d5da (diff) | |
rp2350: ETM trace board pico2_etm_trace
Diffstat (limited to 'hw/bsp/rp2040/boards/raspberry_pi_pico2')
| -rw-r--r-- | hw/bsp/rp2040/boards/raspberry_pi_pico2/board.cmake | 14 | ||||
| -rw-r--r-- | hw/bsp/rp2040/boards/raspberry_pi_pico2/ozone/rp2350.jdebug | 70 |
2 files changed, 0 insertions, 84 deletions
diff --git a/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.cmake b/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.cmake index 08384b0cd..0a7dd4d23 100644 --- a/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.cmake +++ b/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.cmake @@ -1,17 +1,3 @@ set(PICO_PLATFORM rp2350-arm-s) set(PICO_BOARD pico2) #set(OPENOCD_SERIAL E6614103E77C5A24) - -if (TRACE_ETM STREQUAL "1") - # TRACECLK is clk_sys/2 and must stay constant once trace is armed (a step - # desyncs the decoder), so the trace clock is pinned from crt0 onwards. - # 48 MHz (24 MHz TRACECLK) holds full-width trace on a typical fly-wire - # seating; a fresh, tight seating supports up to 72-80 MHz (re-qualify per - # the etm-trace skill), and >80 MHz needs a V3 probe + real trace board. - add_compile_definitions( - SYS_CLK_KHZ=48000 - PLL_SYS_VCO_FREQ_HZ=1440000000 - PLL_SYS_POSTDIV1=6 - PLL_SYS_POSTDIV2=5 - ) -endif () diff --git a/hw/bsp/rp2040/boards/raspberry_pi_pico2/ozone/rp2350.jdebug b/hw/bsp/rp2040/boards/raspberry_pi_pico2/ozone/rp2350.jdebug deleted file mode 100644 index ff48eb673..000000000 --- a/hw/bsp/rp2040/boards/raspberry_pi_pico2/ozone/rp2350.jdebug +++ /dev/null @@ -1,70 +0,0 @@ -/********************************************************************* -* -* OnProjectLoad -* -* Function description -* Project load routine. Required. -* -* Notes -* Pico 2 has no trace connector - fly-wire GPIO1-5 to the MIPI20: -* TRACECLK=GPIO1->12, D0=GPIO2->14, D1=GPIO3->16, D2=GPIO4->18, -* D3=GPIO5->20 (SEGGER validates this board the same way). Firmware must -* be built with TRACE_ETM=1: it pins clk_sys to 48 MHz (board.cmake) so -* the 4-bit port never saturates and the clock never steps mid-stream, -* and keeps the us-timer free of TIMER DBGPAUSE (family.c). The whole -* chip-side trace path (ETM/funnel/TPIU/pin mux) is armed by J-Link's -* built-in RP2350 script at every resume - do NOT set a custom -* JLinkScript here: it would replace that script and J-Link then fails -* with "Required trace components for pin trace not found". -* GPIO1 is the default UART0 RX: console TX still works, RX is lost. -* -********************************************************************** -*/ -void OnProjectLoad (void) { - Project.SetTraceSource ("Trace Pins"); - Project.SetTracePortWidth (4); - Project.SetSWO (0); - Edit.SysVar (VAR_TRACE_CORE_CLOCK, 48000000); - Project.AddSvdFile ("$(InstallDir)/Config/CPU/Cortex-M33F.svd"); - - Project.SetDevice ("RP2350_M33_0"); - Project.SetHostIF ("USB", ""); - Project.SetTargetIF ("SWD"); - Project.SetTIFSpeed ("25 MHz"); - - File.Open ("../../../../../../examples/cmake-build-raspberry_pi_pico2/device/cdc_msc/cdc_msc.elf"); -} - -/********************************************************************* -* -* AfterTargetReset -* -* Function description -* Event handler routine. -* - Sets the PC register to program reset value. -* - Sets the SP register to program reset value on Cortex-M. -* -********************************************************************** -*/ -void AfterTargetReset (void) { - // intentionally empty: the RP2350 bootrom must run to validate the - // IMAGE_DEF and hand over to the app - setting SP/PC from the vector - // table bypasses it and the pico-sdk runtime never comes up -} - -/********************************************************************* -* -* AfterTargetDownload -* -* Function description -* Event handler routine. -* - Sets the PC register to program reset value. -* - Sets the SP register to program reset value on Cortex-M. -* -********************************************************************** -*/ -void AfterTargetDownload (void) { - // intentionally empty: the RP2350 bootrom must run to validate the - // IMAGE_DEF and hand over to the app - setting SP/PC from the vector - // table bypasses it and the pico-sdk runtime never comes up -} |
