blob: 86c2abd489a18cb7c64832dae2a6286f7f9dd92c [file]
// Licensed under the Apache-2.0 license
// AST1060-EVB MCTP Echo Server + Client Configuration
// ARM Cortex-M4 @ 200 MHz
// 768KB SRAM (640KB usable), executes from RAM
//
// Memory Layout (PMSAv7-friendly, power-of-2 aligned regions):
// 0x00000000 - 0x00000500: Vector table + kernel annotations (1280 bytes)
// 0x00000500 - 0x00020000: Kernel flash (~127KB, ends at 128KB boundary)
// 0x00020000 - 0x00040000: i2c_server flash (128KB)
// 0x00040000 - 0x00060000: mctp_server flash (128KB)
// 0x00060000 - 0x00080000: mctp_echo flash (128KB)
// 0x00080000 - 0x00088000: i2c_server RAM (32KB)
// 0x00088000 - 0x00090000: mctp_server RAM (32KB)
// 0x00090000 - 0x00098000: mctp_echo RAM (32KB)
// 0x00098000 - 0x000A0000: Kernel RAM (32KB)
//
// Total: 0xA0000 = 640KB (fits within the 640KB usable window of the AST1060's 768KB SRAM).
{
arch: {
type: "armv7m",
vector_table_start_address: 0x00000000,
vector_table_size_bytes: 1280, // 0x500 (272 vectors + thread/stack annotations)
},
kernel: {
flash_start_address: 0x00000500, // After vector table + annotations
flash_size_bytes: 129792, // 0x1FB00: ends at exactly 0x20000 (128KB boundary)
ram_start_address: 0x00098000, // After all app RAM (3 × 32KB = 0x18000 past 0x80000)
ram_size_bytes: 32768, // 32KB
},
apps: [
// ──── I2C Server ────
// Owns the AST1060 I2C controllers.
// The MCTP server uses I2C as its transport.
{
name: "i2c_server",
flash_size_bytes: 131072, // 128KB for server code
ram_size_bytes: 32768, // 32KB RAM (register maps + buffers)
process: {
name: "i2c server process",
objects: [
{
name: "I2C",
type: "channel_handler", // Server side of client→server channel
},
],
threads: [
{
name: "i2c server thread",
stack_size_bytes: 4096, // 4KB stack
},
],
memory_mappings: [
{
// AST1060 I2C peripheral block: I2cglobal through I2cFilter
// Base: 0x7e7b0000, covers all 14 controllers + buffers + filter
name: "i2c_regs",
type: "device",
start_address: 0x7e7b0000,
size_bytes: 0x4000,
},
{
// SCU register block — scu310 at +0x310 is read by
// ClockConfig::from_hardware() to derive APB clock frequency.
name: "scu",
type: "device",
start_address: 0x7e6e2000,
size_bytes: 0x1000,
},
],
},
},
// ──── MCTP Server ────
// Runs the MCTP stack. Receives MCTP operations via IPC,
// uses I2C transport for on-the-wire communication.
{
name: "mctp_server",
flash_size_bytes: 131072, // 128KB for MCTP server code
ram_size_bytes: 32768, // 32KB RAM (Router state, buffers)
process: {
name: "mctp server process",
objects: [
{
name: "MCTP",
type: "channel_handler", // Server side: echo client → MCTP server
},
{
name: "I2C",
type: "channel_initiator", // Client side: MCTP server → I2C server
handler_app: "i2c_server",
handler_object_name: "I2C",
},
{
// WaitGroup: multiplexes IPC channel (READABLE) and I2C slave
// notification (USER). user_data=0 → IPC from a client, user_data=1 → inbound.
name: "WG",
type: "wait_group",
},
],
threads: [
{
name: "mctp server thread",
stack_size_bytes: 8192, // 8KB stack (Router + fragmentation buffers)
},
],
},
},
// ──── MCTP Echo Client ────
// Listens for MCTP type-1 messages and echoes the payload back.
{
name: "mctp_echo",
flash_size_bytes: 131072, // 128KB for echo app
ram_size_bytes: 32768, // 32KB RAM
process: {
name: "mctp echo process",
objects: [
{
name: "MCTP",
type: "channel_initiator", // Client side: echo → MCTP server
handler_app: "mctp_server",
handler_object_name: "MCTP",
},
],
threads: [
{
name: "mctp echo thread",
stack_size_bytes: 4096, // 4KB stack
},
],
},
},
],
}