| // Licensed under the Apache-2.0 license |
| |
| // AST1060-EVB I2C Slave Echo System Configuration |
| // |
| // Memory Layout: |
| // 0x00000000 - 0x000004A0: Vector table + kernel annotations |
| // 0x000004A0 - 0x00020000: Kernel code (~126KB) |
| // 0x00020000 - 0x00040000: i2c_server flash (128KB) |
| // 0x00040000 - 0x00050000: i2c_slave_echo flash (64KB) |
| // 0x00060000 - 0x00080000: Kernel RAM (128KB) |
| // 0x00080000 - 0x00090000: i2c_server RAM (64KB) |
| // 0x00090000 - 0x00098000: i2c_slave_echo RAM (32KB) |
| { |
| arch: { |
| type: "armv7m", |
| vector_table_start_address: 0x00000000, |
| vector_table_size_bytes: 1664, // 0x680 (includes vector table + annotations) |
| }, |
| kernel: { |
| flash_start_address: 0x00000680, |
| flash_size_bytes: 129408, |
| ram_start_address: 0x00060000, |
| ram_size_bytes: 131072, |
| }, |
| apps: [ |
| // ──── I2C Server ──── |
| { |
| name: "i2c_server", |
| flash_size_bytes: 131072, |
| ram_size_bytes: 65536, |
| process: { |
| name: "i2c server process", |
| objects: [ |
| { |
| name: "I2C", |
| type: "channel_handler", |
| }, |
| //{ |
| // // AST1060 I2C2 combined master+slave interrupt. |
| // // IRQ number confirmed from ast1060-pac: Interrupt::i2c2 = 112. |
| // // No separate slave-RX line exists; the server reads i2cs24 |
| // // (slave status register) to distinguish event types. |
| // 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: [ |
| { |
| // 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, |
| }, |
| { |
| 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, |
| }, |
| ], |
| }, |
| }, |
| // ──── I2C Slave Echo ──── |
| { |
| name: "i2c_slave_echo", |
| flash_size_bytes: 65536, |
| ram_size_bytes: 32768, |
| process: { |
| name: "i2c slave echo process", |
| objects: [ |
| { |
| name: "I2C", |
| type: "channel_initiator", |
| handler_app: "i2c_server", |
| handler_object_name: "I2C", |
| }, |
| ], |
| threads: [ |
| { |
| name: "i2c slave echo thread", |
| stack_size_bytes: 2048, |
| }, |
| ], |
| }, |
| }, |
| ], |
| } |