页次: 1
有stm32基础
希望开发板资料越详细越好
推荐一款 谢谢
硬件上看好 芯灵思 的v3s
不知道 资料充足吗
包括 uboot 文件系统 驱动开发
无经验小白
下午用 荔枝派 的板 试试 忘了 还有一片 荔枝派 在吃灰
flash没有烧过,TF卡拔了,都没有usb设备?
是买的开发板?插TF卡能启动吗?
兄弟要把背景交代清楚啊
插入sd卡 能启动的
最后我 拔掉 flash 了 也 没有发现 设备
W25Q128 如果携带了 boot0(u-boot),
那么需要短路 spi-cs & gnd,
才能强制进入 usb fel
我是新买的芯片 里面应该还没有程序
我拔掉SD 卡, 接入一个新的 W25Q128
重启 没有检测到 usb 设备啊
那个
是通过那个接口 使用的 请问
输入 命令
arm-linux-gnueabihf-objdump -S u-boot>u-boot.dis
就能得到 混编 的 uboot 反汇编文件
42e01140 <s_init>:
setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0x1800);
#elif defined CONFIG_MACH_SUN8I
__maybe_unused uint version;
/* Unlock sram version info reg, read it, relock */
setbits_le32(SUNXI_SRAMC_BASE + 0x24, (1 << 15));
42e01140: e3a03507 mov r3, #29360128 ; 0x1c00000
{
42e01144: e92d4010 push {r4, lr}
setbits_le32(SUNXI_SRAMC_BASE + 0x24, (1 << 15));
42e01148: e5932024 ldr r2, [r3, #36] ; 0x24
42e0114c: e3822902 orr r2, r2, #32768 ; 0x8000
42e01150: e5832024 str r2, [r3, #36] ; 0x24
version = readl(SUNXI_SRAMC_BASE + 0x24) >> 16;
42e01154: e5932024 ldr r2, [r3, #36] ; 0x24
42e01158: f57ff05f dmb sy
clrbits_le32(SUNXI_SRAMC_BASE + 0x24, (1 << 15));
42e0115c: e5932024 ldr r2, [r3, #36] ; 0x24
42e01160: e3c22902 bic r2, r2, #32768 ; 0x8000
42e01164: e5832024 str r2, [r3, #36] ; 0x24
#if defined CONFIG_MACH_SUN6I || \
defined CONFIG_MACH_SUN7I || \
defined CONFIG_MACH_SUN8I || \
defined CONFIG_MACH_SUN9I
/* Enable SMP mode for CPU0, by setting bit 6 of Auxiliary Ctl reg */
asm volatile(
42e01168: ee110f30 mrc 15, 0, r0, cr1, cr0, {1}
42e0116c: e3800040 orr r0, r0, #64 ; 0x40
42e01170: ee010f30 mcr 15, 0, r0, cr1, cr0, {1}
#if defined CONFIG_MACH_SUN6I || defined CONFIG_MACH_SUN8I_H3
/* Enable non-secure access to some peripherals */
tzpc_init();
#endif
...
通过 arm-linux-gnueabihf-objdump -D u-boot > u-boot.dis
但是 生成的 代码 是纯汇编,两者没有混排起来,不知道 那些虹 被执行了
有没有 生成 混排起来的 反汇编, 应该是 gcc 优化掉了 它对应的调试消息 怎么改
例如:函数 s_init对应的 C 代码是
void s_init(void)
{
/*
* Undocumented magic taken from boot0, without this DRAM
* access gets messed up (seems cache related).
* The boot0 sources describe this as: "config ema for cache sram"
*/
#if defined CONFIG_MACH_SUN6I
setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0x1800);
#elif defined CONFIG_MACH_SUN8I
__maybe_unused uint version;
/* Unlock sram version info reg, read it, relock */
setbits_le32(SUNXI_SRAMC_BASE + 0x24, (1 << 15));
version = readl(SUNXI_SRAMC_BASE + 0x24) >> 16;
clrbits_le32(SUNXI_SRAMC_BASE + 0x24, (1 << 15));
/*
* Ideally this would be a switch case, but we do not know exactly
* which versions there are and which version needs which settings,
* so reproduce the per SoC code from the BSP.
*/
#if defined CONFIG_MACH_SUN8I_A23
if (version == 0x1650)
setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0x1800);
else /* 0x1661 ? */
setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0xc0);
#elif defined CONFIG_MACH_SUN8I_A33
if (version != 0x1667)
setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0xc0);
#endif
/* A83T BSP never modifies SUNXI_SRAMC_BASE + 0x44 */
/* No H3 BSP, boot0 seems to not modify SUNXI_SRAMC_BASE + 0x44 */
#endif
#if defined CONFIG_MACH_SUN6I || \
defined CONFIG_MACH_SUN7I || \
defined CONFIG_MACH_SUN8I || \
defined CONFIG_MACH_SUN9I
/* Enable SMP mode for CPU0, by setting bit 6 of Auxiliary Ctl reg */
asm volatile(
"mrc p15, 0, r0, c1, c0, 1\n"
"orr r0, r0, #1 << 6\n"
"mcr p15, 0, r0, c1, c0, 1\n");
#endif
#if defined CONFIG_MACH_SUN6I || defined CONFIG_MACH_SUN8I_H3
/* Enable non-secure access to some peripherals */
tzpc_init();
#endif
clock_init();
timer_init();
gpio_init();
i2c_init_board();
eth_init_board();
}
对应的 汇编是:
42e01140 <s_init>:
42e01140: e3a03507 mov r3, #29360128 ; 0x1c00000
42e01144: e92d4010 push {r4, lr}
42e01148: e5932024 ldr r2, [r3, #36] ; 0x24
42e0114c: e3822902 orr r2, r2, #32768 ; 0x8000
42e01150: e5832024 str r2, [r3, #36] ; 0x24
42e01154: e5932024 ldr r2, [r3, #36] ; 0x24
42e01158: f57ff05f dmb sy
42e0115c: e5932024 ldr r2, [r3, #36] ; 0x24
42e01160: e3c22902 bic r2, r2, #32768 ; 0x8000
42e01164: e5832024 str r2, [r3, #36] ; 0x24
42e01168: ee110f30 mrc 15, 0, r0, cr1, cr0, {1}
42e0116c: e3800040 orr r0, r0, #64 ; 0x40
42e01170: ee010f30 mcr 15, 0, r0, cr1, cr0, {1}
42e01174: eb000023 bl 42e01208 <clock_init>
42e01178: ebfffd29 bl 42e00624 <timer_init>
42e0117c: e3a01003 mov r1, #3
42e01180: e3a00028 mov r0, #40 ; 0x28
42e01184: eb00004e bl 42e012c4 <sunxi_gpio_set_cfgpin>
42e01188: e3a01003 mov r1, #3
42e0118c: e3a00029 mov r0, #41 ; 0x29
42e01190: eb00004b bl 42e012c4 <sunxi_gpio_set_cfgpin>
42e01194: e3a01001 mov r1, #1
42e01198: e3a00029 mov r0, #41 ; 0x29
42e0119c: eb000074 bl 42e01374 <sunxi_gpio_set_pull>
42e011a0: e8bd4010 pop {r4, lr}
42e011a4: ea000190 b 42e017ec <i2c_init_board>
我现在只知道 通过 map 文件 寻找到它 在
.text.relocate_vectors
0x0000000042e007c4 0x70 arch/arm/lib/built-in.o
0x0000000042e007c4 relocate_vectors
0x0000000042e007d0 relocate_code
最终 我通过 sourceinsight 寻找到它 在: relocate.S 里面
但是 有些函数 在 各个文件 有多个定义,通过宏来判定,
我能不能通过 gcc 的编译信息,快速确定它 到底在哪个文件 那个文件里面 那些指令是被编译的了
不然看着 uboot 的代码 不知道跳转 很麻烦,
有更好的 查看代码 软件吗 我用的是 source insight4
如题
....
对的,自动http下载,自动git clone,墙内访问github.com不够友好。
初学者建议只用 buildroot 构建根文件系统就行,
另外单独构建 uboot和linux.
那个帖子 有构建步骤啊,以前一直玩 stm32 转 linux 不熟悉,谢谢
buildroot本身不带其他项目的源码, 都是代码的 svn/git/http地址而已,但是会带这些源码的补丁包(patch文件)。
嗯,就是她会自动下载 linux 和 uboot 的代码吗?
如题
页次: 1