blob: df3dcccd1e0c64e9b24b49d6ef8c4c78975b55d3 [file]
// Licensed under the Apache-2.0 license
// AST1060-EVB I2C 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 code (~126KB)
// 0x00020000 - 0x00060000: App flash (256KB: 2 apps × 128KB)
// 0x00060000 - 0x00080000: Kernel RAM (128KB)
// 0x00080000 - 0x000A0000: App RAM (128KB: 2 apps × 64KB)
//
// Total: 640KB, fits within AST1060's 768KB SRAM.
{
arch: {
type: "armv7m",
vector_table_start_address: 0x00000000,
vector_table_size_bytes: 1664, // 0x680 (includes vector table + annotations)
},
kernel: {
flash_start_address: 0x00000680, // After vector table + annotations
flash_size_bytes: 129408, // ~126KB (ends at 0x00020000, power-of-2 boundary)
ram_start_address: 0x00060000, // After all flash regions
ram_size_bytes: 131072, // 128KB
},
apps: [
// ──── I2C Server ────
// Owns the 14 AST1060 I2C controllers.
// Receives I2C operations via IPC channel, dispatches to hardware.
{
name: "i2c_server",
flash_size_bytes: 131072, // 128KB for server code
ram_size_bytes: 65536, // 64KB RAM (register maps + buffers)
process: {
name: "i2c server process",
objects: [
{
name: "I2C",
type: "channel_handler", // Server side of client→server channel
},
{
// AST1060 I2C2 combined master+slave interrupt (IRQ 112).
name: "I2C2_IRQ",
type: "interrupt",
irqs: [
{
name: "i2c2",
number: 112,
},
],
},
{
// WaitGroup: multiplexes IPC channel (READABLE) and IRQ (signals::I2C2).
name: "WG",
type: "wait_group",
},
],
memory_mappings: [
{
name: "i2c_controllers",
type: "device",
start_address: 0x7e7b0000,
size_bytes: 0x2000, // I2Cglobal + 14 controllers + 14 buff regions
},
{
name: "scu",
type: "device",
start_address: 0x7e6e2000,
size_bytes: 0x1000, // SCU register block (scu310 at +0x310 read for APB clock)
},
],
threads: [
{
name: "i2c server thread",
stack_size_bytes: 4096, // 4KB stack (register ops, buffers)
},
],
},
},
// ──── I2C Client (test) ────
// Sends I2C read/write requests to the server via IPC.
{
name: "i2c_client",
flash_size_bytes: 65536, // 64KB for client/test code
ram_size_bytes: 32768, // 32KB RAM
process: {
name: "i2c client process",
objects: [
{
name: "I2C",
type: "channel_initiator", // Client side
handler_app: "i2c_server",
handler_object_name: "I2C",
},
],
threads: [
{
name: "i2c client thread",
stack_size_bytes: 2048, // 2KB stack
},
],
},
},
],
}