Skip to content

Commit

Permalink
target: Rename at32fxx_probe and move the call before lpc40xx_probe
Browse files Browse the repository at this point in the history
* lpc40xx_probe performs IAP calls specific to lpc40xx
  which crashes at32f435 targets.

* Rename to at32f40x_probe (the stm32f1-compatible flash ones)
  • Loading branch information
ALTracer authored and dragonmux committed Oct 29, 2023
1 parent 1f21e3c commit dead511
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/target/cortexm.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,9 @@ bool cortexm_probe(adiv5_access_port_s *ap)
*/
PROBE(lpc546xx_probe);
PROBE(lpc43xx_probe);
PROBE(at32f40x_probe);
PROBE(lpc40xx_probe);
PROBE(kinetis_probe); /* Older K-series */
PROBE(at32fxx_probe);
PROBE(msp432e4_probe);
} else if (t->part_id == 0x4cbU) { /* Cortex-M23 ROM */
PROBE(gd32f1_probe); /* GD32E23x uses GD32F1 peripherals */
Expand Down
4 changes: 2 additions & 2 deletions src/target/stm32f1.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ static bool at32f43_detect(target_s *target, const uint16_t part_id)
return true;
}

/* Identify AT32F4x devices (Cortex-M4) */
bool at32fxx_probe(target_s *target)
/* Identify AT32F40x "Mainstream" line devices (Cortex-M4) */
bool at32f40x_probe(target_s *target)
{
// Artery clones use Cortex M4 cores
if ((target->cpuid & CORTEX_CPUID_PARTNO_MASK) != CORTEX_M4)
Expand Down
4 changes: 2 additions & 2 deletions src/target/target_probe.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ bool efm32_aap_probe(adiv5_access_port_s *ap);
bool rp_rescue_probe(adiv5_access_port_s *ap);
bool lpc55_dmap_probe(adiv5_access_port_s *ap);

bool ch32f1_probe(target_s *target); // will catch all the clones
bool at32fxx_probe(target_s *target); // STM32 clones from Artery
bool ch32f1_probe(target_s *target); // will catch all the clones
bool at32f40x_probe(target_s *target); // STM32 clones from Artery
bool mm32l0xx_probe(target_s *target);
bool mm32f3xx_probe(target_s *target);
bool gd32f1_probe(target_s *target);
Expand Down

0 comments on commit dead511

Please sign in to comment.