Error[8]: Undefined offset: 5, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述我试图在我的Beagleboard-xm rev上运行一个“hello world”类型的程序. C,通过从程序集调用C puts函数. 到目前为止,我一直在用这个作为参考:http://wiki.osdev.org/ARM_Beagleboard 这是我到目前为止,但没有输出. hello.c中 volatile unsigned int * const UART3DR = (unsigned 我试图在我的Beagleboard-xm rev上运行一个“hello world”类型的程序. C,通过从程序集调用C puts函数.

到目前为止,我一直在用这个作为参考:http://wiki.osdev.org/ARM_Beagleboard

这是我到目前为止,但没有输出.

hello.c中

volatile unsigned int * const UART3DR = (unsigned int *)0x49020000;voID puts(const char *s) {  while(*s != '
.global startstart:   ldr sp,=stack_bottom   bl hello   b .
') { *UART3DR = (unsigned int)(*s); s++; }}voID hello() { puts("Hello,Beagleboard!\n");}

boot.asm

ENTRY(start)MEMORY{    ram : ORIGIN = 0x80200000,LENGTH = 0x10000}SECTIONS{    .hello : { hello.o(.text) } > ram    .text : { *(.text) } > ram    .data : { *(.data) } > ram    .bss : { *(.bss) } > ram     . = . + 0x5000; /* 4kB of stack memory */    stack_bottom = .;}

linker.ld

ARMGNU = arm-linux-gnueabiAOPS = --warn --fatal-warningscopS = -Wall -Werror -O2 -nostdlib -nostartfiles -ffreestandingboot.bin: boot.asm   $(ARMGNU)-as boot.asm -o boot.o   $(ARMGNU)-gcc-4.6 -c $(copS) hello.c -o hello.o   $(ARMGNU)-ld -T linker.ld hello.o boot.o -o boot.elf   $(ARMGNU)-objdump -D boot.elf > boot.List   $(ARMGNU)-objcopy boot.elf -O srec boot.srec   $(ARMGNU)-objcopy boot.elf -O binary boot.bin

Makefile文件

.equ UART3.BASE,0x49020000start:   ldr r0,=UART3.BASE   mov r1,#'c'

只使用像这样的asm文件.

[+++]

这里有一些Beagleboard / minicom相关信息:http://paste.ubuntu.com/829072/

任何指针? 总结

以上是内存溢出为你收集整理的c – 你好世界,裸机Beagleboard全部内容,希望文章能够帮你解决c – 你好世界,裸机Beagleboard所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
c – 你好世界,裸机Beagleboard_C_内存溢出

c – 你好世界,裸机Beagleboard

c – 你好世界,裸机Beagleboard,第1张

概述我试图在我的Beagleboard-xm rev上运行一个“hello world”类型的程序. C,通过从程序集调用C puts函数. 到目前为止,我一直在用这个作为参考:http://wiki.osdev.org/ARM_Beagleboard 这是我到目前为止,但没有输出. hello.c中 volatile unsigned int * const UART3DR = (unsigned 我试图在我的Beagleboard-xm rev上运行一个“hello world”类型的程序. C,通过从程序集调用C puts函数.

到目前为止,我一直在用这个作为参考:http://wiki.osdev.org/ARM_Beagleboard

这是我到目前为止,但没有输出.

hello.c中

volatile unsigned int * const UART3DR = (unsigned int *)0x49020000;voID puts(const char *s) {  while(*s != '
.global startstart:   ldr sp,=stack_bottom   bl hello   b .
') { *UART3DR = (unsigned int)(*s); s++; }}voID hello() { puts("Hello,Beagleboard!\n");}

boot.asm

ENTRY(start)MEMORY{    ram : ORIGIN = 0x80200000,LENGTH = 0x10000}SECTIONS{    .hello : { hello.o(.text) } > ram    .text : { *(.text) } > ram    .data : { *(.data) } > ram    .bss : { *(.bss) } > ram     . = . + 0x5000; /* 4kB of stack memory */    stack_bottom = .;}

linker.ld

ARMGNU = arm-linux-gnueabiAOPS = --warn --fatal-warningscopS = -Wall -Werror -O2 -nostdlib -nostartfiles -ffreestandingboot.bin: boot.asm   $(ARMGNU)-as boot.asm -o boot.o   $(ARMGNU)-gcc-4.6 -c $(copS) hello.c -o hello.o   $(ARMGNU)-ld -T linker.ld hello.o boot.o -o boot.elf   $(ARMGNU)-objdump -D boot.elf > boot.List   $(ARMGNU)-objcopy boot.elf -O srec boot.srec   $(ARMGNU)-objcopy boot.elf -O binary boot.bin

Makefile文件

.equ UART3.BASE,0x49020000start:   ldr r0,=UART3.BASE   mov r1,#'c'

只使用像这样的asm文件.

这里有一些Beagleboard / minicom相关信息:http://paste.ubuntu.com/829072/

任何指针? 总结

以上是内存溢出为你收集整理的c – 你好世界,裸机Beagleboard全部内容,希望文章能够帮你解决c – 你好世界,裸机Beagleboard所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1248592.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-07
下一篇 2022-06-07

发表评论

登录后才能评论

评论列表(0条)

保存