bootloader

How does the bootloader pick up the command after a “restarting system with command”?

自古美人都是妖i 提交于 2019-12-03 05:55:16
Looking in the android source for the reboot command we find the following line: __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, \ LINUX_REBOOT_CMD_RESTART2, argv[optind]); Which is the standard Linux system call to reboot the system with a specific command, see Unix System Call Reboot . In Android this command is used to tell the bootloader to start either the kernel in recovery mode or to go to the fastboot mode within the bootloader. My question is: How does the bootloader pick up the command? And is this functionality implemented in U-Boot? (I am unable to find it searching either

How do you jump to the bootloader (DFU mode) in software on the STM32 F072?

牧云@^-^@ 提交于 2019-12-03 04:01:25
The STM32 App Note 2606 discusses this, but there is no simple code example. This answer has been tested on the STM32F072 Nucleo board using IAR EWARM. This answer uses the "STM32 Standard Peripheral Library" and nothing else. Note that the best/easiest way to verify you are successfully in bootloader mode (DFU mode) is to hookup a USB-2-UART converter (get one here from Sparkfun: http://sfe.io/p9873 for $15) on lines PA_9 (USART1_TX) and PA_10 (USART1_RX) (don't forget to connect ground as well). I was not able to use the Nucleo USART2 default connection (/dev/ttyACM0), hence the external USB

EFM32的BootLoader跳转过程

匿名 (未验证) 提交于 2019-12-03 00:34:01
Initial SP value对应的实际地址是首地址+0,Reset对应的实际地址是首地址+4。 Initial SP value里面的值是重新设置的堆栈首地址;Reset里面的值是新程序的执行地址。 方式一:c语言配合寄存器 方式二:嵌入式汇编配合寄存器 文章来源: EFM32的BootLoader跳转过程

Nordic 52832 ―― OTA 流程源码分析(二)

匿名 (未验证) 提交于 2019-12-03 00:26:01
写在前面: 之前已经写过OTA过程是如何跳转进入bootloader的,在跳转之前主要做了什么,请参考以下文章,使用的SDK为SDK12.2.0,个人QQ:993650814 Nordic 52832 ―― OTA 流程源码分析(一) , 正文: 一、 准备工作:如何编译bootloader以及让他正常工作请参考如下文章: DFU升级 二、OTA基本知识储备: MBR是如何获取bootloader地址的呢? 在nrf_bootloader_info.c中有个宏定义, 这样UICR就得到了bootloader的起始地址,然后每次启动时,MBR都会检查boot是否存在。 2、52832 Memory Laylout 须知: 3. Nordic OTA分dual bank和single bank,application、协议栈、和bootloader都可以升级,这里只分析OTA application: dual bank updates: single bank updates: 三、源码分析: 1、OTA的setting结构体,里面包含了OTA过程中的一些信息,定义在nrf_dfu_types.h中: 2、nrf_dfu_settings_init 函数 3.nrf_dfu_continue 函数 这个函数的作用是通过setting中的信息判断目前使用的是哪个bank

初识Nordic 52840

匿名 (未验证) 提交于 2019-12-03 00:22:01
接触过BLE的朋友,我想基本上都听过Nordic吧,如果真有用过BLE的人没听说过这个品牌,那你很大可能性就是骗别人说你做过BLE开发。Nordic是挪威一家只做2.4G频段的无线通讯技术半导体芯片厂商,明年也就是2019年中旬也会推出量产级别兼芯片级的NB-IOT即nRF91,其目前在BLE行业中占据了百分之60以上的市场份额 (数据来源于Nordic官方) ,不得不说这样的数据是相当恐怖的。当然了,Nordic的成功是有原因的,其BLE芯片出色的性能、完善的资料系统以及对工程师相当友好的开发社区等等都是广大用户有目共睹的。简单地介绍完Nordic之后,接下来我们直接进入主题。 不管是新手还是老鸟工程师,接触到之前没有用过的芯片,首先要做的就是去官方网站或者代理商获取芯片相关的文档进行查阅,从而为后面的芯片开发铺路或者打下基础。理所当然,对于Nordic 52840也是这样,所有的资料均可在官方网站下载得到,但是对从来没有用过Nordic BLE芯片的人来说,肯定是一脸懵逼的,有的人可能在哪里下载到相关的文档都不知道。大家莫慌,随我慢慢道来,但是我不会马上就告诉你相关的文档在哪里下载,因为写这篇文章就是让你初识Nordic 52840,假设直接就告诉你相关的文档在哪里,那么你看了这篇文章就等于没看。因此,要想知道如何开发这个芯片,就应该先看看这个芯片相关的框架。 我们

badusb-digispark-ATTINY85

匿名 (未验证) 提交于 2019-12-03 00:13:02
知道badusb已经好久了,但是迟迟没有购买,原因嘛。。很简单:我菜嘛,怕买来了用不起来,怕需要驱动。。(但我还是在几个月后买了..) 我用的是Digispark一个基于ATTINY85微控制器的USB开发板,体积小且价钱便宜。 淘宝一个差不多10块5吧。 arduino(IDE) digispark drive(驱动) 请参考第一篇参考文章。 需要注意的就是在首选项内添加JSON。 下载好后选择Tools(工具) -> Borad(开发板) - > Digispark (Default - 16.5mhz) 再选择Tools(工具) -> Programmer(编辑器) -> USBtinyISP 具体代码请参考第二篇参考文章。 拷贝好代码后,点击upload(注意这一步骤是不需要插着Digispark)。 等待arduion出现下面代码提示,具体意思:请插入你的硬件。 Running Digispark Uploader ... Plug in device now ... ( will timeout in 60 seconds ) 耐心等待即可。 你会发现烧录成功后,烧录的代码只会执行一次,并且其他电脑不会自动安装驱动。(~抓狂~) 我加了相关的Q群,查了百度大量信息,最后发现可能是我的Digispark内置的Bootloader版本太低了。

What is the booting process for ARM?

ε祈祈猫儿з 提交于 2019-12-03 00:08:19
问题 As we know, for X86 architecture: After we press the power button, machine starts to execute code at 0xFFFFFFF0, then it starts to execute code in BIOS in order to do hardware initialization. After BIOS execution, it use bootloader to load the OS image into memory. At the end, OS code starts to run. For ARM architecture, what is the booting process after use press the power button? Thanks! 回答1: Currently, there are two exception models in the ARM architecture (reset is considered a kind of

esp32 关闭日志

匿名 (未验证) 提交于 2019-12-02 23:55:01
esp32上电以及系统运行中会从串口0打印很多日志,对于没有必要查看日志的场合,打印日志的动作显得多余并且还会占用资源,下文给出关闭日志打印的方法。 1、进入工程目录 2、make menuconfig 3、关闭Bootloader 日志: Bootloader config --> Bootloader log verbosity 选定为 No output 4、关闭程序日志:Component config -> Log output -> Default log verbosity 选定为 No output 来源:博客园 作者: zornlink 链接:https://www.cnblogs.com/zornlink/p/11408606.html

NRF52832空中升级DFU

匿名 (未验证) 提交于 2019-12-02 23:42:01
Secure DFU环境搭建 升级原理,加密原理在此不做描述,详情参考 http://www.cnblogs.com/iini/p/9314246.html 1.工具一览 gcc-arm-none-eabi编译环境:GCC编译环境 https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads mingw 平台(win版的Linux命令行) https://sourceforge.net/projects/mingw/files/latest/download?source micro-ecc-master源码 https://github.com/kmackay/micro-ecc python 安装文件 https://www.python.org/downloads/ pc-nrfutil https://github.com/NordicSemiconductor/pc-nrfutil/ nrfgo-studio nrf connect app 2.安装指导 Secure DFU需要micro-ecc库进行签名验证,需要micro_ecc_lib_nrf52.lib,需要使用GCC编译器生成。 2.1 gcc-arm-none-eabi安装 gcc-arm-none-eabi-4_9-2015q3

ARM Bootloader: Disable MMU and Caches

柔情痞子 提交于 2019-12-02 21:29:01
According to some tutorials, we will disable MMU and I/D-Caches at the beginning of bootlaoder. If I understand correctly, it aims to use the physical address directly in the program, so please correct me if I'm wrong. Thank you! Secondly, we do this to disable MMU and Caches: mrc P15, 0, R0, C1, C0, 0 bic R0, R0, #0x00002300 @ clear bits 13, 9:8 bic R0, R0, #0x00000087 @ clear bits 7, 2:0 orr R0, R0, #0x00000002 @ set bit 2 (A) Align orr R0, R0, #0x00001000 @ set bit 12 (I) I-Cache mcr P15, 0, R0, C1, C0, 0 D-Cache, MMU and Data Address Alignment Fault Checking have been disabled by clear