1、环境
$ uname -a
Linux vbox 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
2、安装 Mono
sudo apt update
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo apt install apt-transport-https ca-certificates
echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-complete
安装 Mono 快结束时有个预编译的过程,这需要花费是十几分钟的时间。
参考:
3、安装其它依赖包
sudo apt-get install policykit-1 libgtk2.0-0 screen uml-utilities gtk-sharp2 libc6-dev
4、下载 Renode
打开下载页面 github.com/renode/reno… ,下载 renode_1.7.1_amd64.deb。
5、安装 Renode
sudo dpkg -i renode_1.7.1_amd64.deb
6、运行 Renode
命令行输入 renode 运行。
renode
运行之后,renode 会开启新的命令窗口用作renode 命令输入,原来的命令行窗口作为renode的日志输出窗口使用。
7、创建 machine
以下命令均在 renode 命令窗口输入。
创建机器,然后加载平台描述文件,这里是 STM32F4Discovery开发板的平台描述文件。
mach create
machine LoadPlatformDescription @platforms/boards/stm32f4_discovery-kit
.repl
8、查看外设
输入 peripherals 命令查看外设。
(machine-0) peripherals
Available peripherals:
sysbus (SystemBus)
│
├── can0 (STMCAN)
│ <0x40006400, 0x400067FF>
│
├── cpu (CortexM)
│ Slot: 0
│
├── dma1 (STM32DMA)
│ <0x40026000, 0x400263FF>
│
├── dma2 (STM32DMA)
│ <0x40023400, 0x400237FF>
│
├── ethernet (SynopsysEthernetMAC)
│ │ <0x40028000, 0x400293FF>
│ │
│ ├── phy (EthernetPhysicalLayer)
│ │ Address: 0
│ │
│ └── phy1 (EthernetPhysicalLayer)
│ Address: 1
│
├── exti (EXTI)
│ <0x40013C00, 0x40013FFE>
│
├── flash (MappedMemory)
│ <0x08000000, 0x081FFFFF>
│
├── fscmBank1 (MappedMemory)
│ <0x60000000, 0x6FFFFFFF>
│
├── gpioPortA (STM32F4GPIOPort)
│ │ <0x40020000, 0x400203FF>
│ │
│ ├── UserButton (Button)
│ │
│ ├── externalButton (Button)
│ │
│ └── externalLed (LED)
│
├── gpioPortB (STM32F4GPIOPort)
│ <0x40020400, 0x400207FF>
│
├── gpioPortC (STM32F4GPIOPort)
│ <0x40020800, 0x40020BFF>
│
├── gpioPortD (STM32F4GPIOPort)
│ │ <0x40020C00, 0x40020FFF>
│ │
│ └── UserLED (LED)
│
├── gpioPortE (STM32F4GPIOPort)
│ <0x40021000, 0x400213FF>
│
├── gpioPortF (STM32F4GPIOPort)
│ <0x40021400, 0x400217FF>
│
├── nvic (NVIC)
│ <0xE000E000, 0xE000EFFF>
│
├── rng (STM32F4_RNG)
│ <0x50060800, 0x50060BFF>
│
├── rom (MappedMemory)
│ <0x1FFF0000, 0x1FFFFFFF>
│
├── spi1 (STM32SPI)
│ <0x40013000, 0x400133FF>
│
├── spi2 (STM32SPI)
│ <0x40003800, 0x40003BFF>
│
├── spi3 (STM32SPI)
│ <0x40003C00, 0x40003FFF>
│
├── sram (MappedMemory)
│ <0x20000000, 0x2003FFFF>
│
├── uart1 (STM32_UART)
│ <0x40011000, 0x400110FF>
│
├── uart2 (STM32_UART)
│ <0x40004400, 0x400044FF>
│
├── uart3 (STM32_UART)
│ <0x40004800, 0x400048FF>
│
├── uart4 (STM32_UART)
│ <0x40004C00, 0x40004CFF>
│
└── uart5 (STM32_UART)
<0x40005000, 0x400050FF>
9、加载程序
机器创建好了以后,就可以用 LoadELF 命令加载程序了。
sysbus LoadELF @http://antmicro.com/projects/renode/stm32f4discovery.elf-s_445441-827a0dedd3790f4559d7518320006613768b5e72
10、启动模拟器
输入 start 命令启动模拟器。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上物联网嵌入式知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、电子书籍、讲解视频,并且后续会持续更新