sysbus:
    init:
        Tag <0x40040000 0x40000> "usbotg_hs"
        Tag <0x50000000 0x40000> "usbotg_fs"
        Tag <0x40028000 0x8000> "mac"
        Tag <0x40020000 0x2400> "pinctrl"
        Tag <0x40024000 0x1000> "backup_sram"
        Tag <0x40000400 0x400> "timers3"
        Tag <0x40000800 0x400> "timers4"
        Tag <0x40000c00 0x400> "timers5"
        Tag <0x40001000 0x400> "timers6"
        Tag <0x40001400 0x400> "timers7"
        Tag <0x40001800 0x400> "timers12"
        Tag <0x40001c00 0x400> "timers13"
        Tag <0x40002000 0x400> "timers14"
        Tag <0x40002c00 0x400> "wwdg"
        Tag <0x40003000 0x400> "iwdg"
        Tag <0x40003800 0x400> "i2s2"
        Tag <0x40003c00 0x400> "i2s3 / spi3"
        Tag <0x40004800 0x400> "usart3"
        Tag <0x40004c00 0x400> "uart4"
        Tag <0x40005000 0x400> "uart5"
        Tag <0x40005400 0x400> "i2c1"
        Tag <0x40005800 0x400> "i2c2"
        Tag <0x40005c00 0x400> "i2c3"
        Tag <0x40006400 0x400> "can1"
        Tag <0x40006800 0x400> "can2"
        Tag <0x40007400 0x400> "dac1"
        Tag <0x40010000 0x400> "timers1"
        Tag <0x40010400 0x400> "timers8"
        Tag <0x40011400 0x400> "usart6"
        Tag <0x40012000 0x400> "adc1 / adc2 / adc3"
        Tag <0x40012c00 0x400> "sdmmc1"
        Tag <0x40013400 0x400> "spi4"
        Tag <0x40013c00 0x400> "exti"
        Tag <0x40014000 0x400> "timers9"
        Tag <0x40014400 0x400> "timers10"
        Tag <0x40014800 0x400> "timers11"
        Tag <0x40023c00 0x400> "flash"
        Tag <0x40026000 0x400> "dma1"
        Tag <0x40026400 0x400> "dma2"
        Tag <0x50060800 0x400> "rng"
        Tag <0xe000e010 0x10> "systick"

flash0: Memory.MappedMemory @ sysbus 0x8000000
    size: 0x80000

ccm0: Memory.MappedMemory @ sysbus 0x10000000
    size: 0x10000

sram0: Memory.MappedMemory @ sysbus 0x20000000
    size: 0x20000

timers2: Timers.STM32_Timer @ sysbus <0x40000000, +0x400>
    frequency: 10000000
    initialLimit: 0xffffffff
    ->nvic0@28

usart2: UART.STM32_UART @ sysbus <0x40004400, +0x400>
    ->nvic0@38

usart1: UART.STM32_UART @ sysbus <0x40011000, +0x400>
    ->nvic0@37

gpioa: GPIOPort.STM32_GPIOPort @ sysbus <0x40020000, +0x400>

gpiob: GPIOPort.STM32_GPIOPort @ sysbus <0x40020400, +0x400>

gpioc: GPIOPort.STM32_GPIOPort @ sysbus <0x40020800, +0x400>

gpiod: GPIOPort.STM32_GPIOPort @ sysbus <0x40020c00, +0x400>

gpioe: GPIOPort.STM32_GPIOPort @ sysbus <0x40021000, +0x400>

gpiof: GPIOPort.STM32_GPIOPort @ sysbus <0x40021400, +0x400>

gpiog: GPIOPort.STM32_GPIOPort @ sysbus <0x40021800, +0x400>

gpioh: GPIOPort.STM32_GPIOPort @ sysbus <0x40021c00, +0x400>

gpioi: GPIOPort.STM32_GPIOPort @ sysbus <0x40022000, +0x400>

// autogenerated

greenled1: Miscellaneous.LED @ gpioa 0x6
    invert: true

gpioa:
    6 -> greenled1@0

greenled2: Miscellaneous.LED @ gpioa 0x7
    invert: true

gpioa:
    7 -> greenled2@0

nvic0: IRQControllers.NVIC @ {
    sysbus new Bus.BusPointRegistration { address: 0xe000e000; cpu: cpu0 }
}
    -> cpu0@0
    systickFrequency: 168000000

cpu0: CPU.CortexM @ sysbus
    cpuType: "cortex-m4f"
    nvic: nvic0

rtc: Timers.STM32F4_RTC @ sysbus 0x40002800
    AlarmIRQ->nvic0@41

rcc: Miscellaneous.STM32F4_RCC @ sysbus 0x40023800
    rtcPeripheral: rtc

spi1: SPI.STM32SPI @ sysbus 0x40013000
    IRQ->nvic0@35

spi2: SPI.STM32SPI @ sysbus 0x40003800
    IRQ->nvic0@36

// cortex-m overlay

dwt: Miscellaneous.DWT @ sysbus 0xE0001000
    frequency: 72000000

// st,stm32f4 overlay

sysbus:
    init add:
        ApplySVD @https://dl.antmicro.com/projects/renode/svd/STM32F40x.svd.gz