Created
September 14, 2020 06:47
-
-
Save ehabhussein/a283cde4d905dac1b09a2aa4a31cf812 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| #Nuc220LE3AN Ida python script to create system memory map segments | |
| from idautils import * | |
| from idc import * | |
| from idaapi import * | |
| SEGMENT_ARCH = 32 | |
| for i in [ | |
| #(0x00000000, 0x0001FFFF, 'FLASH_BA'), | |
| (0x20000000, 0x20003FFF, 'SRAM'), | |
| (0x50000000, 0x500001FF, 'GCR_BA'), | |
| (0x50000200, 0x500002FF, 'CLK_BA'), | |
| (0x50000300, 0x500003FF, 'INT_BA'), | |
| (0x50004000, 0x50007FFF, 'GPIO_BA'), | |
| (0x50008000, 0x5000BFFF, 'PDMA_BA'), | |
| (0x5000C000, 0x5000FFFF, 'FMC_BA'), | |
| (0x40004000, 0x40007FFF, 'WDT_BA'), | |
| (0x40008000, 0x4000BFFF, 'RTC_BA'), | |
| (0x40010000, 0x40013FFF, 'TMR01_BA'), | |
| (0x40020000, 0x40023FFF, 'I2C0_BA'), | |
| (0x40030000, 0x40033FFF, 'SPI0_BA'), | |
| (0x40034000, 0x40037FFF, 'SPI1_BA'), | |
| (0x40040000, 0x40043FFF, 'PWMA_BA'), | |
| (0x40050000, 0x40053FFF, 'UART0_BA'), | |
| (0x40060000, 0x40063FFF, 'USBD_BA'), | |
| (0x400D0000, 0x400D3FFF, 'ACMP_BA'), | |
| (0x400E0000, 0x400EFFFF, 'ADC_BA'), | |
| (0x40100000, 0x40103FFF, 'PS2_BA'), | |
| (0x40110000, 0x40113FFF, 'TMR23_BA'), | |
| (0x40120000, 0x40123FFF, 'I2C1_BA'), | |
| (0x40130000, 0x40133FFF, 'SPI2_BA'), | |
| (0x40134000, 0x40137FFF, 'SPI3_BA'), | |
| (0x40140000, 0x40143FFF, 'PWMB_BA'), | |
| (0x40150000, 0x40153FFF, 'UART1_BA'), | |
| (0x40154000, 0x40157FFF, 'UART2_BA'), | |
| (0x40190000, 0x40193FFF, 'SC0_BA'), | |
| (0x40194000, 0x40197FFF, 'SC1_BA'), | |
| (0x40198000, 0x4019BFFF, 'SC2_BA'), | |
| (0x401A0000, 0x401A3FFF, 'I2S_BA'), | |
| (0xE000E000, 0xE000EFFF, 'Sys_control_space')]: | |
| AddSeg(i[0], i[1], 0x0, 1, 1, 0) | |
| set_segm_name(getseg(i[0]), i[2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment