# TraxProbe Platform Ports

Hardware abstraction layer for different platforms.

## Available Platforms

| Platform | Description | Target |
|----------|-------------|--------|
| `ARM_Cortex_M` | ARM Cortex-M, all profiles (M0/M0+/M1/M23/M3/M4/M7/M33/M55/M85) | STM32, NXP, Nordic, Silicon Labs, etc. |
| `Zynq` | ARM Cortex-A/R (A9 / A53 / R5), auto-detected | Xilinx Zynq-7000, Zynq UltraScale+ MPSoC |
| `Generic` | Bare fallback stub | Any unsupported platform |

## Structure

Each hardware port provides:

```
hw_port/<Platform>/
├── include/
│   └── trax_hw_port.h    # Critical section + timestamp macros
└── README.md                   # Platform-specific integration guide
```

## Required Definitions

Each hardware port must define:

### Critical Section Macros
```c
#define TRAX_ENTER_CRITICAL()   // Enter critical section (block-style open)
#define TRAX_EXIT_CRITICAL()    // Exit critical section (block-style close)
```

### Timestamp Source
```c
#define TRAX_HW_PORT_FREERUN_COUNTER     // 32-bit free-running counter read
#define TRAX_HW_PORT_TIMEPACKED_GET32()   // Read timestamp as packed uint32_t
#define TRAX_HW_PORT_TIMEPACKED_PUT32(p)  // Write timestamp to buffer pointer
```

## Integration

1. Add the desired platform's `include/` folder to your build's include path.
2. No other changes needed — the port is activated by the include path alone.
